Skip to content
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.

Latest commit

 

History

History
75 lines (40 loc) · 1.25 KB

README.md

File metadata and controls

75 lines (40 loc) · 1.25 KB

WebdriverIO + tape

This repository demonstrates how to use WebdriverIO with the tape test framework.

It includes a test file (tests/test.spec.js) that:

  1. opens the Firefox browser (as defined in tests/conf.js);
  2. visits the URL https://duckduckgo.com; and
  3. tests the title of the page to match an expected value.

Requirements

  • Docker with selenium-standalone installed; see here.

Installation

npm install

Getting started

Run the Docker service containing the Selenium server that will run all tests.

docker run -it -p 4444:4444 vvoyer/selenium-standalone

Run the example test:

npm test

The result should be something similar to the below output:

TAP version 13
# should visit DuckDuckGo
ok 1 should be equal

1..1
# tests 1
# pass  1

# ok

The example test checks the <title> tag of DuckDuckGo. If the test fails, it is because the title has changed (the output should indicate this).

Acknowledgements

Credit to Patrick Arlt for their gist that helped with the development of the test file.