Not able to run the project as per testng.xml with maven
Not able to run the project as per testng.xml with maven
M
Posted on 17/09/2015
Hi
In module 9, you have mentioned that if I have to run the testng.xml through maven then I have to to do following changes in pom.xml. So below is my pom.xml configuration
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.18.1</version> <configuration> <suiteXmlFiles> <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile> </suiteXmlFiles> <!-- Skip the normal tests, we'll run them in the integration-test phase --> <skip>true</skip>
</configuration>
</plugin> </plugins> </build>
</project>
I have 2 classes AppTest.java and SampleTest.java but in testng.xml , I mentioned only 1 class so that I can see that maven runs my prgram as per testng.xml
When I fired the command mvn test then it runs my both the class i.e it is not running my project as per testng.xml
Please help me in running my project as per testng.xml
Attached is my project in zip format
M
Replied on 21/09/2015
use this cmd
[code:1edde5n9]mvn clean test -U -Pselenium-tests[/code:1edde5n9]
M
Replied on 10/10/2015
Thanks ..It worked
M
Replied on 06/12/2015
Hi
Again it stopped working . Please give me the solution