Bug 529316 - [code mining] Provide JUnit Status/Run/Debug CodeMinings
Summary: [code mining] Provide JUnit Status/Run/Debug CodeMinings
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 528418 529127 530825 531779
Blocks:
  Show dependency tree
 
Reported: 2017-12-30 06:36 EST by Angelo ZERR CLA
Modified: 2019-02-14 05:20 EST (History)
7 users (show)

See Also:


Attachments
JUnit demo CodeMinings (532.08 KB, image/gif)
2017-12-30 06:37 EST, Angelo ZERR CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.