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

michu-ethnan/playwright-cucumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published