Writing test cases is obviously a large part of the overall software testing process, and is one of the key learning aspects of the higher level ISEB / ISTQB certifications like ISEB Intermediate and ISTQB Advanced. Although it sounds easy enough, writing and managing the test cases can be tricky for several reasons. For example, test cases must be fluid, because any time requirements are revised, or bugs are identified and fixed, the associated test cases must be revised as well. Additionally, especially in larger organizations, certain test cases are likely to be interdependent, and test cases could be used by the developers as well as the testers when a defect is being fixed.
Thus, the combination of potentially fluid requirements, interdependency, and diverse distribution mandates that the test cases be written in a way that accommodates these attributes. As such, there are a few best practices that should be followed whenever a test case is being written.
First and perhaps most obvious is the fact that the test cases should be written in a clear way, without any ambiguity. In other words, they should be in the correct sequence, always clearly map to expected results, indicate interdependencies, and be organized based on testing category and/or related parts of the application. Doing this will not only make the test cases easier to follow, but it will make it much easier to revise/update them.
Second, after all the initial test cases are written, go back to the beginning and review each one from the perspective of the tester. Make sure that no conflicts exist, that all references and mapping schemes are accurate, and that they are clearly written. Evaluate the test cases as if you are doing a dry run.
Finally, always write test cases with the end user in mind. End users must always be the focal point because they are the ones who will actually use the software application. Thus, pay special attention to those test cases that are most critical to the end-user’s actual usage of the application.
The bottom line is that software testing test cases can dramatically impact the overall success of any testing process, so it is very important to follow best practices when writing them. Spending a little more time and effort upfront to get these right will pay huge dividends down the road in terms of a much more effective and efficient testing effort.
Filed Under: Software Testing