Create and Run Integration Tests which require a Browser
This repo encourages the use of a Go web server which can serve on localhost. Why not use this web server in the CI/CD containers to serve the website during an 'integration test' stage of the pipeline (after build; before deployment)? Procedure:
- Build the website with
-tags integration
(this allows for differing config files based on if we're running in a container or not), probably in a new 'integrationbuild.sh' script - Run the website normally, using the run script
- Run the integration tests by running the tests with
-tags integration
, probably in a newintegrationtest.sh
script
Desired Results:
-
A Go-based integration test which has the client making an HTTP request to the data backend and then receiving a response via a Client API -
A DOM-based integration test which has the client making a DOM change and then verifies the DOM change -
A E2E integration test which starts a DOM change; which triggers a handler; which triggers a HTTP request; the backend responds; the client triggers DOM change; the test verifies the final DOM change occurred -
A unit test which is (mis)labelled as an integration test -
The integration tests pass