So, you have a branch that contains changes you'd like to test with system tests...
Note: the instructions below assume that the necessary test already exists in system-tests and your weblog or parametric app has the necessary endpoint for serving the test [TODO]: LINK TO CONTRIBUTING DOC
-
Post a PR to the dd-trace repo if you have not already.
-
Test system-tests changes locally
Before enabling/disabling a test in CI, you'll need to test the changes locally.
Run the test locally against production-level code:
Enable the test to run on the latest version. If you know the specific release that contains the changes that allowed your lib to pass the test, and this release is not latest version, then use that version in the manifest. But don’t lose sleep hunting down the specific version if you don’t know it, just use the latest.
Run the test against unmerged or unreleased changes:
Follow binaries.md to run the app with a custom build, then update the manifest file with the name of your lib’s main branch (probably
v<next-minor-release>-dev
, see versions.md).By now, you should have a change to a manifest file. Post a PR to system-tests with your changes (the enabled test(s) will fail in CI if you enabled the test for the main branch; the necessary change is not merged into dd-trace main yet)
-
Merge changes into dd-trace
-
Re-run system-tests PR
It should be pass. Assuming it does, merge system-tests PR.
In most cases, you can ignore these.
Use the -F
option:
- If needed, add the test in system tests, skip it using manifest, merge this PR
- Do your PR in your repo
- Modify your CI to include the test you want to activate:
./run.sh MY_SCENARIO -F tests/feature.py::Test_Feature
- Iterate on your PR, merge it
⚠️ Add a PR in system-tests repo to unskip the test in manifest file, otherwise we may change the test, and break your CI without noticing it.
And so time to time, removes all the -F
in your CI.
- Do a PR in system-tests (it fails)
- Do your PR in your repo. On this PR, change the CI to use the system-tests branch
- Iterate on both PR until the PR on your repo is ok
- Very last commit on your PR : revert the change on your CI that used the dedicated system-tests branch
- Merge your PR on your repo
- Re-run system-tests PR CI. In theory, it should be ok.
- Merge it.