In order to run TestNG tests on command line, I'll have to set TestNG in classpath. To do so, I went through -
Unable to execute TestNG Suite file via command line
Getting error Could not find or load main class org.testng.TestNG
which tells that if testng.jar is in lib folder of the project, then do set path until lib folder(like - C:\Workspace\projectname\lib\*) in classpath.
But in my case, I'm using Maven project and hence don't have lib folder to put jars. In this case, how can I set TestNG in classpath? And hence run TestNG tests on command line.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Hi,
You can use maven itself to execute your tests. You need to do following things to use maven:
- Add Testng as dependent jar with scope as "test".
- Use surefire plugin.
- Your test classes should be placed under src/test/java folder or configure your pom.xml to set test source directory.
-Varun
--
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/5d9d366d-311f-4f9f-a8f7-81c2a7cd4dd7%40googlegroups.com.