Actually, there is another "funky" option... I did this for JAX-WS
tests at one point (didn't commit it) so I could guarantee the test
ordering while trying to diagnose a failure that only occurred when
the tests ran in a certain order.....
Create a class like:
@RunWith(Suite.class)
@SuiteClasses( {
AegisTest1.class,
AegisTest2.class,
.....
}
public class AegisTest {
}
You need to rename all the tests to NOT end it "Test" so the default
surefire won't pick them up. This can actually speed things up as
surefire will fork for the entire suite of tests, not each test
class. (this assumes each test class does cleanup after itself fine
which isn't true for a lot of the system tests). It also is
"slightly" more involved to add new test classes as you have to update
the list in the suite. However, "mvn test -Dtest=AegisTest" would
work perfectly.
Dan
On May 18, 2008, at 9:49 PM, Daniel Kulp wrote:
On May 18, 2008, at 3:42 PM, Benson Margulies wrote:
Hmm, can we really have profiles at both the top, parent, level and
also in the individual projects?
Yea, you can have profiles all over the place. The trick it to
make sure everything is active when you want it.
That said, for this particular problem, there are a couple other
options to consider:
1) Change ALL the system tests over to TestNG from JUnit. TestNG
supports test groups and the surefire plugin can run just specific
groups. That's a ton of work though. I'm also not sure of the
state of running TestNG tests in eclipse or other IDE's.
2) In parent/pom.xml, define a property like:
<testPackage>**</testPackage>
and then change the surefire configuration to look like:
<include>${testPackage}/*Test.java</include>
..
Thus, from the command line, you could do:
mvn test -DtestPackage=**aegis
or similar. That's PROBABLY the easiest thing to do.
Dan
On Sun, May 18, 2008 at 1:45 AM, Glen Mazza
<[EMAIL PROTECTED]> wrote:
Can you keep everything as-is but just do your subdividing via Maven
profiles? Have the default profile run all systests, but give
yourself
an option to just test the Aegis stuff via -PAegis or whatever?
Glen
2008-05-17 Benson Margulies wrote:
In my opinion, the systests are getting unwieldy as a single lump.
While some of them test across lots of components, many of them are
focussed on a single component, but are in systest because they
want
to use components that come 'after' the component under test.
After making an aegis change, I'd like to run Aegis tests, and the
Aegis systests, and be done.
---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog
---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog