Bug 529316

Summary: [code mining] Provide JUnit Status/Run/Debug CodeMinings
Product: [Eclipse Project] JDT Reporter: Angelo ZERR <azerr>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: akurtako, daniel_megert, jjohnstn, mistria, pyvesdev, rgrunber, sarika.sinha
Version: 4.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 528418, 529127, 530825, 531779    
Bug Blocks:    
Attachments:
Description Flags
JUnit demo CodeMinings none

Description Angelo ZERR CLA 2017-12-30 06:36:12 EST
It should b ecool if JUnit test could provide codeminings to show as codeminings before an test method:

 * Status test
 * Run button to launch the test
 * Debug button to launch the test
Comment 1 Angelo ZERR CLA 2017-12-30 06:37:56 EST
Created attachment 272082 [details]
JUnit demo CodeMinings

Here a demo with my current work.
Comment 2 Noopur Gupta CLA 2018-01-19 05:31:04 EST
From the demo, it seems to add the status/run/debug on a method based on the @Test annotation. It should also work with JUnit 3 tests having no annotation and JUnit 5 tests which can have any composed annotation in place of @Test, test interface default methods etc. (see http://junit.org/junit5/docs/current/user-guide/).

For the test results, you should also think about the parameterized tests and dynamic tests from JUnit 5.
Comment 3 Angelo ZERR CLA 2018-02-28 04:29:54 EST
@Noopur thanks for your information. IMHO I think Junit core should provide a isTestMethod(IMethod method). I have created a bug for that https://bugs.eclipse.org/bugs/show_bug.cgi?id=531779
Comment 4 Angelo ZERR CLA 2018-11-23 07:44:04 EST
@Noopur do you think we could integrate this issue in 4.10? If yes I will start to create a gerrit patch.
Comment 5 Mickael Istria CLA 2018-11-23 08:03:37 EST
(In reply to Angelo ZERR from comment #4)
> @Noopur do you think we could integrate this issue in 4.10? If yes I will
> start to create a gerrit patch.

I think we already have enough critical stuff related to references/implementations code mining to fix for 4.10 before adding this new use-case. Adding JUnit mining would cascade to discovery and need to fix several bugs (which is fine), but we don't really have enough time to grow the list of bugs to fix before the release.
I think 4.11 is a better target both technically, and also as it's be a nice thing to add to the N&N (which already looks nice with references/implementations for 4.10).
Comment 6 Noopur Gupta CLA 2019-02-07 03:12:19 EST
This can be taken up after existing open bugs related to code minings are fixed.