Bug 40598 - [JUnit] Allow to choose selected JUnit test cases to run
Summary: [JUnit] Allow to choose selected JUnit test cases to run
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 391243 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-22 11:01 EDT by Eugene Kuleshov CLA
Modified: 2013-06-22 00:20 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Kuleshov CLA 2003-07-22 11:01:49 EDT
Present JUnit view allows to scan whole project and it is able to find testcases
and test suites. Unfortunately it runs them all immediately.

Please add an option to scan project and show all existing test cases and test
suites and then allow to select test cases and run only selected ones.

It is even more important to have such feature if TestSuite generating testcases
dynamically based on some external test data. Consider the following code as an
example:

public class SomeTest extends TestCase {
    private String param;
    
    public SomeTest(String name, String param) throws Exception {
        super(name);
        this.param = param;
    }

    public void testSomething() {
    	assertNotNull(param);
    }
    
    public static Test suite() throws Exception {
        TestSuite suite = new TestSuite("NAUPDTRoundtrip");
        suite.addTest(new SomeTest("testSomething", "one"));
        suite.addTest(new SomeTest("testSomething", "two"));
        suite.addTest(new SomeTest("testSomething", null));
        return suite;
    }

}
Comment 1 Sebastian Davids CLA 2003-09-26 10:25:22 EDT
related to bug 36449
Comment 2 Eugene Kuleshov CLA 2003-09-26 10:35:00 EDT
I'd like to propose UI interaction to select tests.

When suite is choosen, test runner should scan it for testcases and then display
the whole tree in the UI. There should be a checkbox for each test in the tree
that allow to select it for the execution. There should be  buttons to select
and unselect all tests. And there should be button to run all selected tests and
also separate one (or just popup menu) to run currently selected test. So, once
scanned, that tree should stay in testrunner view UI and run/rerun actions
should just update testcase state in the tree and in detailed panel.
Comment 3 Eugene Kuleshov CLA 2004-07-23 11:36:22 EDT
Any chance to get this feature implemented in 3.1 release? Thank you.
Comment 4 Eugene Kuleshov CLA 2006-05-19 10:46:21 EDT
Erich, please reassign to the right person
Comment 5 Erich Gamma CLA 2006-05-19 11:21:36 EDT
thanks for the reminder Markus is now the owner of the junit integration
Comment 6 Lukas Eder CLA 2012-05-01 04:38:04 EDT
I would love to see this feature implemented too. Maybe the checkboxes suggested by Eugene are a bit of overkill, but if I could just multi-select elements in the JUnit runner view and then run just the selection, that would be great.

Today, I can right-click on a single test case and run just that. But often I'd like to run 3 tests that are somewhat similar. Being able to multi-select them with Ctrl-Click, and Shift-Click would be great!
Comment 7 Martin Mathew CLA 2013-06-22 00:20:42 EDT
*** Bug 391243 has been marked as a duplicate of this bug. ***