Fresh Tips On Writing A Solid Test Case

Some would argue that bug reports are more important, others the test case. Either way, it is critical to know how to write an in-depth test case.
Written by
Ben Fellows
Published on
July 22, 2020

Software testing is not just IT and numbers, there is a considerable amount of writing too. From bug reports, to tickets, writing follows testers everywhere. One of the best examples of solid writing from testers is the test case. If you write a garbage test case, it is going to be difficult for any other tester to follow along, leading to poor quality testing.

What is a Test Case?

A test case is a useful tool to help testers throughout the testing process. It is used to validate whether or not a software application is functional and free of bugs. When writing test cases, it is useful to have basic writing skills, focus on details, and an in-depth understanding of the software application. 


A good test case will include steps, data, and the conditions for the test to verify the requirements. It can include specific variables that will help the tester to understand and check the expected vs. actual results, allowing for a thorough understanding of the software products usability and functionality for the customer. 


Why write a Test Case?

Not every tester believes that writing a good test case is important, most of the time the focus is actually on the testing and not the setting up or planning process. Test cases can then be written with very little care which leads to bad quality test cases. By writing a strong test case, this will allow for any tester to understand and execute the test. Writing a solid test case in the beginning will save time, money, and energy later down the road. It can be time consuming, but will be worth the extra effort. 


How to write a Test Case

In order to write a good test case, keep it simple and distinct. Write as if the user had never seen or used the software before in their lives. By writing in a simple and easy to understand manner, it allows for the tester to achieve strong results from the test in order to see the software is functioning properly. Allow the test case to be written in an active voice instead of passive and have clarity in your steps. 

Some of the key characteristics of an awesome test case are:

  • Written through the lens of a new user who has never used the software before: Users are going to try and take the easiest way through things so keep this in mind when writing the test plans and include any eventuality that you might think that a user could possibly do. 
  • Include positive and negative scenarios (in addition to any abnormal or unusual ones): With every positive scenario, you have to acknowledge that most will have a negative one as well. Include any of the abnormal steps that you might think a user would do. 
  • Must have preconditions and any assumptions included: if there are any assumptions about the test or preconditions that must be met before the testing can begin, include them here. This information might pertain to what page of the application the software should test or any sort of special setup that needs to be conducted before testing can get underway. 
  • Update your test case if any bugs are found during exploratory testing: If there are any bugs that are found during exploratory testing that might impact the test case being written, include those bugs so that the testers can know to watch out for it.
  • Focus on the usability: when writing out a test plan, try and ensure that it is written in the user flow versus the actions on the page. Think of yourself as a first timer to the application and where you would navigate to. 
  • Need documentation: You must include all documentation for the testing. This includes testing environments, login credentials, reporting platforms. The master documentation should have all the information necessary for that tester to complete the test case. 
  • Clarity in communication: there should always be clarity in testing communication, but it is essential for writing test cases. A head tester might write a test case for another tester, but if the language is sloppy or unclear that tester will have to be constantly asking for clarification, slowing down the entire process. 
  • Make it reusable: the best test cases are the ones that can be used over and over again. Try and write the test case so that it can be slightly modified to fit other testing scenarios and you will save yourself a lot of time in the future


Example of a Test Case

Writing your first test case can be filled with pitfalls and quicksand. We are giving you one of our test cases so that you can see how to structure and write it. We currently use a platform to write the test cases, but Excel or other such documents can work fine too. Regardless of the writing platform, every test case needs to have:

  • Test Case Title
  • Objective of the test case
  • Preconditions
  • Test data
  • Test steps
  • Expected results
  • Pass/Fail
  • Comments

Below there is an example of a test case written out in Excel. However, here at Loop, we have found that there are a range of test plan tools online that serve the same function as Excel but manage test cases better and allow easy adaption. Our choice is Testpad (not sponsored or affiliated, just love!), but it is up to your organization to chose the best option for you. Test case writing does not need to be hard and the more you practice, the better you will be.


Concluding thoughts…

Writing test cases can take time and a little extra thought, but by having a well-written test case you can find the gaps in the software design earlier, pick up on any usability issues, learn more about the software product and new testers can easily jump into testing without any hand-holding. A good set of test cases can make a world of difference in the testing process.


Free Quality Training
Enhance your software quality for free with our QA training and evaluation. Sign up now to boost your team's skills and product excellence!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.