Reputation: 341
I'm pretty inexperienced with both eclipse and junit tests, so this could be a really stupid question...
When I try to run my junit test by clicking run as -> junit test, nothing happens. The console is empty, the JUnit tab shows nothing, and in the Progress tab there is a message "Launching Finished at . communication does not exist".
What does this mean? When I run a clean package on the project, with "Skip tests" unchecked, it runs the tests, and they all pass. But I don't like to run the tests this way. It is more time consuming, and I don't get the detailed information about the tests that one gets from running them as Run As -> junit test.
Any ideas what could be wrong? I've tried googling the "communication does not exist" message, but to no avail.
Update: I've made the following test just for checking whether junit works:
@Test
public void myTest() {
assertTrue(true );
}
When I run the clean package with "Skip tests" unchecked in the run configuration, the test runs fine. That is, I get output
Running Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
When I change the test so assertTrue(false), it fails as expected, and the output from clean package is that it failed, with a stacktrace.
The only thing happening when I right-click the test (and class name, I've tried both), is in the Progress and JUnit-tab, pictures below:
Arg, seems like the pictures won't open for some reason. but in summary, in the Junit tab, nothing shows, it just says runs : 0/0, Errors:0 Failures:0, and nothing more. In the Progress tab, I get the "Launching (Finished at 08:13), and on the line below, "communication does not exist".
Upvotes: 4
Views: 4741
Reputation: 21
In my case in run configuration I put it as junit4 ran well
Upvotes: 2