Skip to content

010V/QA_20602

Repository files navigation

20602

Complex Counter App / PASV Automation Framework

To run tests:

  • Clone repository
  • Run npm install
  • Run npm run cca-smoke

WebDriverIO project setup from scratch:

  1. Create new NodeJS project
  2. Run npm i --save-dev @wdio/cli
  3. Run npx wdio config -y
  4. Run mkdir -p ./test/specs & mkdir -p ./test/pages
  5. Babel setup:
  • create babel.config.js file with following code: module.exports = { presets: [ ['@babel/preset-env', { targets: { node: 12 } }] ] }
  • Run npm install --save-dev @babel/core @babel/cli @babel/preset-env @babel/register
  • In wdio.conf.js edit this piece of code: mochaOpts: { ui: 'bdd', compilers: ['js:@babel/register'], timeout: 60000 },
  1. Prettier setup:
  • Run npm install --save-dev prettier
  • Create prettier.config.js with following code: module.exports = { trailingComma: 'all', tabWidth: 2, semi: true, singleQuote: true, bracketSpacing: true, arrowParens: 'avoid', parser: 'babel', printWidth: 100, };
  1. To run your tests use npx wdio wdio.conf.js

Add Allure Reporter to existing WDIO framework:

  1. Install Allure Reporter npm install @wdio/allure-reporter --save-dev
  2. Add Allure to reporters in wdio.conf.js file: reporters: ['spec', ['allure', { outputDir: 'allure-results', disableWebdriverStepsReporting: false, disableWebdriverScreenshotsReporting: true, }]],
  3. Install CLI for Allure npm install allure-commandline --save-dev
  4. Modify your package.json file, so Allure Report generates and opens automatically after each test run. To do that you need to add allure generate allure-results --clean && allure open to existing scripts. For example: "scripts": { "test": "wdio wdio.conf.js && allure generate allure-results --clean && allure open", },

From now each time you execute npm test command, Allure Report will be generated and run on a local server.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published