This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Testing and the fly likes Junit life cycle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Junit life cycle" Watch "Junit life cycle" New topic
Author

Junit life cycle

Ray Kumar
Greenhorn

Joined: Jan 22, 2002
Posts: 17
Hi

What is the life cycle of Junit testing ?

Thanks in advance
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Are you talking about the lifecycle of the JUnit TestCase objects or the lifecycle of how you write and run unit tests?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Ray Kumar
Greenhorn

Joined: Jan 22, 2002
Posts: 17
I mean, Testcase life cycle. Thanks
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Ray,
For each test method in a test case, the setUp() method is called, followed by the test itself, followed by the tearDown() method. If you have multiple tests in a test suite, all of the tests are run using the method described in the previous sentence.

For more details, see the cook's tour article.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
 
subject: Junit life cycle
 
Similar Threads
Threads
What is the life cycle of Bean instances?
life cycle in different scopes
Threads
servlet life cycle