It's not a secret anymore!
The moose likes Testing and the fly likes Junit life cycle Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » Testing
Reply 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: 26184
    
  66

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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Junit life cycle
 
Similar Threads
Threads
Threads
servlet life cycle
life cycle in different scopes
What is the life cycle of Bean instances?