This End-2-End tests have been developed using Selenium. Selenium is an open-source automated testing framework used to validate web applications across different browsers and platforms. You can use multiple programming languages like create Selenium Test Scripts.
For that reason we need an instance of Selenium running in the cluster, and then we can run our test using it.
Inside the tests/
folder in the repo there are two helm charts. The e2e-test
helm chart and the selenium-grid
helm chart.
To deploy the E2E tests it is important to have Selenium running and ready in the cluster first:
cd tests/selenium-grid
helm install --wait <my-selenium-release> . -n <PLATFORM_NAMESPACE>
Change values.yaml
file in the folder tests/e2e-test/
to adjust it to your deployment. By default, no changes should be required to run the default scenario of the tests.
You can run the e2e test the following way:
cd ../e2e-test
helm install <my-e2e-release> . -n <PLATFORM_NAMESPACE>
The e2e tests will spin up a pod called marinera-e2e
and run the tests, to see the logs you could do the following:
oc logs -f marinera-e2e -n <PLATFORM_NAMESPACE>
If the test e2e works, the pod will get to a Completed
status and will be deleted automatically. If it doesn't work, the helm installation will fail and the pod will remain in Error
state.
After the test, remember to remove the helm charts. You can do the following:
helm uninstall <my-e2e-release> -n <PLATFORM_NAMESPACE>
helm uninstall <my-selenium-release> -n <PLATFORM_NAMESPACE>