Tests, Mocks & Contracts That Are Inferred from Service Traffic
When installed in a Kubernetes, Docker or ECS cluster, UP9 observes the service traffic and continuously infers tests, mocks and contracts from the service traffic. Tests 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.
All artifacts (Tests, Mocks & Contracts) are version controlled.
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 a certain model version.
This is how the folder looks when opened:
[zipped folder]/
├── tests/
├── mocks/
└── contracts/
MIT License
All artifacts come as open source with an MIT license.
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 your 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.
To run one or more of these mocks you can follow the instructions in the new open-source project, Mockintosh.
You can run all mocks together in one command:
Or run the mock for a specific service:
Versions
You can access historical versions through the time machine, and open a model version from the past:
More Features To Come
There is much more that we didn’t have time to document yet. Features like smart tests that include test sequence, dependencies, data extraction, criteria and authentication support. That’s all coming very soon.