Exporting Tests, Mocks & Contracts
Tests, mocks, and contracts can be exported to most popular coding languages and frameworks like Python, Java, Javascript, and Postman. Mocks can be exported to various mock hosting solutions like Wiremock, HoverFly, and Postman.
Accessing the Artifacts
Once you have UP9 installed and observing service traffic, you can download a zip file that includes all of the tests, mocks, and contracts that belong to the current workspace.
This is how the folder looks when opened:
[zipped folder]/
├── tests/
├── mocks/
└── contracts/
Tests
The tests.py
file in the tests
folder includes the complete contract test-suite and covers all endpoints that were observed in service traffic.
[zipped folder]/
├── tests/
├── tests.py
The readme file within the folder includes instructions on how to run tests from your local machine. You can run all tests at once or run specific tests by using the pytest command:
pytest tests.py::<service>::<endpoint>
Mocks
The mocks
folder includes mock configuration for all services that were observed in service traffic.
mockintosh.yml
- main file with all mocked endpointsmock-data
- a directory that contains response payloads.docker-compose.yml
- Easy way to spin up all services as mocks
To run one or more of these mocks you can follow the instructions in 'Mocks', or in the new open-source project, Mockintosh.
MIT License
All artifacts come as open source with an MIT license.
Support
For support, feel free to use any one of the three:
- Join our community Slack at up9.slack.com.
- Email support@up9.com.
- Use our in-app messaging application to start a conversation.