Example of integrating functional selenium tests with Tenon.io
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.editorconfig
.gitignore
.jscsrc
.jshintrc
Gruntfile.js
README.md
package-lock.json
package.json
wdio.conf.js

README.md

Tenon.io Selenium example

This repo shows some simple examples of how to perform Tenon assertions as part of a set of functional tests driven by Webdriver.io.

Quick Start

  1. Make sure you have NodeJS installed (currently, version 0.10.33), and you can use the npm command:

    $ npm version
  2. Install Grunt globally:

    $ npm install -g grunt-cli
  3. Install dependencies from the project root directory:

    $ npm install
  4. Export your Tenon API Key as an environment variable:

    $ export TENON_API_KEY=1234567890ABCDEFG
  5. Start the selenium server and run the example tests using Google Chrome against Google.com:

    $ grunt

    As of 2017-08-14, this results in one (1) passing and two (2) failing tests on Google.com.

Important bits...

Webdriver.io makes it easy to add your own commands which are included in test/helpers/tenonCommands.js. In this case, we are using the tenon-node module to send either a URL or HTML to tenon for validation and then performing an assertion on the results from Tenon.