Part of the software development lifecycle for many organizations includes the need to do end-to-end (e2e) testing. This is often done to test for regressions but can also be used to validate that acceptance criteria have been met.
The Zephyr build output provides a deployed URL to the immutable version that was created and published as part of the build. You can proceed to test this URL directly. Check our guide to promote this URL directly under an environment here.
We found one of the quickest and easiest ways to do this is to get the output URL by adding a script to your CI runner script. You can leverage the build output directly and using regex find the appropriate output text.
Add below script to your pull_request.yaml file.
The output can then be used as variables in later steps of your pipeline to serve as the base URL for your test.
Testing federated applications is typically a bit more challenging, however with Zephyr this is a fairly trivial task.
Because of how the Zephyr workers resolve the federated remotes we have the ability to modify our session and have the worker give us different versions of the application.
This means in your e2e testing suite you can update the browser session storage to update the remotes. In the puppeteer example below we take the output values of the remote name as well as the remoteURL and set them on the session storage. After refreshing the page the remote will be swapped with the version on the session.
If you want to test a new remote in production you can perform the following in your testing suite.