java - Running JUnit tests from Terminal -


i have junit tests running in intellij fine. however, need run these same tests terminal. problem is, no matter do, error says:

junit version 4.10 not find class: com.mycompany.mytests 

i not know why not working. in attempt run unit tests command-line, i'm running following:

java -cp /applications/intellij\ idea\ 13.app/lib/junit-4.10.jar org.junit.runner.junitcore com.mycompany.mytests 

however, thing see error listed above. keep running command , down source directory. yet, no matter can't tests run command-line. yet, run fine within intellij. how tests run command-line in same way run within intellij? there way can view actual command(s) intellij runs when running junit?

thank you

somewhere there directory or jar holds 'com' directory root of application's package structure (com/mycompany). directory or jar needs added classpath through -cp flag using.

so example class in:

/workspaces/myproject/bin/com/mycompany/mytests.class

then need add /workspaces/myproject/bin directory classpath.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -