3
  1. My Project dosnt have a bin folder
  2. Have tried the following:

D:>java -cp "Pathtolibfolder\lib*;Pathtobinfolder\bin" org.testng.TestNG testng.xml

Any Ideas?

2
  • whats the error you are getting? Commented Jan 17, 2017 at 17:48
  • @Maciej Kowalski thanks for the prompt response, it says it cant locate the bin directory, my project is a maven project so dosnt have a bin folder? Commented Jan 17, 2017 at 17:56

1 Answer 1

4

If you are using Maven then i would simply use the surefire plugin and run tests as part of the build:

<plugins> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>RELEASE</version> <configuration> <suiteXmlFiles> <suiteXmlFile>testng.xml</suiteXmlFile> </suiteXmlFiles> </configuration> </plugin> ... </plugins> 

Just specify the path to your testng.xml and take advantage of it if you can use this kind of configuration. It allows for tons of parametrization and i have used it extensively in my projects.

Check out this tutorial to get a hang of it: http://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html

Sign up to request clarification or add additional context in comments.

1 Comment

@Phil_P85 if the answer provided by Maciej worked, please help accept his answer.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.