Skip to content

Rubaiyat-E-Mohammad/FlyWP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pre-requisites

Install Node.js

Install NVM

Running tests

Pre work for running the tests

Clone this repository

  • git clone https://github.com/Rat01047/flywp-automation.git

Run the followings in a terminal/command line window

cd e2e
  • npm install to install the required dependencies (@playwright/test, dotenv, @faker-js/faker)

Make a .env file according to .env.example file

How to run tests

To run the tests suite, use the following command:

npx playwright test

Additional Scripts

...

Here are some other useful commands to help you run and manage your tests effectively:

Run All Tests

Run all tests with optimal performance using the available workers:

npm run all
Run All Tests in Headed Mode

Run all tests in a browser with a visible UI and single worker:

Run all tests,
npm run all:headed
Run Specific Shards,

Playwright supports test sharding for parallel execution. You can run specific shards as follows:

Pre-shard tests,

npm run test:preShard

Shard 1,

npm run test:shard1

Shard 2,

npm run test:shard2

Shard 3,

npm run test:shard3

Post-shard tests,

npm run test:postShard
Run All Sharded Tests Sequentially

Run pre-shard, all shards, and post-shard tests in sequence:

npm run test:sharded

Generate and View Test Coverage

...

Generate coverage reports for your tests:

npm run test:coverage
Generate and View HTML Reports,

Merge reports from all shards and generate an HTML report:

npm run generate-report
View the Latest Test Report,

View the most recent HTML report:

npm run report

Notes

...

• Ensure all dependencies are installed before running these commands (npm install).

• Configure your test environment and projects in the Playwright configuration file (playwright.config.js).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors