Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Latest commit

 

History

History
89 lines (58 loc) · 1.79 KB

README.md

File metadata and controls

89 lines (58 loc) · 1.79 KB

playwright-cucumber-sample

Overview:

This is a sample test automation framework developed using Playwright with Cucumber.

For Demo purpose web UI test cases are created on ecommerce-playground.lambdatest.io site and API test cases are created on these SOAP Calculator API & REST Library Information System API endpoints.

Supported Browsers

  1. Chrome - default browser
  2. Firefox
  3. MS Edge
  4. WebKit - web browser engine used by Safari

Steps to use

1. Installation

Playwright framework requires Node.js v14+ to run.

Installing the dependencies.

npm ci
2. Execution

To run test scenarios use below command.

npm run test

To run specific scenario, use tags command. Below are few examples.

npm run test:tags @sanity
npm run test:tags "@calculator or @author"
npm run test:tags "@rest and @author"

To dry run test scenarios use below command.

npm run dry:test

To rerun the failed test scenarios use below command.

npm run failed:test

To change any environment configuration in .env file at run time use set command. Eg: To change browser to Firefox use below command

set BROWSER=firefox

Similar command can be used to update other environment configuration

To generate HTML and Cucumber report use below command

npm run report
4. Report & Logs

Cucumber HTML report will be present inside

test-results/reports/cucumber.html

HTML report will be present inside

test-results/reports/html/index.html

Execution log will be present in the log file.

test-results/logs/execution.log