All Projects → allure-examples → allure-mocha-example

allure-examples / allure-mocha-example

Licence: Apache-2.0 license
Example of Selenium tests with Mocha and Allure report

Programming Languages

javascript
184084 projects - #8 most used programming language

mocha-allure-example

Example of Selenium tests with Mocha and Allure report

Setup

  1. Install node.js version 8+. This project uses modern Javascript features, that will not work in older versions.
  2. Clone this repository git clone [email protected]:allure-examples/mocha-allure-example.git && cd mocha-allure-example
  3. Install dependencies npm install
  4. Run tests via npm test. It will start Selenium server and perform some tests
  5. Run npm run report to build html report from results and it will be opened in your browser

Project structure

  • pages/ – directory with page objects. Page object is an convenient way to create reusable actions to interact with page .
  • test/ – test files. Our setup uses Mocha.
    • simple.spec.js – simple test example that uses only pure Allure, without webdriver
    • webdriver-io.spec.js – tests with selenium and webdriver.io, one of the popular libraries
  • util/ - additional helpers
    • config.js – configuration file where specified base options for tests. Here you can change target browser or page urls
    • browser.js - browser provider for your tests

Also, check out files content, they are also well-commented.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].