Code Monkey home page Code Monkey logo

qa_20602's Introduction

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.

qa_20602's People

Contributors

serg-troy avatar 010v avatar yelena1212 avatar rinsal avatar alisagrinko avatar alexanderchapkovski avatar borodastov avatar sviet-ka avatar yuriyvaler avatar asylgul avatar pbeylina 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.