Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 90628

Summary: JUnit integration between Hyades and JDT. (theme 3)
Product: z_Archived Reporter: Dominique Guilbaud <dguilbaud>
Component: TPTPAssignee: Julien Canches <julien.canches>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P1 CC: julien.canches, mlists, paulslau
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
URL: http://www.eclipse.org/tptp/groups/Architecture/documents/features/hf_90628.html
Whiteboard:
Bug Depends on: 110691, 131581    
Bug Blocks: 114799    
Attachments:
Description Flags
Intermediate patch none

Description Dominique Guilbaud CLA 2005-04-07 11:30:22 EDT
Theme 3: Have Hyades naturally integrate with Eclipse SDK use cases

Goal: Allow the JUnit user to have the same experience, once Hyades is
installed, as he/she used to have in Eclipse SDK, with the possibility of
executing his/her JUnit tests in the Hyades framework. Any JUnit test would be
edited and created as usual, and still it would be integrated with other types
of Hyades tests, and could be executed in the Hyades framework (which allows
remote execution, results persistence, and new features to come).

Impacted Projects: The changes required to achieve this step involve the JDT
JUnit plugins (to an extent that needs to be defined). Hyades is also impacted
as a consumer of the JDT JUnit plugins.
As the changes for this phase require phases 1 & 2 to be completed, and as
meanwhile the JUnit features from Eclipse SDK may evolve, no change details will
be listed in this section. This section only lists what problems must be
addressed during this phase.

3.1     Reconcile duplicate ways of achieving a task

3.1.1     New Wizard

Both Hyades and Eclipse SDK provide a way of generating a JUnit test. There are
two separate wizards, with a different UI.
There are pros and cons for keeping only one wizard:
With only one wizard left, there is no confusion about how to create a JUnit test
With two wizards, both the habits of the Java developer and the Hyades tester
are addressed. The first one will be looking in the Java section, while the
latter will be looking in the Test section of the New wizard.
The second solution has been chosen. But the Hyades wizard will share some steps
with the Eclipse SDK one. This is the case for pages that define the JUnit Test
Suite or the JUnit Test Case, which will be the same as the ones used in the
Eclipse SDK wizards. To achieve this step, the JDT team has commited to provide
APIs for being able to reuse these pages (bugzilla 75142).

3.1.2     Launch Configuration

There would be two launch configurations for launching a JUnit test. However,
these launch configurations would drive a completely different execution framework:
The first one is the Eclipse SDK execution framework, which provides a
lightweight, local execution, with volatile results that can be viewed quickly
without requiring any perspective change. This is the favorite launch
configuration for the java developer who is frequently launching JUnit tests
(for test development, regression testing, etc.).
The second one is the Hyades execution framework, which addresses tester
concerns, with batch, versioned management of tests, as it allows all parameters
to be specified  in a deployment file (rather than in a launch configuration),
remote execution, and persistence of test results.
Since the two launch configurations address two different needs, no attempt will
be made to merge them. 

3.2     Automatic migration from plain JUnit to Hyades JUnit

The idea of this change is to avoid requiring the user to import existing JUnit
tests to Hyades before he/she can execute them with Hyades (in other words, make
the JUnit Test Import Wizard unnecessary).
Proposed change: the logical view of the Test Navigator shows plain JUnit tests
as Hyades JUnit Test Suites, even if no Hyades Test Suite is associated to a
given JUnit test. Each time a concrete Hyades Test Suite is required (for
instance, when the user wants to execute it with Hyades), the concrete resource
is generated.
Comment 1 Ruth Lee CLA 2005-07-12 11:08:01 EDT
Deferring from 4.1 as per the official 4.1 enhancement plan.
http://eclipse.org/tptp/home/project_info/featureplans/features.php?source=All&project=All&release=4.1&file=TPTPFeatures_4.1.xml
Comment 2 Julien Canches CLA 2006-06-15 05:33:43 EDT
Feature Desciption document available at http://www.eclipse.org/tptp/groups/Architecture/documents/features/hf_90628.html.

Sizing: 3pw.
Comment 3 Julien Canches CLA 2006-06-19 11:03:18 EDT
Updating suggested priority to P1.
Comment 4 Christophe Telep CLA 2006-06-28 02:50:59 EDT
In plan for 4.3
Comment 5 Valentina Popescu CLA 2006-07-18 09:30:15 EDT
Reviewed and approved by AG on July 18
Comment 6 Julien Canches CLA 2006-08-11 13:11:57 EDT
Created attachment 47778 [details]
Intermediate patch

I'm in vacation next week. Saving the changes I've made so far as an attachment.
Comment 7 Julien Canches CLA 2006-09-01 12:04:11 EDT
Most of the work, including PII and UI, is now committed to CVS.

The following items are missing (they will be completed in i3):
- Allow TPTP JUnit tests to invoke Regular JUnit tests from their behavior
- Allow artifacts to have a reference to a regular JUnit tests (so they can be used in a deployment)
- Provide an API to other types of tests (AutoGUI, URL and any third-party type) to avoid their generated JUnit code appearing under the "Regular JUnit Test" node.
- Update the documentation

The following defects are known defects and will be fixed in i3:
- If the shortcut "Import to TPTP > (name of a type)" is chosen with a selection of more than one JUnit file, only the first one is imported and an error is logged in the error log. Workaround: use the import wizard instead.
- In rare circumstances, JUnit tests may not appear under the "Regular JUnit Test" node whereas they should. Workaround: open the file, make a modification to it, and save it.
Comment 8 Paul Slauenwhite CLA 2006-09-05 09:20:53 EDT
(In reply to comment #7)

Julien, if this enhancement still requires new API(s) and possible UI changes, they will need to be completed this week.

Can you file defects for these outstanding 4.3 i3 defects?
Comment 9 Julien Canches CLA 2006-09-11 07:40:27 EDT
Paul,
All UI changes have been completed in i2. The API I was referring can remain internal (in the future, it could be considered as a candidate to public API if a downstream product requests it).

I have created the following defects to track outstanding i3 defects:
- 156854
- 156855 
- 156856
- 156857
- 156858

Since outstanding issues now have their own record, I am resolving this bugzilla.
Comment 10 Paul Slauenwhite CLA 2006-09-11 07:46:46 EDT
(In reply to comment #9)

Thanks Julien!
Comment 11 Paul Slauenwhite CLA 2006-11-16 09:01:34 EST
ACTION: Please verify/close this defect.
Comment 12 Julien Canches CLA 2006-11-16 09:56:04 EST
Verified on TPTP-4.3.0-200611070100 driver.