What's in the box?¶
The test framework provides everything necessary to test integrations, such as:
- Dependencies like pytest, mock, requests, etc.
- Utilities for consistently handling complex logic or common operations
- An orchestrator for arbitrary E2E environments
Python 2 Alert!
Some integrations still support Python version 2.7 and must be tested with it. As a consequence, so must parts of our test framework, for example the pytest plugin.
The CLI provides the interface through which tests are invoked, E2E environments are managed, and general repository maintenance (such as dependency management) occurs.
As the dependencies of the test framework are a subset of what is required for the CLI, the CLI tooling may import from the test framework, but not vice versa.
The diagram below shows the import hierarchy between each component. Clicking a node will open that component's location in the source code.
graph BT A([Plugins]) click A "https://github.com/DataDog/integrations-core/tree/master/datadog_checks_dev/datadog_checks/dev/plugin" "Test framework plugins location" B([Test framework]) click B "https://github.com/DataDog/integrations-core/tree/master/datadog_checks_dev/datadog_checks/dev" "Test framework location" C([CLI]) click C "https://github.com/DataDog/integrations-core/tree/master/datadog_checks_dev/datadog_checks/dev/tooling" "CLI tooling location" A-->B C-->B