Git Product home page Git Product logo

playwright_letcode.in_automation_usingts's Introduction

Playwright_letcode.in_Automation_UsingTS

Automation https://letcode.in/ using playwright,POM pattern

Technology:

  • Automation Framework: Playwright
  • Build tool: npm
  • Bundled Tools: Mocha, Chai
  • Language: Javascript,Typescript
  • Report: Allure,html-report
  • Dependency/Packages:{ "@playwright/test": "^1.20.2", "@types/adm-zip": "^0.4.34", "adm-zip": "^0.5.9", "allure-playwright": "^2.0.0-beta.15", "clipboardy": "^3.0.0", "cross-env": "^7.0.3" }
  • IDE: Visual Studio Code

Requirement:

  1. Automate https://letcode.in/test UI
  2. Automate Simple Book API

Prerequisite:

The following software are required:

  1. nodejs : Download and Install Node JS from
    https://nodejs.org/en/download/
  2. Install Java 8 or above, Allure Reports require Java 8 or higher.
  3. allure commandline : Install allure command line for generating Allure Reports using
    npm install -g allure-commandline

Installation:

  1. Clone the repo using below URL
    https://github.com/acharjeeauntor/Playwright_letcode.in_Automation.git
  2. Navigate to folder and install npm packages using:
    npm install

Usage:

  1. For Browser Configuration, change required parameters in "playwright.config.ts".
  2. For execution entire test suite of functional test on all available browsers simultaneously execute below command where "ENV" can be "functional" or "api",Test Cases are present in "tests" folder:
    npx cross-env ENV=functional npm run test:functional
  3. For executing single test case on Chrome browser execute the below command, you can change the browser for execution e.g. if you want to run test cases on Firefox, you can change --project=Firefox against test:single in package.json, just make sure the browser name given matches the name given in playwright.config.ts.
    npx cross-env ENV=functional npm run test:single
  4. For executing API test cases, please provide "ENV" value as "api":
    npx cross-env ENV=api npm run test:api
  5. For Allure Report generation execute :
    npm run allureReport

Allure Report view for functional test:

Screenshot from 2022-04-03 23-40-01 Screenshot from 2022-04-03 23-40-19 Screenshot from 2022-04-03 23-40-31 Screenshot from 2022-04-03 23-40-45

Allure Report view for API test:

Screenshot from 2022-04-03 23-43-19 Screenshot from 2022-04-03 23-43-32 Screenshot from 2022-04-03 23-43-44 Screenshot from 2022-04-03 23-43-57

To See the Demo Video click here

playwright_letcode.in_automation_usingts's People

Contributors

acharjeeauntor avatar

Watchers

 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.