selectIf expression in test description - This mechanism provides a flexible way for developers to make individual tests selectable (com.sun.tck.j2me.javatest.ExprFilter) by including a selectIf expression in test description.

The test developer can include a selectIf expression in the test description file for a test. Each selectIf field contains a Boolean expression that is evaluated by the filter. The test is selected by the harness for a test run if the value is true. See selectIf Test Selection” on page 71.

Grant or deny mechanism - This mechanism enables users to select tests based on the security requirements (com.sun.tck.midp.policy.PermissionFilter) specified by the test developer.

Tests are selected if all the permissions listed by the developer in the grant or deny test description field are granted or denied. See “Granting or Denying Security Permissions” on page 64.

Custom test suite-specific filters - Developers can extend the test suite with custom test suite-specific filters. The JavaTest Architect’s Guide describes creating custom filters.

selectIf Test Selection

The following procedures describe how developers can use the selectIf expression to enable filtering tests that are not applicable for an implementation.

To Enable Test Selection with the selectIF Expression

The selectIf entry in the test description file contains a Boolean expression which is evaluated by a test filter. If the Boolean expression evaluates to false, the test is not run. If the expression evaluates to true, the test is run.

Chapter 4 Writing Tests 71

Page 91
Image 91
Sun Microsystems 1.2 manual SelectIf Test Selection, To Enable Test Selection with the selectIF Expression