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.
Make sure you have NodeJS installed (currently, version 0.10.33), and you can use the
$ npm version
Install Grunt globally:
$ npm install -g grunt-cli
Install dependencies from the project root directory:
$ npm install
Export your Tenon API Key as an environment variable:
$ export TENON_API_KEY=1234567890ABCDEFG
Start the selenium server and run the example tests using Google Chrome against Google.com:
As of 2017-08-14, this results in one (1) passing and two (2) failing tests on Google.com.
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.