Bug 208862 - [JUnit] Provide a way to run all tests in a package and all sub packages
Summary: [JUnit] Provide a way to run all tests in a package and all sub packages
Status: REOPENED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 enhancement with 5 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-06 04:46 EST by Daniel Grob CLA
Modified: 2017-03-23 06:54 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Grob CLA 2007-11-06 04:46:14 EST
Currently it is possible to run all tests in a project, package or source folder. Please provide a way to run all tests in a package and all sub packages. Thanx!

Rationale: We use packages to organize our unit test. So the tests for a certain functionality are placed in a package and in corresponding sub packages. Now it is not possible to run all tests for a certain functionality with one launch configuration.

Example:
com.foo.func1.MyTest
com.foo.func1.dev.MyDevelopmentTest
com.foo.func1.integ.MyIntegrationTest
com.foo.func1.prod.MyProductionTest

I want to create a launch configuration that runs all 4 tests below the func1 package.

Workaround: Create an AllTests suite in com.foo.func1 but this is very error prone.
Comment 1 Olivier Thomann CLA 2007-11-06 06:51:58 EST
Move to JDT/UI
Comment 2 Martin Aeschlimann CLA 2007-11-06 07:05:21 EST
We recommend to use TestSuite to run multiple tests. This give you more control over what is ran and how it is run.
No plans to improve the current 'run package/project' functionality.
Comment 3 Daniel Grob CLA 2007-11-06 09:49:58 EST
> We recommend to use TestSuite to run multiple tests. This give you more control
> over what is ran and how it is run.

I agree that it is possible to create test suites. However this is
* Very, very error prone
   Whenever you add a new test you have to make sure that you adapt the corresponding suite as well. We often had the case that we missed some tests because someone forgot to adapt the corresponding test suite.
* Makes the possibility to structure your tests in packages somewhat obsolete
   (because you recommend to structure your tests by suites only and not by packages...)

In our case we don't need more control. The only thing we need is the ability to run all tests in a package including its sub packages. I consider this as an important use case whereas I rate the use case to run the tests in the package without the sub packages as not very common.

Could you please reconsider this feature request? Thanx!
Comment 4 Frank Musolf CLA 2017-03-23 06:54:19 EDT
+1