2013年8月1日星期四

[Original] eclipse can not find run as junit

 

ran into this problem, torture me a good look!

 

root of the problem and solutions

 

First, ensure that there junit jar package, basically not make this mistake;

 

second, to ensure you that this class is Source can be compiled file , If this class in general folder, the project is not compiled it, it can not find the class.

 

guarantee this basic points can be implemented.

 

how to ensure that the second point:

 

first, to ensure that this class or this directory, not in this Excluded under. I came across this situation is the case, do not know when added to the list, Excluded files will not be compiled.

 

 

Second, a way to the Internet, but it must be the case under the premise of the first point.

 

If you are getting the above error message in Eclipse IDE , while running your test case, just make sure that you have the test class as a part of the "eclipse source folder" definition. Easiest way. Right click on the folder -> Build Path -> Use as source folder D one .

 

might encounter an error message

 

No tests found with test runner JUnit4

 

The input type of the launch configuration does not exist

 

 

tortured half, hereby record.

没有评论:

发表评论