The template to create a service that runs WDIO tests against an environment.
Please install Node.js >= v20 and npm >= v9. You will find it
easier to use the Node Version Manager nvm
To use the correct version of Node.js for this application, via nvm:
nvm useInstall application dependencies:
npm installStart the Forms test harness by doing the following:
- Clone https://github.com/DEFRA/forms-development-tools
cd test-harness./run-harness.sh
You can supply an optional parameter to ./run-harness.sh to prevent forms-designer from being launched. This would be if you wanted to run your own forms-designer say from a branch other than main.
To prevent forms-designer from being started, use:
./run-harness.sh omit-designer
Once it has started (usually takes around 10 seconds once all Docker images have been downloaded), you can run the acceptance tests in this repository by doing
npm run testThe acceptance tests can be run as a Github workflow.
- Navigate to https://github.com/DEFRA/forms-acceptance-tests/actions/workflows/journey-tests.yml
- Click the 'Run workflow' button on the top right of the table
- Select the default 'main' branch
- Optionally, enter a commit hash for forms-designer (if you want forms-designer to by built from that commit as opposed to using the latest Docker image)
- Click 'Run workflow'
This starts the workflow job and the progress can be followed by viewing the log. The workflow usually take about 3 - 4 mins to complete.
Once completed, you can examine the artifacts by navigating into the workflow run. Artifacts are listed at the bottom of the screen. Download the allure-report, unzip it, and open index.html for the results in a drill-down web page.
THIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:
http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3
The following attribution statement MUST be cited in your products and applications when using this information.
Contains public sector information licensed under the Open Government licence v3
The Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.
It is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.