This repository holds a minimal set-up, required to launch Suitest JS API e2e tests with Mocha test runner.
Demo set-up is targeting test/
folder in this repo. Dummy test example would run on any HTML-based app,
so you can use your own app for testing.
- Copy
.suitestrc.dist
file as.suitestrc
and fill in it's contents with your values according to documentation. - In terminal run
yarn
ornpm i
. - Run
yarn interactive
ornpm run interactive
for interactive mode oryarn automated
ornpm run automated
for automated. - In order to debug your test, run
yarn debug
ornpm run debug
and connect debugger tolocalhost:9121
. More info on debugging can be found in our docs.
In watchMeTests
folder you can find some Suitest tests written for
WatchMe app (every Suitest account has this app by default). Those tests
rely on some elements from Suitest "Element repository" and configuration
where base url set to http://file.suite.st/sampleapp/index-hbbtv.html
- HbbTv
configuration in WatchMe app. So make sure you properly adjusted .suitestrc
file
and then you can launch them with npm run interactive:watchMe
or
npm run automated:watchMe
.
There are few examples of how Suitest can be used with different reporters.
Example script: automated:watchMe:junit
Also possible to add [hash]
to file name or path to prevent overriding results.
Results can be viewed by running npx xunit-viewer --results=./reports/junit --port=0
Example script: automated:watchMe:xunit
Directory for reports should exists otherwise it throws error.
Results can be viewed by running npx xunit-viewer --results=./reports/xunit --port=0
Example script: automated:watchMe:mochawesome
Generates html and json reports.
Example script: automated:watchMe:tap