Loading ...
Sorry, an error occurred while loading the content.

Re: running junit test via command line

Expand Messages
  • tupari
    Your order of arguments is wrong. -D arguments must come before the main class. java -cp jarfile.jar -DinputFile=file.txt org.junit.runner.JUnitCore
    Message 1 of 2 , May 8, 2012
    View Source
    • 0 Attachment
      Your order of arguments is wrong. -D arguments must come before the main class.
      java -cp jarfile.jar -DinputFile=file.txt org.junit.runner.JUnitCore junit.test.to.run


      --- In junit@yahoogroups.com, "Law" <lawcab@...> wrote:
      >
      > Good Day,
      >
      > I have a test that runs on eclipse. It has parameter -DinputFile=file.txt. Now I want to run it at the command prompt. I built everything as a jar then run:
      >
      > java -cp jarfile.jar org.junit.runner.JUnitCore junit.test.to.run -DinputFile=file.txt
      >
      > But I get an error of Could not find class: -DinputFile=file.txt
      >
      > Am I doing something wrong?
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.