Hello Cedric
My bad. Although the excluding line is printed:
[testng] [XmlMethodSelector] Including group : Monitoring
[testng] [XmlMethodSelector] Excluding method
com.sun.glassfish.tests.configuration.openBrowser()
the openBrowser method is in fact executed as seen in later output:
[testng] ======
[testng] TESTCLASS:
com.sun.glassfish.tests.configuration.AdminMonitoringServiceTests
[testng] [TestClass] BeforeClass :
com.sun.glassfish.tests.configuration.AdminMonitoringServiceTests.openBrowser()
[testng] [TestClass] Test :
com.sun.glassfish.tests.configuration.AdminMonitoringServiceTests.testLoadDefaultMonitoringService()
[testng] [TestClass] Test :
com.sun.glassfish.tests.configuration.AdminMonitoringServiceTests.testSimpleModifyMonitoringService()
[testng] [TestClass] AfterClass :
com.sun.glassfish.tests.configuration.AdminMonitoringServiceTests.stopTest()
[testng] [TestClass]
[testng] ======
All is when selecting included groups in testng.xml file, as noted in
my previous post! However, I cannot get the right group executed when
specifying group in ant. In this case group definition (annotation)
is only in java test file and my testng.xml has the following:
<test name="JMSTest">
<classes>
<class
name="com.sun.glassfish.tests.jms.AdminJMSDestinationResourceTests"/>
</classes>
</test>
<test name="ConfigurationTest">
<packages>
<package name="com.sun.glassfish.tests.configuration"/>
</packages>
</test>
I'm still trying to execute "Monitoring" group, as annotated in one
class in com.sun.glassfish.tests.configuration package. Here is an
example from build.xml file:
<target name="run-monitoring" depends="start-selenium-server,compile"
description="Run Selenium Admin GUI Monitoring Tests">
<testng suitename="Admin GUI Monitoring Tests"
classpathref="runtime.classpath"
listeners="org.uncommons.reportng.HTMLReporter"
groups="Monitoring"
The above does not work as expected, as it executes all the tests in
all the packages/classes. Do I need to define all the annotated
groups in testng.xml file, as below, to get it working from ant?
<test name="ConfigurationTest">
<groups>
<define name="monitoring">
<include name="Monitoring"/>
</define>
</groups>
<packages>
<package name="com.sun.glassfish.tests.configuration"/>
</packages>
</test>
Thanks
Lidia
> >
testng-users...@googlegroups.com<
testng-users%2Bunsu...@googlegroups.com>
> > .