How to Write a Software Test Script
Software testing is one of the most important parts of the development life cycle. In basic terms, a test script is a set of instructions that is executed and documented to ensure the correct functionality of a software system. Test scripts need to be complete and thorough, but simple enough so that any average person can follow the steps. This article focuses on how to write an effective test script, with some examples at the end for reference.
- Difficulty:
- Moderately Easy
Instructions
-
-
1
Create a column in the test script for the step number. The steps are usually executed in sequential order (Step 1, Step 2, Step 3, etc.), but it is possible to skip around and/or refer back to a previous step if necessary.
-
2
Create a column in the test script for the step instruction. Instructions must be specific, but clear enough so that anyone can understand them. If an instruction contains a phrase with a conjuction, ("and then...", "or...", "but if..."), consider splitting it into two smaller steps.
-
3
Create a column in the test script for the expected result. Expected results describe the correct functionality and are typically affirmative statements. In other words, say, "The file is saved" instead of, "The file should be saved".
-
4
Create a column in the test script for the actual result. This field can contain detailed written results, or it can take the form of a simple Pass/Fail check.
-
5
Create a column in the test script for additional comments. This field is reserved for relevant specifications, modifications that were made to a certain step, explanations as to why a step failed, etc.
-
6
Test Script Example #1
Example #1: A (somewhat realistic) test script for making text bold in Microsoft Word 2003. Its steps are executed sequentially and it uses the Pass/Fail check in the expected results.
-
7
Test Script Example #2
Example #2: A (somewhat unrealistic) test script for preparing milk and cookies for Santa on Christmas Eve. Its steps are executed sequentially, although a reference to a previous step is made. It uses the Pass/Fail check, and contains an explanation as to why the final step failed.
-
1
Tips & Warnings
Test scripts can take on different forms. Some people prefer the flexibility of a standard text document (such as Microsoft Word), while others prefer the structured row/column format of a spreadsheet (such as Microsoft Excel).
Related Searches
Comments
-
mitul6285
Dec 16, 2008
This is nice to know about Test Script but i am looking for more details on this. thanks for this. but could you please get some more information on this. Thanks.