This guide describes the scenario where you are changing the behaviour of an application, and the E2E tests require changes to get the tests passing against your change.
-
Create a PR on the publishing-e2e-tests which makes the E2E tests pass when run against the updated version of your application(s). The how to run the tests guide explains how to perform this on your development machine.
-
Once your test works locally you’ll want to get both your application and E2E tests repo changes passing the GitHub CI checks.
-
Go to the publishing-e2e-tests project on Jenkins and click through into your branch with the updated tests.
-
Using the “Build with Parameters” option on the left hand bar replace the following parameters.
${YOUR_APP_NAME}_COMMITTISH
with the commit SHA of your changeORIGIN_REPO
with your application repo name, e.g. government-frontendORIGIN_COMMIT
with the same commit SHA as abovePublishing E2E tests uses the
ORIGIN_REPO
+ORIGIN_COMMIT
when pushing the GitHub status, and the_COMMITTISH
to know which version of each app to test against. -
Hit the Build button
-
-
Merge your application changes as you would normally. Unless your change to E2E tests is compatible with the old version of your application, don’t merge your change to E2E tests at this stage.
-
Deploy your application change to production as you would normally, waiting for deployed-to-production to be updated.
-
Merge your E2E tests change into master branch. This will trigger the master build which also updates the test-against branch. Once test-against branch is updated any subsequent test runs will use both your updated tests and your updated application code on deployed-to-production.
If you are making significant changes to any of the tests, it is recommended you treat the test as though it were new and attach the new tag as per the Adding new tests guidance