To create regression tests in irVerify, first you will need to select “Create Test” button on the ribbon bar. Next you will need to select what kind of test you want to create. The options and what they do are listed below:
· Assertion Testing - In assertion testing, the user builds criteria that must be true in order for a test to pass. When ran, assertion test data is compared for each assertion and a pass or fail status is assigned accordingly. This use case is somewhat limited, especially if you have a large entity structure, because you will need to create assertions one-by-one, which can be a bit laborious. I generally only use this if I only have just few data points that I need to confirm.
· Comparison Testing - In comparison testing, the user defines a test scenario that represents the desired outcome of testing. The user also specifies an input test scenario that irVerify compares to the desired outcome. If there are any differences between the expected scenario and the actual scenario, the test fails. In this method, assertion tests are automatically created to compare the expected state of the entity and its data against the test data when the rules are run.
· Performance Testing - In performance testing, the user defines how many times to run a test, along with an input test scenario and execution parameters. The test reports performance results.
After selecting an option, it will ask you to select a test case.
For Assertion Tests and Performance Tests, it just needs either a Test Scenario or an Entity Data State ( a saved off XML or JSON file of your test data). For these tests, the data should be the state before the rules have run.
For Comparison Tests, you need to select two data states. An input data state from before the rules have been applied and an expected data state that was saved after the rules had been run.
The next screen that appears is your Test Suite, which is included in a screenshot below. Multiple tests can be saved in a Test Suite and in any combination of Assertion, Comparison, and Performance Tests. If you need to modify or replace your Input Data States and/or your Output Data States, you can select the “Edit” and “New” buttons. By default, the Test Suite will run by the “Apply Rules” directive. If you're using an explicit execution model, you can change that to “Entity Ruleset” and select the Controller ruleset in the “Entity Ruleset” field.
Tests can be ran by selecting the “Run” button. Multiple tests can be run at once by selecting “Run All”. Your test will show up in the test runner windows at the bottom of the test suite. Test suites can also be saved and reloaded for later use.
More information on Regression Tests and Test Suites can be found on the online help file at this link: http://support.inrule.com/help/irAuthorHelp50/testsuitesandregressiontesting.htm or if you have ROAD Services, your consultants can give you a more detailed walkthrough.