Current chrome issue: [21/11/25] There is a current issue when running tests using later versions of chrome as per https://hmrcdigital.slack.com/archives/C0J8BH46N/p1760607965741119. As a workaround we must use version 128. In order to do so we must also add the following properties to the CLI
-Dbrowser.usePreviousVersion=trueFor the foreseeable future (this applies to all subsequent commands associated with chrome) e.g. Run the following command to trigger the test via the CLI.
sbt clean -Dbrowser="chrome" -Denvironment="local" -Dbrowser.usePreviousVersion=true test
The scripts are also updated, and once this is fixed we'll need to remove them
Run the following command to start services locally:
sm2 --start SAO_ALLRun tests as follows:
- Argument
<browser>must bechrome,edge, orfirefox. - Argument
<environment>must belocal,dev,qaorstaging.
sbt clean -Dbrowser="chrome" -Denvironment="local" testRun all tests:
The run_all_tests.sh script defaults to using chrome in the local environment.
./run_all_tests.shTo run any test individually, add "SoloTests" tag to the respective scenario and use:
./run_solo_tests.shTo run only the submission tests, ensure "SubmissionUITests" tag is added to the respective scenario(s) and use:
./run_submission_ui_tests.shTo run only the registration tests, ensure "RegistrationUITests" tag is added to the respective scenario(s) and use:
./run_registration_ui_tests.shExecuting a local ZAP test:
First run the DAST tool locally
The shell script is available to execute ZAP tests. The script proxies the journeys tagged with 'ZapTests' via ZAP.
./run_local_zap_tests.shCheck 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 scalafmtAllVisit the official Scalafmt documentation to view a complete list of tasks which can be run.
This code is open source software licensed under the Apache 2.0 License.