Creating consumer-driven Contract tests by synchronizing resources
You can opt to create consumer-driven Contract tests when you synchronize resources that you created in another application with Rational® Integration Tester. If you already have created tests in the other application for your system under test and you have defined schemas and roots for messages, you can use the synchronizing feature of Rational® Integration Tester to generate Contract tests, tests, and stubs that you can run on Rational® Integration Tester.
Before you begin
- Created tests for your system under test in another application. The tests must include messages that use a transport and you must have defined schemas and roots for the messages.
- Read the types of resources that you can synchronize with Rational® Integration Tester. See Adding a resource.
- Created a project. See Creating a project.
- Opened the Synchronization view in the Architectural School perspective in Rational® Integration Tester.
Procedure
-
Click the Create Synchronization Source icon
in the toolbar.
-
Perform the following steps in the
Create a new Synchronization Source dialog:
- Select any of the following actions that depends on the type of Contract testing you want to perform in Rational® Integration Tester:
-
Perform the following steps in the Generate Assets for
Operations dialog:
-
Perform the following steps in the Generate Assets for
Operations dialog:
Results
What to do next
-
Verify whether the test is a Contract test by performing the following steps:
- Click the test in the Test Factory view to open the test steps in the Test Lab view.
- Click the Reply or
Subscribe action.The message is displayed in the Message Editor.
- Check if any of the message elements have a value as
Validate Against Contract.
If any of the message elements display this value, then the test created is a Contract test.
- Run the Contract test in any of the following methods:
- Right-click the Contract test, and then click the
Run icon
.
- Select the Contract test, and then click the
Run icon
in the toolbar.
- Right-click the Contract test, and then click the
Run icon
- View in the console log, after the test runs that the incoming messages are validated against the contract.