rebel-l / experiment-js-e2e-test

This is a prototype of doing end-to-end (e2e) tests in/on different browsers/devices with javascipt.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License: MIT

experiment-js-e2e-test

This is a prototype of doing end-to-end (e2e) tests in/on different browsers/devices with javascipt.

Requirements

  • NodeJS > 8.1.4: may it's working with a lower version
  • Yarn: you can use NPM instead, but I used yarn

Install

To get ready you need to run some commands. First of all install the packages:

yarn install

The next step is to update the webdriver-manager and link the browser specific drivers to the node modules bin path. To have it easy I have written some NPM/Yarn scripts:

yarn run build

Execute Tests

Before you are able to run tests you need to start the webdriver:

./node_modules/.bin/webdriver-manager start

You can check if the webdriver is running on http://localhost:4444/wd/hub. To check if the webdriver can be used from the scripts execute the following script:

node ./tests/webdriver-check.js

That script should connect with the selenium webdriver, open a chrome browser and load a page. After that it should be closed properly.

To work with Jest as testing framework there is a test script in the tests directory. To run the tests just call

./node_modules/.bin/jest

Jest should now open a browser, load a page and do some validations on it.

About

This is a prototype of doing end-to-end (e2e) tests in/on different browsers/devices with javascipt.

License:MIT License


Languages

Language:JavaScript 100.0%