This is a template README.md. Be sure to update this with project specific content that describes your api test project.
API test suite for the <digital service name>
using ScalaTest and play-ws client.
Prior to executing the tests ensure you have:
- Installed MongoDB
- Installed/configured service manager.
Run the following commands to start services locally:
docker run --rm -d --name mongo -d -p 27017:27017 mongo:3.6
sm --start IVHO -r --wait 100
Using the --wait 100
argument ensures a health check is run on all the services started as part of the profile. 100
refers to the given number of seconds to wait for services to pass health checks.
Then execute the run_tests.sh
script:
./run_tests.sh <environment>
The tests default to the local
environment. For a complete list of supported param values, see:
src/test/resources/application.conf
for environment
To run the tests against an environment set the corresponding host
environment property as specified under
<env>.host.services
in the application.conf.
This repository uses Scalafmt, a code formatter for Scala. The formatting rules configured for this repository are defined within .scalafmt.conf.
To apply formatting to this repository using the configured rules in .scalafmt.conf execute:
sbt scalafmtAll scalafmtSbt
To check files have been formatted as expected execute:
sbt scalafmtCheckAll scalafmtSbtCheck
Visit the official Scalafmt documentation to view a complete list of tasks which can be run.