Disclaimer..!

Information contained in this blog is a merger of personal experience, replies by experts on Q&A blogs and info from several other technical blogs. It is purely intended to provide information related to a particular topic in one place. If anyone finds the content inappropriate, please feel free to add a comment. Thanks!

Wednesday, August 21, 2013

Run JUnit tests from terminal using Selenium server

To run JUnit tests from Linux terminal,
  • Change current working directory to the source directory of the files
  • To compile tests, run command
javac -cp ".:<path to selenium-server-standalone-xxx.jar>" SampleTests.java
  • To run tests, 
java -cp ".:<path to selenium-server-standalone-xxx.jar>" org.junit.runner.JUnitCore  SampleTests
In Windows, replace ":" in classpath with ";"

No comments:

Post a Comment