0

Is there any way that we can provide command line argument in JUnit or TestNG tests?

Mike Laren
  • 8,028
  • 17
  • 51
  • 70
neerajhatwal
  • 31
  • 3
  • 9
  • 3
    You could look at this post http://stackoverflow.com/questions/2884163/pass-command-line-arguments-to-junit-test-case-being-run-programmatically – HJK Apr 29 '15 at 11:49
  • Do you want to pass parameters to the JVM (e.g. -Dsome.property=foobar) or in the way they would be passed to the `main` method (e.g. java YourApp someArgument)? – SubOptimal Apr 29 '15 at 11:55
  • Sorry for the late reply.i want to pass some argument in vm argument in eclipse and retrieve from my test class. – neerajhatwal May 07 '15 at 05:42

0 Answers0