Code Monkey home page Code Monkey logo

suitest-js-api-mocha-demo's Introduction

Suitest JavaScript API demo - Mocha integration

This repository holds a minimal set-up, required to launch Suitest JS API e2e tests with Mocha test runner.

Demo set up for Suitest JS API 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.

  1. Copy .suitestrc.dist file as .suitestrc and fill in it's contents with your values according to documentation.
  2. In terminal run yarn or npm i.
  3. Run yarn interactive or npm run interactive for interactive mode or yarn automated or npm run automated for automated.
  4. In order to debug your test, run yarn debug or npm run debug and connect debugger to localhost:9121. More info on debugging can be found in our docs.

Example tests

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.

Reporters

There are few examples of how Suitest can be used with different reporters.

mocha-junit-reporter reporter

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

mocha's xunit reporter

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

mochawesome reporter

Example script: automated:watchMe:mochawesome

Generates html and json reports.

tap reporter

Example script: automated:watchMe:tap

suitest-js-api-mocha-demo's People

Contributors

andriichumak avatar antonsbilan avatar givehug avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.