1

I have a few testcases that are written using Selenium and JUnit. I would like to write a windows script to start the programs. I referred to the solution @ Simple Script to Run Java Applications on Linux and Windows. The solutions @ how to run junit test cases from the command line provide a method to run the Junit test cases using:

java -cp /path/to/directory/java/junit.jar org.junit.runner.JUnitCore [test class name]

I am however interested in creating a generic script for windows which would run the harness. I have little or no knowledge about the windows powershell, I would love to hear about a solution that could make use of powershell scripts to do the same.

Having said that, it would be great if you could guide me to do the same for Linux.

To summarize:

  • Windows script to run JUnit 4.x and Selenium programns
  • Approach to do the same in windows powershell
  • Similar script for Linux
Community
  • 1
  • 1
Segmented
  • 2,024
  • 2
  • 23
  • 44
  • 1
    How do you intend to handle all dependencies on all the different machines? Personally to accomplish what you are asking, I ask my users to install Maven, and then the script (for Linux or Windows or ...) becomes `mvn clean test`, all dependencies handled for you. – SiKing May 19 '14 at 18:21
  • Indeed: Maven is the easiest way, universal for Windows and Linux. – user1433852 May 19 '14 at 19:02
  • Thanks! I guess I would work on the direction... – Segmented May 21 '14 at 13:46

0 Answers0