ILOG JRules User Guide > Testing Rules with Rule Scenario Manager > Concepts > Tests

A test is a comparison of ruleset execution results to a given test value. The comparison is effected by way of an operator associated with the extractor that retrieves the information from the execution trace. The passing or failing of tests helps indicate if the performance of a ruleset execution proceeded as expected.

In place of test values, tests can apply to the values contained in a reference scenario report, called a baseline report. Corresponding values in the baseline report's execution trace are applied in the subsequent scenario's tests. This is a method of performing regression testing on evolving rules.

Tests are defined during the definition of a scenario, but they are independent of scenarios. They can be contained as saved sets of tests in XML files that can be imported into the Rule Scenario Manager Console.

Extractor

An extractor is the property of a test that retrieves specific information from the execution trace. Extractors act effectively as variables representing the calculated values used in the test comparison against test values. Extractors are associated with defined operators with which they are logically compatible.

Examples of Rule Scenario Manager supplied extractors are RULES_FIRED, TASKS_EXECUTED, and EXECUTION_DURATION. New extractors can be defined by developers as Java classes, which can be applied both in file-based tests and in the Rule Scenario Manager Console.

Operator

An operator is the comparative action performed during the application of a test. Extracted values (or baseline report values) are compared to test values according to the logic of the operator. Operators are associated with extractors that can logically apply them.

Examples of operators are the following:

New operators can be defined by developers as Java classes, but must be associated with specific extractors.

Baseline Report

A baseline report is a scenario report whose execution trace provides the test values in other scenarios. By specifying the key <baseline-report-value/> in place of a specific test value in a test definition, the test is applied to the corresponding result in the baseline report.

Baseline reports enable regression testing on rulesets. Using a scenario report as a reference, you can compare executions of the rules after further modifications to the rules themselves or to the input data they execute on.

Related Concepts

Scenarios
Scenario Report
Execution Trace

Related Tasks

Adding a Scenario to a Project
Adding an Extractor to a Project
Adding an Operator to a Project
Creating a Client Scenario Project for RuleApps

Related Reference

Scenario XML Definition
Tests
Test Extractors and Operators
Test Extractor, Operator, and Type Java Definitions
Type Precisions Used in Input and Output Parameter Tests