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

Bug 352311

Summary: Initial code for the JUnit discoverer migration
Product: [Modeling] MoDisco Reporter: saurav sarkar <saurav.sarkar1>
Component: UseCasesAssignee: Project Inbox <modisco.web-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P4 CC: gdupe
Version: 0.9.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Code for the Junit discoverer for JUnit 3 none

Description saurav sarkar CLA 2011-07-18 04:12:25 EDT
Created attachment 199811 [details]
Code for the Junit discoverer for JUnit 3

Hi All,

I was trying to migrate the already exsisting Junit discoverer to the new Discoverer framework using the EMF facets.
I could migrate the discoverer for Junit 3.
This works on a Java Project.It discovers the Junit model from the Java project.

Changes made

• The Discoverer works on the new discoverer framework.
• Old code has been migrated to suit the new discoverer framework code.
• I have added one more facet reference called AssertCalls which will also find out how many assert calls were made from a particular test method.
• Changed the Query to recognize the test suite

Open points
• Facets for Junit extensions are not yet added like nbTests etc.
• The test model loads the full model including the parent java model

I would also need to write a similar discoverer for JUnit4.I guess I would need to write some more Java Model queries for JUnit4.
I have attached the Junit 3 discoverer code.Please review the same and provide your comments.
I would modify if any changes are required.Once I get a green signal I will start working on the JUnit4

Let me know if there is any problem to open the code.

Cheers,
Saurav