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.

Download Tests, Mocks and Contracts This is how the folder looks when opened:

[zipped folder]/
├── tests/
├── mocks/
└── contracts/

Tests, Mocks and Contracts Folder

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

Tests generated by Machine Learning

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:

Copy to clipboard
pytest tests.py::<service>::<endpoint>

PyTest Execution

Mocks

The mocks folder includes mock configuration for all services that were observed in service traffic. Mock configuration

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: Run all mocks at once

Or run the mock for a specific service: Run in a single mock configuration

Versions

You can access historical versions through the time machine, and open a model version from the past:

Version-controlled tests, mocks and contracts

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.