What is a Test Case?
A test case is a set of conditions or variables and inputs that are developed for a particular goal or objective to be achieved on a certain application to judge its capabilities or features.
It might take more than one test case to determine the true functionality of the application being tested. Every requirement or objective to be achieved needs at least one test case. Some software development methodologies like Rational Unified Process (RUP) recommend creating at least two test cases for each requirement or objective; one for performing testing through positive perspective and the other through negative perspective.
Test Case Structure
A formal written test case comprises of three parts -
Information
Information consists of general information about the test case. Information has following things:
Test Case ID
Test Case Author/Creator
Test Case Version
Name of the Test Case
Purpose or brief description
Test Case Dependencies
Activity
In this area, we can include the test case pre-conditions if any. Means to executed some test cases first we need to create a condition. So we can include that in this part. Then comes environment means in which environment will the test case be able to be executed. Then in last we can include the detailed steps in order to perform the test.
Results
In this section, we can include the result related data for the test case. Means after performing the test what result did we get and what is the expected result for the test.
Designing Test Cases
Designing test cases is a time consuming job, but ultimately that helps to reduce the overall time taken to test any application. It also cuts off the time which is taken in unnecessary re-testing or debugging.
Test cases should be designed and written by someone who understands the function or technology being tested. A test case should include the following information:
Purpose of the test
Software requirements and Hardware requirements (if any)
Specific setup or configuration requirements
Description on how to perform the test(s)
Detailed steps for performing the test
Expected results or success criteria for the test
vital for your software testing plans as a lot of bugs, ambiguities, inconsistencies and slip ups can be recovered in time as also it helps in saving your time on continuous debugging and re-testing test cases.
I hope this will give a brief idea about Test Cases.