Community
Participate
Working Groups
The JUnit launcher is capable of finding and including all tests in a single project, but it is not possible to select multiple projects. This makes testing very componentized projects from within Eclipse awkward.
The Junit launcher can run only one project at a time as each project has its classpath. Only if the project are connected, e.g as a project is a required project of another then this would be possible. Wouldn't it be easier to create a TestSuite that calls all your tests instead of running JUnit on the project? Introduce a 'required' releationship so that the test suite can also call tests in the required project. Setting to WONTFIX for the reasons explained in the first section.
reopen.
Running the Junit launcher on a project should also find all tests in required projects, I think.
(In reply to comment #1) > The Junit launcher can run only one project at a time as each project has its > classpath. Only if the project are connected, e.g as a project is a required > project of another then this would be possible. This seems like an implementation detail. At the high level, the JUnit launcher, if run against multiple projects, should be able to run each per-project test set individually and then aggregate the results.
The implementation running all tests of all selected projects with their own classpath and show the aggregated results would solve a major issue we currently discuss with handling our test suites.
I need support for JUnit testing in a multi project setting (equinox). I have a initial implementation that can be useful for this bug: svn://shalma.org/shalma/trunk/org.shalma.junit svn://shalma.org/shalma/trunk/org.shalma.junit
*** Bug 215325 has been marked as a duplicate of this bug. ***
(In reply to comment #6) > I need support for JUnit testing in a multi project setting (equinox). I have a > initial implementation that can be useful for this bug: > svn://shalma.org/shalma/trunk/org.shalma.junit > svn://shalma.org/shalma/trunk/org.shalma.junit I'm not able to access that repository. "Connection timed out"
I've stopped the development of this project (now is hosted in google). You can check out the code in http://code.google.com/p/shalma as org.shalma.test bunde.
I have started an Eclipse plugin, that already has some rudimentary functionality implemented. See http://sourceforge.net/projects/e-rat/ Feedback would be welcome.
I'd really like this feature. We have multiple projects and I'm trying to separate the junit-plugin tests from stand-alone unit test (ie put them in different source folders within the projects concerned). I'd ideally like to be able to create a shared run configuration for all unit tests in '<project>/unitTests/src' for a set of projects. It would be nice if eclipse supported doing this, we've resorted to writing our own test gathering monster which has issues shall we say...
*** Bug 298584 has been marked as a duplicate of this bug. ***
*** Bug 258943 has been marked as a duplicate of this bug. ***
I'm working on a huge project containing several project set files and all in all ~80 eclipse projects. Currently we have located all our unit-tests in a separate unit-test project but are going to move them to the single projects (to be more component oriented). --> Please - in addition to "run a single test" and "run all tests in the selected project, package or source folder" provide as well the selection "run all tests in the selected project set" and "run all tests in the workspace"
*** Bug 346429 has been marked as a duplicate of this bug. ***
Different projects can have different requirements regarding memory allocation, JRE used, etc. . Bug 39900 should help running multiple launch configurations at once. For this bug we'll go with comment 3: > Running the Junit launcher on a project should also find all tests in required > projects, I think. The default will stay to launch only tests that are directly contained in the project, but it shouldn't be too hard to add a checkbox like this: [ ] Also run tests from referenced projects
(In reply to comment #16) > [ ] Also run tests from referenced projects IMHO that's not enough. I'd like to easily run all unit-tests in all of my eclipse projects at once, not only those referenced by a specific project. One usually hasn't one project which references all other projects. We have already implemented a similar solution for running tests from referenced projects (by providing a find-all-tests-in-classpath test suite). Nevertheless people tend to forget adding new test projects to the all-tests-referencing-test-project
(In reply to comment #16) > [ ] Also run tests from referenced projects Just another thing to bear in mind, a lot of us put our unit tests into a fragment on a per-bundle basis.
Any news on this topic? In the meantime we have run into the windows classpath restriction - i.e. we no longer can run all unit-tests in our projects at once (not even with our workaround)
(In reply to comment #19) > Any news on this topic? Nope. We won't work on this unless there's a good quality patch to review.
There's a fairly matured code quality plug-in that features MultiProject JUnit runner - which seems to be just what this request aims at. https://marketplace.eclipse.org/content/project-usus
Please check if an Eclipse Launch Group will help here: https://www.eclipse.org/eclipse/news/4.7/platform.php#launch-groups
A Launch Group can certainly execute multiple JUnit configurations but it does not aggregate the results. You have to remember to check the test result history to see potential errors.
*** Bug 559125 has been marked as a duplicate of this bug. ***
(In reply to Balz Guenat from comment #23) > A Launch Group can certainly execute multiple JUnit configurations but it > does not aggregate the results. You have to remember to check the test > result history to see potential errors. Additionally a launch group will run the tests of different projects in parallel, which might lead to weird results.
btw - there was a project called ClassPathSuite which more or less automated the solution of referencing all projects from a super-project. Unfortunately it does not run with JUnit 5. I wonder how people can possibly work with eclipse on larger projects consisting of several modules. Don't they write tests or don't they run the tests in eclipse? IMHO this bug makes eclipse useless for professional development.