Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jijojose1691/playwright_cucumberjs_demo
Playwright with Cucumber JS
https://github.com/jijojose1691/playwright_cucumberjs_demo
cucumber-js end-to-end-testing javascript page-object-model playwright
Last synced: 10 days ago
JSON representation
Playwright with Cucumber JS
- Host: GitHub
- URL: https://github.com/jijojose1691/playwright_cucumberjs_demo
- Owner: jijojose1691
- Created: 2023-12-22T14:00:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-18T12:15:38.000Z (9 months ago)
- Last Synced: 2024-11-10T16:09:55.016Z (2 months ago)
- Topics: cucumber-js, end-to-end-testing, javascript, page-object-model, playwright
- Language: JavaScript
- Homepage:
- Size: 91.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Playwright Test Runner With Cucumber JavaScript
An example project showcasing the automation of web validation through the integration of Playwright and CucumberJS, utilizing the Page Object Model (POM) pattern.
#### System Under Test
We are using https://www.saucedemo.com/ as the System Under Test.
- URL: https://www.saucedemo.com/
- OS : Windows
- IDE : Visual Studio Code#### Scenarios
```bash
@tagRegression @P0 @validLogin
Scenario Outline: Login with valid credentials
Given I am on the login screen
When I fill the login form with valid username ""
Then I should be able to see the home screenExamples:
| username |
| standard_user |
| problem_user |
| performance_glitch_user |
| error_user |
| visual_user |
``````bash
@tagRegression @P0 @invalidLogin
Scenario: Login using vaild user but invaild password credentials
Given I am on the login screen
When I fill the login form with valid username "locked_out_user"
Then I should see error "Epic sadface: Sorry, this user has been locked out."
``````bash
@tagRegression @P0 @invalidLogin
Scenario Outline: Invalid Login
Given I am on the login screen
When I fill the login form with "" and ""
Then Verify error message "" is shown
Examples:
| username | password | errormessage |
| wrong_user | wrong_password | Epic sadface: Username and password do not match any user in this service |
| standard_user | wrong_password | Epic sadface: Username and password do not match any user in this service |
| locked_out_user | wrong_password | Epic sadface: Username and password do not match any user in this service |
| | | Epic sadface: Username is required |
```#### Installation
Install the dependencies and devDependencies to run the test.
- Clone (OR) Download this repo as zip folder on to your local machine
- Navigate to project's directory on terminal and run the following commands:Clone the repository
```bash
git clone https://github.com/jijojose1691/playwright_samples.git
```Install dependencies
```bash
npm install
npx playwright install
```#### Run application
Run tests
```bash
npm run test
```#### Test Report
The report will be accessible within the "report" directory following execution.