Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to test a specific method with JUnit?
How to test a specific method with JUnit? [message #766947] Fri, 16 December 2011 17:58 Go to next message
Javak  is currently offline Javak Friend
Messages: 26
Registered: November 2011
Junior Member
Hi all,

I am struggling to find a way to run a JUnit test for a particular method of a class. What I found now is Run the test class as a JUnit test, then I can select to run an individual method, but then other methods disappear...

Thanks.
Re: How to test a specific method with JUnit? [message #767204 is a reply to message #766947] Sat, 17 December 2011 09:57 Go to previous messageGo to next message
Dieter Willems is currently offline Dieter WillemsFriend
Messages: 3
Registered: December 2011
Junior Member
You can right click on the test method name and choose run as / debug as junit. You can also create a run/debug configuration for you unit test. You then need to choose run a single test instead of run all tests in the selected package.

Hope this can help you out.

Re: How to test a specific method with JUnit? [message #770551 is a reply to message #767204] Sat, 24 December 2011 16:06 Go to previous message
Javak  is currently offline Javak Friend
Messages: 26
Registered: November 2011
Junior Member
Thanks, I can run an individual method of my test class in the Outline view.
Previous Topic:Wrong
Next Topic:deleted
Goto Forum:
  


Current Time: Fri Apr 26 16:20:06 GMT 2024

Powered by FUDForum. Page generated in 0.03096 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top