A test script is a set of directives that will be executed on the system to test if the system functions as expected or not.
A test script is the executable form of a test.
It outlines the set of activities to conduct a test and it describes the expected outcome and result, which is used to detect any abnormality in the actual behavior of the program from the logical behavior in the script (bugs found during the course of that test).
There are various means for executing test scripts.
In manual testing: These are more commonly called test cases.
In automated testing:
Last 2 types are also done in manual testing.
Also Read: Test Design, Test Case, Test Suite, Test Plan
Executable Test Script models use 3 main constructs:
Each test script must follow the path identified from the design and would be fairly easy to create if a design has been created.
Test Scripts are denoted by a series of steps, each step is given an id or sequence number, an action and a result.
Some test scripts are also represented with columns for pass/fail attributes during execution.
This is not actually an attribute of the test script but is an attribute of the specific execution instantiation of a test script.
Example: a script to save the current file in a word processor which has been saved before:
Step | Action | Result |
1 | Click on the file option of the main menu bar. | A drop down menu appears, one of the options is ‘Save’ |
2 | Click on the ‘Save’ option of the drop down menu. | The disk whirs and the date/time stamp of the file in explorer matches the time that the file was saved. |
Assuming you have gone through Test Cases and Test Suite , you now have all the information to prepare test case, test suites and test scripts.
Please help us make it more useful for you by sharing your feedback and suggestions.