Community
Participate
Working Groups
Test Log view does not open after a test execution has completed. When the user configures a test launch configuration to create a test log (*.execution), the Test Log view should be opened on that test log after the test execution has completed. Code snippet: PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){ public void run(){ //Open the Test perspective: try { PlatformUI.getWorkbench().showPerspective("org.eclipse.hyades.ui.perspective.TestPerspective",PlatformUI.getWorkbench().getActiveWorkbenchWindow()); } catch (Exception e) { //Ignore since Test perspective could not be opened. } //Open the test log view: try { IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(<test log location>)); IEditorDescriptor editorDescriptor = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(file.getName()); PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(new FileEditorInput(file),editorDescriptor.getId()); } catch (Exception e) { //Ignore since the test log view could not be opened. } } });
This should not be done the in execution harness, since we may not be running in the workbench at all. This should be done by the test launch UI (and should still be surrounded by a PlatformUI.isWorkbenchRunning() call, since ASF uses launch configurations to run headless.)
Reassigning to Jerome.
(In reply to comment #1) Thanks Joe. I intended on selecting the execution harness component:)
Jerome, please provide a sizing.
Also requires a preference for this similar to the 'open editor after creation' preference (see attached patch).
Created attachment 76488 [details] org.eclipse.hyades.test.ui_defect_186148_patch.txt Partial patch (preference page).
Deferring to I5.
Deferring to I6.
Hi,Paul, since there is no connection for test.ui to retrieve all infomation from test.core after test execution, so the method to open log viewer won't work in test.core project. could you please add an extention point for this defect? Thanks!
I'm not positive, but I believe you can detect the completion of test log model loading (after test execution completes) by listening to the ExecutionComponent state change for the executor (which you already have a handle to.) When the executor transitions to the IExecutionComponent.DEAD state, the model should be populated, saved & closed.
Deferring to I7 as discussed by PMC/AG (http://wiki.eclipse.org/TPTP-AG-20080331#Test_Project).
(In reply to comment #10) > I'm not positive, but I believe you can detect the completion of test log model > loading (after test execution completes) by listening to the ExecutionComponent > state change for the executor (which you already have a handle to.) When the > executor transitions to the IExecutionComponent.DEAD state, the model should be > populated, saved & closed. > I'll do you one better, the org.eclipse.hyades.test.core.executionHarnessListener extension point (org.eclipse.hyades.execution.harness.provisional.ITestExecutionHarnessListener.testCompleted()) that you wrote:)
(In reply to comment #12) > I'll do you one better, the > org.eclipse.hyades.test.core.executionHarnessListener extension point > (org.eclipse.hyades.execution.harness.provisional.ITestExecutionHarnessListener.testCompleted()) > that you wrote:) > Actually, since only org.eclipse.hyades.execution.harness.provisional.TestExecutionHarnessListenerNotifier.notifyLaunchCompleted(IExecutionHarnessDataProcessor, List) is called by org.eclipse.hyades.execution.harness.TestExecutionHarness.java, we will use org.eclipse.hyades.execution.harness.provisional.ITestExecutionHarnessListener.launchCompleted().
If I recall correctly, testComplete() is never called by the execution harness because the execution harness is done long before the test is complete. The scope of the execution harness ends when the launch sequence is complete (i.e. the test has begun). I'm afraid launchCompleted() is not the state you really want, either, since the launch is always complete before the test itself is complete. The launchTest methods returns an Executor, and you can detect the test finishing by monitoring the state of the executor.
(In reply to comment #14) > If I recall correctly, testComplete() is never called by the execution harness > because the execution harness is done long before the test is complete. The > scope of the execution harness ends when the launch sequence is complete (i.e. > the test has begun). > > I'm afraid launchCompleted() is not the state you really want, either, since > the launch is always complete before the test itself is complete. The > launchTest methods returns an Executor, and you can detect the test finishing > by monitoring the state of the executor. > You are correct. I was able to get the executor from the launch and monitor the the ExecutionComponentStateChangeEvent for the IExecutionComponent.DEAD state. Thanks for the help.
Created attachment 98884 [details] org.eclipse.hyades.test.ui_defect_186148_patch_Part_2 Partial patch (launch termination hook).
(In reply to comment #16) > Created an attachment (id=98884) [details] > org.eclipse.hyades.test.ui_defect_186148_patch_Part_2 > > Partial patch (launch termination hook). > Requires defect #230426.
Deferring to future as approved by the TPTP PMC (http://dev.eclipse.org/mhonarc/lists/tptp-pmc/msg04926.html).
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. Since this defect is more than 2 years old, it may be no longer relevant. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this defect is resolved as WONTFIX. If this defect is still relevant and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
Closing.
Correcting component.