Driver Scripts

A driver script triggers and monitors other scripts to test a test application. A driver script typically performs no testing of its own, although it may use conditional and other control logic to manage optional execution of other tests within the driver.

A complete test suite contains many individual tests, executed at different points within the test application. Each script in a test suite can be invoked by a driver script. Driver scripts are built in the same way as scripts, but the driver script does not actually test the test application. It merely “drives” the test application to the proper point to begin a test and then calls one or more scripts to begin testing at that test site. When the test finishes, the driver script regains control and proceeds to the next test site. You can create a driver script in the same way you manually create individual scripts.

Driver scripts facilitate a modular approach to application testing. Instead of creating one script that performs a complete test, you can create reusable scripts to cover individual parts of a whole test flow, then use a driver script to call each part. If a part of the overall test changes, only the script requiring the change needs to be updated. No change to the driver script is needed.

It is important to note that well-designed scripts return the test application to the original test site before completion. This ensures that: