“ A set of test inputs, execution conditions, and expected results developed for a particular objective, such as to exercise a particular program path or to verify compliance with a specific requirement.” (IEEE)
In General a test case basically is a brief statement of something that should be tested
The basic objective of writing test cases is to validate the testing coverage of the application. If you are working in any CMMI company then you will strictly follow test cases standards. So writing test cases brings some sort of standardization and minimizes the ad-hoc approach in testing.
Write test cases before implementation of requirement
Test cases are written for all the requirements. Test case should map to current requirement and should not be an enhancement to the application.
Follow a standard template for all test cases
Use very simple English and general words
Format followed( Alignment, Naming convention etc) by test cases should be uniform for the entire application
All the scenario/Test Case should be easily understable,clear and to the point
Highlight important points by making text bold or assigning it a color or writing it in different font
You may add sections to a group of test cases to make it more informative
You may use double quotes for a particular display text
Maintain the test cases in a flow so that execution order is maintained and time is saved. Whenever a new scenario/test case is been added between two existing one it should be named after the previous scenario/Test case Id with decimal places ie.,if we have added new scenario between ID ST-SA–BKG-0015,then new scenario ID will be ST-SA-BKG-0015.1
There’s no simple formula or prescription for generating “good” test cases.
There are tests that are good for your purposes , for bringing forth the type of information that you’re seeking.
Given a purpose, we can evaluate tests as better or worse along several dimensions , in terms of how they advance that purpose.
Many test groups stick with a few types of tests. To achieve the broad range of value from our tests, we have to use a broad range of techniques, consciously selected to help us achieve our information goals.