As far as possible, write test cases in such a way that you test only one thing at a time. Do not overlap or complicate test cases.
Attempt to make your test cases ‘atomic’.
Ensure that all positive scenarios and negative scenarios are covered.
Language: Write in simple and easy to understand language.
Use active voice: Do this, do that.
Use exact and consistent names (of forms, fields, etc).
Characteristics of a good test case:
Accurate: Exacts the purpose.
Economical: No unnecessary steps or words.
Traceable: Capable of being traced to requirements.
Repeatable: Can be used to perform the test over and over.
Re-usable: Can be reused if necessary.
Tips for Writing Effective Test Cases for Any Application:
Test Case Naming Conventions: Name the Test Cases so to represent the module name or functional area you are going to verify in that test case.
Description: Enter as much information as possible in Description!
Assumptions and Preconditions: Make sure to add as much information as possible for any conditions to be met before running the test case.
Input Test Data: To make your life easy as a tester (and your fellow-testers!), wherever applicable, you can give Test Data to be used for the Test Case within TC Description or with the specific Test Case step. This saves a lot of time in the long run as you won’t have to hunt a new test data every time you need to execute the test.
Cover all Verification Points in Test Design Steps: The Test Design Steps should not only cover the functional flow but also each verification point which should be tested!
Attach the Relevant Artifacts: Wherever possible you should attach the relevant artifacts to your test case.
Expected Result: Each test design step should clearly mention what you expect as outcome of that verification step. So, while writing test cases, mention in detail what specific page/screen you expect to appear after the test and or any changes you expect to be done to any back-end legacy systems or Database. You can also attach screenshots or specification documents to the relevant step and mention that the system should work as outlined in the given document to make things simpler.
Legible & Easily Understandable by Others: You should write Test Cases that:
Are Simple and easily understandable by everyone (including YOURSELF!)
Are to-the-point! You don’t have to be writing essays! (wherever you feel any Test Case is going beyond a certain amount of steps, feel free to break it into a new Test Case)
Still have enough coverage
Review: Review can be done by peer testers (termed as ‘Peer Review’), BA, developers,PM, product owners or any relevant stakeholders.
Re-usable: You should write test cases keeping in mind that they could be re-used in the future for some other project/teams. On that note, before writing a new Test Case for your project/module, always try and find out if there are Test Cases written already for the same area. That really saves a lot of time!
Maintenance & Updates: Always consider updating the existing Test Cases (if any) before you start writing New Test Cases!
Post Conditions: Post-conditions basically specify the various things that need to be verified after the Test has been carried out. In addition, post-conditions are also used to give guiding instructions to restore the system to its original state for it not to interfere with subsequent testing.