Reputation: 5793
First time I am trying Junit and I am following below link: http://www.vogella.de/articles/JUnit/article.html
When I run my testClass as Run-As-> Junit Test. It says below thing. Please help me in figure it out.
Could not launch the JUnit plug-in tests because project 'SalesTax'
is not a plug-in project.
SalesTax: Is the Project Name
Upvotes: 1
Views: 1665
Reputation: 4164
I suspect you did create an Eclipse 'jUnit Plugin Test' launch configuration which is designed to run Eclipse plugins jUnit tests (in some kind of mocked eclipse environment).
Try to create a simple 'jUnit' launch configuration instead.
Upvotes: 1
Reputation: 121619
Suggestion - Follow the tutorial. type in the (3-line) example "MyClassTest" from the tutorial. Verify that you can get the tutorial working. Post back with any questions about the tutorial.
Once you get one complete example working, end-to-end (your code, your JUnit test code, and successfully building and executing at least one JUnit test in your IDE), then try to get your "SalesTax" project working.
Q: I presume you're using Eclipse, correct? Eclipse 3.7?
PS:
Here's another good tutorial:
http://www.ibm.com/developerworks/java/tutorials/j-junit4/
Upvotes: 0