Giter Club home page Giter Club logo

defra.ltfri-tests's Introduction

Local test

Both the selenium jar and the chromedriver are in the /bin directory, so there shouldn't be any manual setup here, nightwatch handles the selenium server_path

npm run test-e2e-local to test http://localhost:3001

or to target a different url:

npm run test-e2e-local -- --url https://flood-dev.aws.defra.cloud/

Remote test (BROWSERSTACK)

Need environment variables for, BS user and key:

export BS_USER= export BS_KEY=

Browserstack tunnel then needs setting up, either download the latst binary from https://www.browserstack.com/automate/node#firefox-profile ctrl-f for "Setting up local testing"

or go to /bin and run ./BrowserStackLocal $BS_KEY

With this running in a terminal you'll then be able to run tests against your localhost or a private domain ie dev/test

To setup bespoke environments for testing use the tool at https://www.browserstack.com/automate/node#firefox-profile to select browser/os/screensize and it gives the config options

Remote test (Sauce labs)

In your environment variable location add, populated with the saucelabs connection details:

export SAUCE_USERNAME= export SAUCE_ACCESS_KEY=

If you are wanting to test your localhost using sauce labs then a tunnel will need to be created for the remote to access your local. This is done through Sauce Connect. See https://wiki.saucelabs.com/display/DOCS/Setting+Up+Sauce+Connect

In the terminal run:

/bin/sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} -B all

This will need to be left running whilst the remote tests are run:

npm run test-e2e-remote

defra.ltfri-tests's People

Contributors

davidjamesstone avatar ccapperea avatar lcurryea avatar pmshaw15 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.