A test script in software testing is a set of instructions that will be performed on the system under test to test that the system functions as expected.
There are various means for executing test scripts.
- Manual testing. These are more commonly called test cases.
- Automated testing
Short program written in a programming language used to test part of the functionality of a software system. Test scripts written as a short program can either be written using a special automated functional GUI test tool (such as HP QuickTest Professional, Borland SilkTest, and Rational Robot) or in a well-known programming language (such as C++, C#, Tcl, Expect, Java, PHP, Perl, Powershell, Python, or Ruby).
- Extensively parameterized short programs a.k.a. Data-driven testing
- Reusable steps created in a table a.k.a. keyword-driven or table-driven testing.
These last two types are also done in manual testing.
A test script is a short program written in a programming language used to test part of the functionality of a software system. A written set of steps that should be performed automatically can also be called a test script, however this is more correctly called a test case.
Any test that is written as a short program is regarded as an automated test. Test scripts written as a short program can either be written using a special manual functional GUI test tool or in a well-known programming language (such as C++, C#, Tcl, Expect, Java, Perl, Python, or more recently, Ruby). Automated test tools can test many areas of system functionality such as the user interface, performance of the system, the system code and the requirements.
Automated testing has the advantage over manual testing in that it is easily repeatable, and thus is favoured when doing regression testing. This however is not always the case as automated tests may be poorly written and can break during playback. Since most systems are designed with human interaction in mind, it is good practice that a human tests the system at some point.
Test case: a logical description of a test. It details the purpose of the test and the derivation audit trail.
Test Script: the physical, executable, description of the test case.
Automated test script: a program that implements a test.
The development life cycle has a number of processes and tasks that the development community is involved in:
Testers are familiar with each of these stages in the context of system development and its relationship to the construction of tests. However a Test Script is a program and as such it has a life cycle that parallels that of the system development in microcosm.