I would like to exclude some tests by their package- or classnames from being executed by atlas-integration-test. I tried this to do so:
Maven Failsafe Plugin and Profiles + Exclusions
<profiles> <profile> <id>skipSelenium</id> <activation> <activeByDefault>true</activeByDefault> </activation> <build> <plugins> <plugin> <artifactId>maven-failsafe-plugin</artifactId> <version>2.14</version> <configuration> <includes> <include>it/**</include> </includes> <excludes> <exclude>it/selenium/**</exclude> </excludes> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles>
atlas-integration-test -PskipSelenium
But it doesn't work. atlas-integration-test still executes every test located inside the it.*-Package. Does it has to do with atlas-integration-test? Do I miss something here? I tried as well to exclude by specific (and working) classpath (<exclude>**/*SeleniumIntegrationTest.java</exclude>) just to be sure it has nothing to do with some buggy notation. But no, the exclusion doesn't work.
I tried to categorize my tests as written e.g. here: https://weblogs.java.net/blog/johnsmart/archive/2010/04/25/grouping-tests-using-junit-categories-0. Same result, doesn't work :(
Why?
Thanks for your help!
Kind regards
Community moderators have prevented the ability to post new answers.
You should amend the plugin maven-amps-plugin (or amps-maven-plugin or maven-confluence-plugin, depending on which one is defined in your pom.xml) and define skipTests to true.
Actually, here is the doc, there is probably a variable which suits your needs, you will poke in the dark and it will be hard, but you're a brave man aren't you?
Thanks!
After some tries finally <testGroups> meet my requirements:
<testGroups> <testGroup> <id>no-selenium</id> <productIds> <productId>confluence</productId> </productIds> <includes> <include>it/net/**/*Test.java</include> </includes> </testGroup> </testGroups> <testGroups> <testGroup> <id>selenium</id> <productIds> <productId>confluence</productId> </productIds> <includes> <include>it/selenium/**/*Test.java</include> </includes> </testGroup> </testGroups>
I don't really understand why I have to define the element <testGroups> 2 times to get this groups work. If I have only one element the grouping itself doesn't work. Seems strange for me but maybe I missed something. But I am pleased, I got what I wanted :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.