[aerogear-dev] UPS unit tests

Karel Piwko kpiwko at redhat.com
Thu Jan 29 06:39:00 EST 2015


> Totally out of the blue, but is there a way to annotate test classes
> to make them run iff there is a flag set?  
> If you put integration-tests in a different folder then you will also
> have to tell maven about them in the testSourceSet stanza which will
> cause them to get run anyway.  (And if they aren't in source set for
> the default profile I'm not sure IDEs will pick them up)(Unless there
> is a third source set type I'm not familiar with)

Yes, this is possible. You need to group your tests and then maven
surefire can reference these groups - note that IDE will not pick
surefire configuration but you can still set groups and excluded groups
by system properties in Test Configuration.

That's exactly what we are doing in UPS testsuite, for instance we don't
want to execute UI tests by default:

More here:
https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests/blob/master/pom.xml#L60
https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests/blob/master/pom.xml#L275-L276
https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests/blob/master/src/test/java/org/jboss/aerogear/unifiedpush/admin/ui/test/PushServerAdminUiTestCase.java#L41

Karel






More information about the aerogear-dev mailing list