You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andrew Swift <an...@balder.no> on 2008/04/22 09:38:00 UTC

TestNG and executing specific groups

I am unable to select which groups should be executed when using
maven2 with testNG.
>From the documentation it looks like this should be possible.

<build>
                <plugins>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.4</version>
                                <configuration>
                                        <skip>false</skip>
                                <includes>
                                        <include>**/*Test.java</include>
                                </includes>
                                <groups>unit</groups>
                                <excludeGroups>broken</excludeGroups>
                                </configuration>
                        </plugin>
                </plugins>
        </build>

Java code....

@Test(groups = { "unit, broken" })
        public void testSendPassword() throws Exception {
                impl.sendPassword(user,ip);
        }

        @Test(groups = { "unit" })
        public void testChangePassword() throws Exception {
                Assert.assertNotNull(user);
        }

        @Test(groups = { "broken" })
        public void testFindSrUserUserName() {
                Assert.fail("Not yet implemented");
        }
All three of these tests are run

thanks

Andy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org