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

Bug 330613

Summary: enhance ETF to be able to launch several tests in several bundles
Product: [Eclipse Project] Platform Reporter: Anthony Dahanne <anthony.dahanne>
Component: RelengAssignee: Kim Moir <kim.moir>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, kim.moir, sebastien.angers
Version: 3.6.1   
Target Milestone: 3.7 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
enables ETF to run multiple test suites, acrosss multiple test fragments
none
enables ETF to run multiple test suites, acrosss multiple test fragments --NO FORMATTING ISSUE
john.arthorne: iplog+
patch to update copyright
none
mylyn/context/zip none

Description Anthony Dahanne CLA 2010-11-18 16:09:33 EST
Build Identifier:  I20100608-0911

I’ve been setting up headless tests for equinox based projects, and used ETF to do so; and, for a given project I  had a requirement to be able to launch several tests in several fragments and I ran into the following use case 
  
Example : 
project.A is the host plugin of the fragment project.A.test ; which has a test suite TestSuiteA referencing several tests. 
project.B is the host plugin of the fragment project.B.test ; which has a test suite TestSuiteB referencing several other tests. 
  
In this particular case, if I use ETF as is (3.3.100)to launch those 2 test suites, I have to create a plugin test (projectC) referencing those 2 test suites. 
If I do so, then the test suite in projectC will not be able to access project.A.test and project.B.test testsuites; because fragments can not export their own packages... 
To make it work, I have then to transfoem project.A.test and project.B.test into plugin tests; but if I do so I have to export the packages containing the classes under tests in projectA and projectB --> and sometimes, it’s not a good idea to export packages; even more if the classes inside are supposed to be internal classes... 


Reproducible: Always

Steps to Reproduce:
See details for full use case
Comment 1 Anthony Dahanne CLA 2010-11-18 16:13:07 EST
Created attachment 183427 [details]
enables ETF to run multiple test suites, acrosss multiple test fragments

So I decided to come up with this patch, allowing the user to launch in the runtime several testsuites for several fragments. 
You can launch it this way : 
Java –jar eclipse/plugins/launcher*.jar –application org.eclipse.test.coretestapplication 
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,C:\tmp\results   -testpluginsnames com.compuware.etf.hello.test,com.compuware.etf.goodbye.test -classesnames com.compuware.etf.hello.AllTests,com.compuware.etf.goodbye.AllTests -noExit -console 
  
You will notice 
•that I give in the formatter a directory to receive the results (instead of an XML file; because each test suites will have its own xml results file) 
•the new –testpluginsnames 
•the new -classesnames 
  
The cool thing about this change is that it does not break the older builds using the conventional ETF syntax. 
I’ve also been thinking about making ETF able to auto discover test suites in a runtime, so that we would need no configuration at.
Comment 2 Kim Moir CLA 2010-11-22 15:20:43 EST
Since this patch is greater than 250 lines, I opened an ipzilla to allow the Eclipse foundation legal department to review it

https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4657
Comment 3 Anthony Dahanne CLA 2010-11-22 17:50:57 EST
Created attachment 183621 [details]
enables ETF to run multiple test suites, acrosss multiple test fragments --NO FORMATTING ISSUE

Hello,
The patch I submitted last week was longer than 250 lines because of formatting issue (I let my IDE reformat all the class).
Now I recreated the patch, without the extra lines due to formatting, it's about 150 lines long.
Sorry for the time spent because of this error...
Comment 4 Kim Moir CLA 2010-11-23 20:18:56 EST
Thanks for the contribution. I ran a test build with this today and our tests seemed to run fine. This has been released for N20101123-2000.
Comment 5 Dani Megert CLA 2010-11-24 03:36:44 EST
I've seen the change in HEAD: it is missing the copyright info in the header along these lines:
Your Name <email@example.com> - Bug Title - https://bugs.eclipse.org/BUG_NUMBER
Comment 6 Kim Moir CLA 2010-11-24 09:23:24 EST
Created attachment 183757 [details]
patch to update copyright
Comment 7 Kim Moir CLA 2010-11-24 09:23:25 EST
Created attachment 183758 [details]
mylyn/context/zip
Comment 8 Kim Moir CLA 2010-11-24 10:04:27 EST
Tagged for next i-build.  Thanks for the contribution to eclipse!
Comment 9 Anthony Dahanne CLA 2010-11-24 10:18:47 EST
Thank you for reviewing this patch !
Will it be available through a p2 repo ?
Thanks again !
Comment 10 Kim Moir CLA 2010-11-24 10:53:22 EST
Yes, the org.eclipse.test bundle will be available in our 3.7 stream update sites, starting with the nightl build tonight.

http://wiki.eclipse.org/Eclipse_Project_Update_Sites