Creating producer-driven Contract tests by synchronizing resources
You can opt to create producer-driven Contract tests when you synchronize resources that you created in another application with HCL OneTest™ API. 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 HCL OneTest™ API to generate Contract tests and stubs that you can run on HCL OneTest™ API.
Before you begin
You must have completed the following tasks:
- 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 HCL OneTest™ API. See Adding a resource.
- Created a project. See Creating a project.
- Opened the Synchronization view in the Architectural School perspective in HCL OneTest™ API.
Procedure
- Click the Create Synchronization Source icon in the toolbar.
-
Perform the following steps in the
Create a new Synchronization Source dialog:
-
Perform the following steps in the Generate Assets for
Operations dialog:
Results
What to do next
Verify the properties of the generated stub by performing the following steps:
- Open the project in the Test Factory view.
- Right-click the stub and in the menu, click .
- Click the Properties tab.
If the Include Contract Validation option is selected, then the stub is part of the producer-driven Contract test.