It's possible I'm losing my mind, but this morning when I upgraded to Eclipse Kepler I tried to run unit tests for multiple Eclipse projects at the same time and failed. I selected multiple projects, opened the right-click menu and the "Run as..." options were gone.
"Damn Kepler!" I thought and fired up my old Juno install to convince myself the behaviour had changed. However, it didn't work in there either.
I'm now questioning my sanity over whether this was ever truly possible. Many other Stack Overflow questions and other sites suggest this is a difficult, if not impossible task. However, I'm so sure I was doing this in the recent past that it's left me a little rattled.
So... has this even been possible, either in Kepler or Juno? Can anyone suggest a popular plugin that might have enabled that feature (which I incorrectly assumed to be default behaviour)?
Background: I have a multi-module Maven project managed through m2e and expected I could select several of the projects and run all the unit tests.
You can perform JUnit tests across multiple projects using Classpath Suite. In general all you need to do is:
Write a suite:
@RunWith(ClasspathSuite.class)
public class MySuite
Take a look on this article: Roger Rabbit - JUnit Tests Runner Across Multiple Projects, it includes a step by step example and a code sample.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With