
In the test description file, $testHost and $testPort are test environment variables and are replaced by actual values obtained from the test environment.
■The test suite configuration interview must include a corresponding and appropriate question asking the user to specify the values of the host and port number.
The configuration interview creates entries in the test environment from user answers as
The following is an example of
testHost=129.42.1.50
testPort=8080
▼To Create a Configuration Interview Through the Interview Class
The following procedure uses the Test2.java test class as an example to demonstrate how to accomplish the following tasks:
■Create a configuration interview through the interview class
■Export an environment variable
■Specify the environment value by using context or executeArgs
■Decode the argument into the test class
SimpleTestSuite/tests/sample/pkg2/Test2.java is a simple test class created to demonstrate the basic principle of writing a test that uses a configuration interview.
In addition to the procedures provided in this section, refer to Chapter 6 of the JavaTest Architect’s Guide for additional information regarding creating configuration interviews.
Chapter 3 Test Suite Construction 29