Testing ~ e2e - GeoscienceAustralia/egeodesy GitHub Wiki

e2e process

Under docker

Automatically run

cd gnss-site-manager
docker-compose up e2e-tests [-d]

The -d is optional. If not present you can see the steps that are performed. -d means to put into background.

Manually run

This allows you to be able to run the commands to see what is going on. It is also necessary for development to be able to make edits and easily and quickly run tests again.

cd gnss-site-manager
// Docker is now optional
// docker-compose build e2e-tests // if something has changed, to rebuild the docker image
// docker-compose run e2e-tests bash
nix-shell
npm run webdriver-start &    // This starts Selenium to run the tests on the browser
npm run serve.e2e &          // This builds and starts the web app to be tested
npm run e2e                  // This runs the tests that use Selenium to interact with the browser

Another nice piece of functionality is the element explorer, which is started with the below and is explained in https://www.youtube.com/watch?v=ZLO6bDaRip4. TLDR - you can interact with ANY page using protractor. Neat. Could be used to work out expressions for when writing tests.

npm run e2e.live

Building

cd gnss-site-manager
docker-compose build e2e-tests