Reputation: 11749
I am trying to export JUnit4 test case as runnable jar file through Eclipse IDE but running into problems.
The test case (exported as JUnit4 test) uses selenium webdriver to perform some GUI task.
I can launch it through Eclipse run configuration (as JUnit test) but when I try to export the same (so that it can be used independently by any third party) to runnable jar, the 'Launch Configuration' drop-down list of 'Runnable JAR File Specification' dialog box is empty.
Is there something missing? How to fix this.
Upvotes: 1
Views: 2150
Reputation: 3241
try:
public static void main(String[] args) {
JUnitCore jCore = new JUnitCore();
jCore.run();
}
But then again I don't know where you would read your results and so on.
Means you would need an output file or something.
Upvotes: 1