aspose file tools*
The moose likes Testing and the fly likes Run as Junit Test case Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Run as Junit Test case" Watch "Run as Junit Test case" New topic
Author

Run as Junit Test case

Suresh Vasa
Greenhorn

Joined: Feb 04, 2011
Posts: 5
Hello

I have a JUnit Testcase in my project, When I right click on it , I should see Run As -> JUnit Test Case, but I am seeing only 'Run Configurations',
Any help is appreciated. Thanks
Suresh Vasa
Greenhorn

Joined: Feb 04, 2011
Posts: 5
sorry, btw I am using Eclipse(Helios).
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Does your test case contain any tests?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Suresh Vasa
Greenhorn

Joined: Feb 04, 2011
Posts: 5
I have a TestingSuite*.java and it contains a number of methods which extends ultimately a JUnit test case. When I right click on one of those methods in the outline and go to Run As >, I should see not only Run configurations, but also JUnit Test...,which I am not seeing..

Thanks
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You have a TestSuite that extends TestCase? Is that not a little bit confusing?

Do you have a JUnit library defined for you project?
Suresh Vasa
Greenhorn

Joined: Feb 04, 2011
Posts: 5
I have a testsuite which contain testcases, not the test suite, but the test cases extend junit test case. BTW how to check if Junit library is defined for my project?

Thanks
Suresh Vasa
Greenhorn

Joined: Feb 04, 2011
Posts: 5
I could resolve it with some hints from my friend. Basically, the project in my workspace is not configured as a project like a Java Project or a Web Project. It just stayed there as a resource. That's why all java related functionality was not applied to that resource. When I configure a new project using that resource, I could get the JUnit tests showing up. I know it's quite basic. Just sharing the info here for people like me
tom pine
Greenhorn

Joined: Mar 10, 2011
Posts: 3
interesting for me,thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Run as Junit Test case