carf-registration-frontend UI journey tests.
The relevant microservices should be up and running for the registration ui journey tests
Start Mongo Docker container as follows:
docker run --rm -d -p 27017:27017 --name mongo percona/percona-server-mongodb:5.0Start carf-registration-frontend services as follows:
sm2 --start CARF_ALLStarting a large group of services in a profile can overload the cpu of a machine and lead to services failing to start.
If this happens use one, or a combination of the following arguments: --delay-seconds 5 to include a delay of 5
seconds between sm2 starting each service and --workers 1 to force sm2 to only start one service at a time.
Confirm that ui-test-runner (https://github.com/hmrc/ui-test-runner) is up-to-date and follow the provided instructions.
The system property browser.option.headless is defaulted to true in ui-test-runner. To view tests running locally in the browser UI for debugging, set the system property -Dbrowser.option.headless=false in the sbt command.
Run tests as follows:
- Argument
<browser>must bechrome,edge, orfirefox. - Argument
<environment>must belocal,dev,qaorstaging.
./run_tests.sh <browser> <environment>ZAP tests can be automated using the HMRC Dynamic Application Security Testing approach. Running automated ZAP tests should not be considered a substitute for manual exploratory testing using OWASP ZAP.
First run the DAST tool locally
The shell script run_local_zap_tests.sh is available to execute ZAP tests. The script proxies the journeys tagged
with 'ZapTests' via ZAP.
For example, to execute ZAP tests locally using Chrome browser:
./run_local_zap_test.sh chrome local
Check all project files are formatted as expected as follows:
sbt scalafmtCheckAll scalafmtCheckFormat *.sbt and project/*.scala files as follows:
sbt scalafmtSbtFormat all project files as follows:
sbt scalafmtAllThis code is open source software licensed under the Apache 2.0 License.