We can write tests that are capable of
accomplishing many variations on a test. The key here is re-use. A test
case can be designed to take parameters including input data and
expected results. This "data-driven" testcase is really an instance of
a class of test cases that performs certain steps to drive and verify
the application-under-test. Each instance varies by the data that it
carries. Since far fewer tests are written with this approach, changes
in the GUI will result in reduced effort in updating tests. A
data-driven test design also allows for the externalization of testcase
data and makes it possible to divide the responsibilities for
developing testing requirements and for developing test automation. For
example, it may be that a group of domain experts create the Testplan
Detail while another group of test engineers develop tests to satisfy
those requirements.
In a script file, an automated testcase ideally addresses one test
requirement. Specifically, a 4Test function that begins with the test
case keyword and contains a sequence of 4Test statements. It drives an
application to the state to be tested, verifies that the application
works as expected, and returns the application to its base state.
A script file is a file that contains one or more related testcases. A script file has a .t extension, such as find .t
|