About Specifying Test Order

There is always the possibility that two different tests will result in opposite outcomes, leaving doubt about whether or not the trip should be allowed.

To control the test results, eligibility testing can be controlled by the Test Order system property, and additional Eligibility Test system properties can also be defined to provide more flexibility when setting up rules that control outcomes.
To begin with, a relevant test is defined as one that has met the following conditions:
  • The eligibility condition matches.
  • The client ID matches or there is no client ID, meaning that the test applies to all clients with this eligibility condition.
For a relevant test, a match means that all criteria of the test match the attributes of the trip. For no test scenarios, three additional Eligibility Tests properties can be configured:
Outcome if no conditions
Used for clients with no eligibility conditions.

If set to Allow, then if the client for whom the trip is being booked has no eligibility condition, the trip should be allowed.

If set to Deny, the trip would be denied.

The default is Allow, which means that the trip will be allowed.

Outcome if no perform
Used if an eligibility condition is set to do not perform tests.
The default is Deny.
The recommended value is Allow.
Outcome if no tests
Used for testable conditions that have no associated tests.

If set to Allow, then if an eligibility condition has Perform Tests selected, but has no relevant test associated with it, the trip should be allowed.

If set to Deny, the trip would be denied.

The default is Allow, which means the trip will be allowed.

In most cases, there will be one or more relevant tests. To handle the variations in local methods, the order of precedence of evaluating the tests can be defined using the Test Order system property so that the outcomes as defined below are ranked in their order of priority. If there are no test outcomes matching the criterion, the logic goes to the next test evaluation in the list.

The ranking of test order options, listed in a common scenario, would be:
  1. All required tests match
  2. Not all required tests match
  3. At least one sufficient test matches
  4. No sufficient test matches
  5. At least one deny test matches
  6. No deny test matches
To summarize, the Test Order system property works as follows:
  • If there are no conditions for the client, then the outcome is determined based on Outcome if no conditions property.
  • If there are conditions but Perform Tests is not selected on all of them, then the outcome is determined based on Outcome if no perform property.
  • If there are performable conditions but no tests associated with those conditions, then the outcome is determined based on Outcome if no tests property.
  • If there are performable conditions with tests, then outcome is based on the Test Order hierarchy.
Table 1. Example: Typical Ideal Test Order and Outcome
Test Outcome
A Not all required tests match Trip is denied
E No sufficient test matches Trip is denied
F All required tests match Trip is allowed
B At least one sufficient test matches Trip is allowed
C At least one deny test matches Trip is denied
D No deny test matches Trip is allowed
Note: In the preceding example, F and B must both pass for the trip to be allowed, but by the time the logic gets to them, all tests will pass because A and E were both false. They exist in this position in the table because if either or both pass, the trip is allowed, and the logic will only get to test C if there are no required or sufficient tests.
Table 2. Example: Common Test Order and Outcome
Test Outcome
C At least one deny test matches Trip is denied
A Not all required tests match Trip is denied
E No sufficient test matches Trip is denied
F All required tests match Trip is allowed
B At least one sufficient test matches Trip is allowed
D No deny test matches Trip is allowed
Table 3. Example: Complex Test Scenario Order and Outcome
Test Outcome
A Not all required tests match Trip is denied
B At least one sufficient test matches Trip is allowed
C At least one deny test matches Trip is denied
D No deny test matches Trip is allowed
E No sufficient test matches Trip is denied
F All required tests match Trip is allowed