Test Script

A TEST SCRIPT is a set of instructions (written using a scripting/programming language) that is performed on a system under test to verify that the system performs as expected. Test scripts are used in automated testing.

Sometimes, a set of instructions (written in a human language), used in manual testing, is also called a Test Script but a better term for that would be a Test Case.

Some scripting languages used in automated testing are:

JavaScript

Perl

Python

Ruby

Tcl

Unix Shell Script

VBScript

There are also many Test Automation Tools/Frameworks that generate the test scripts for you; without the need for actual coding. Many of these tools have their own scripting languages (some of them based on a core scripting language). For example, Sikuli, a GUI automation tool, uses Sikuli Script which is based on Python. A test script can be as simple as the one below:

def sample_test_script (self):

type ("TextA")

click (ImageButtonA)

assertExist (ImageResultA)

A test execution engine and a repository of test scripts (along with test data) are collectively known as a Test Harness.