Creating a single Contract test
You can create a single Contract test from a Message Exchange Pattern (MEP) in Test Integrations and APIs from the Test Factory view. The MEP defines the pattern, schema, and binding for messages that are exchanged by the operation. You can create a Contract test that adheres to the rules defined in the contract.
You must have completed the following tasks:
- Created a project. See Creating a project.
- Created a logical resource and bound it to its corresponding type of physical resource.
- Created a service component under the logical resource. See Creating a service component.
- Created an operation under the service component. See Creating an operation.
- Added a schema that is used to validate the incoming messages. See Adding a schema.
- Configured the MEP for the operation. See Configuring the MEP settings to create consumer-driven Contract tests.
- Opened the project in the Test Factory view.
You can perform the following tasks:
- Edit the test actions or other contents of the test, if required. See Changing the contents of a 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.