*
The moose likes Testing and the fly likes what is test cases, and how to decide when to write them? 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 "what is test cases, and how to decide when to write them?" Watch "what is test cases, and how to decide when to write them?" New topic
Author

what is test cases, and how to decide when to write them?

Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 980
    
    2
i have a very basic question, what are test cases, when we write test cases, and for which methods?
i mean can i write test cases for my college project, how do i decide when to write test case?
also i wanted to now what are the types of test cases, like: performance test cases are written to measure performance, what else?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30123
    
150

Punit,
There are different types of test cases. A test case could be a Word document that you write to describe a scenario. It could be a JUnit class to automatically regression test. IT could be a test written in a QA tool.

You want your test cases to cover all the code. If you are a developer, JUnit test cases are better than Word documents because you can re-run them all at the click of a button.

Types include: functional, performance, regression, etc.


[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
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 980
    
    2
so basically test cases are which only checks that my written code is producing the expected output or not?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30123
    
150

Or performs in a certain way. Or stores data in a database. Or throws an exception. Or...
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 980
    
    2
okay, Thanks
 
Consider Paul's rocket mass heater.
 
subject: what is test cases, and how to decide when to write them?
 
Similar Threads
Build a file in Memory
how to write and run junit test cases in eclipse?
HelpNeeded
disabled assertion & performance
what does Test Driven Development Means?