Welcome to the Cucumber Playwright JavaScript Automation Project! This project provides a comprehensive automation solution using Cucumber, Playwright, and JavaScript to test web applications. With these powerful tools, you can easily create and execute automated tests for web applications, ensuring their functionality and quality.
This project is designed to showcase how to use Cucumber, Playwright, and JavaScript to automate the testing of web applications. It offers a structured testing framework using BDD (Behavior-Driven Development) principles, making it easy to write test scenarios in natural language and convert them into executable tests.
Before you can run the tests and generate reports, there are a few prerequisites and installation steps you need to follow.
-
Node.js: Ensure you have Node.js installed on your machine. You can download it from the official website: https://nodejs.org/
-
Git: You'll need Git to clone the project repository. You can download Git from: https://git-scm.com/
Follow these steps to set up the project on your machine:
-
Clone the Repository: Open your terminal/command prompt and navigate to a directory where you want to store the project. Run the following command to clone the repository:
git clone https://github.com/imsaqibhussain/cucumber-playwright-javascript.git
-
Navigate to the Project Directory: Change your current directory to the cloned project folder:
cd cucumber-playwright-javascript -
Install Dependencies: Install the project's dependencies using npm (Node Package Manager). Run the following command:
npm install
To execute the automated tests, follow these steps:
-
Open your terminal/command prompt.
-
Navigate to the project directory if you're not already there:
cd path/to/cucumber-playwright-javascript -
Run the following command to execute the tests using Cucumber and Playwright:
npm run test:login.feature
This command will run the tests specified in the
login.featurefile using the Cucumber framework and Playwright browser automation.
After running the tests, you can generate a detailed HTML report using the following steps:
-
Open your terminal/command prompt.
-
Navigate to the project directory if you're not already there:
cd path/to/cucumber-playwright-javascript -
Run the following command to generate the HTML report:
node cucumber-html-reporter.js
This command will generate an HTML report that provides an overview of the test execution results, including passed and failed scenarios, steps, and execution times.
Congratulations! You've successfully set up and executed automated tests using the Cucumber Playwright JavaScript Automation Project. Feel free to explore the project, modify the test scenarios, and adapt it to your own web application testing needs.
For any further assistance or inquiries, please refer to the project's documentation or reach out to the project owner imsaqibhussain.