This is an exemplar of a frontend microservice.
Check uk.gov.hmrc.example.controllers.HelloWorldController
An example of how to write a unit test for a controller can be found in uk.gov.hmrc.example.controllers.HelloWorldControllerSpec in the test folder
To run unit tests:
sbt test
Check out how to use the new service-integration-test library in uk.gov.hmrc.example.ExampleIntegrationTest in the it folder
To run integration tests (smserver has to be running):
sbt it:test
An example can be found in uk.gov.hmrc.example.HelloWorldBrowserSpec, in the acceptance folder
To run acceptance tests (docker needs to be running):
- Create and run the docker image
cd acceptance-docker
docker build -t hmrc-digital-chrome-67 .
docker run --rm -d --name chrome-docker -p 4444:4444 -p 5900:5900 -e PORT_MAPPINGS='6001->6001' -e TARGET_IP='host.docker.internal' hmrc-digital-chrome-67
cd ..
- Run the acceptance tests
sbt -Dbrowser=remote-chrome acceptance:test
This code is open source software licensed under the Apache 2.0 License
foo