Skip to content

timLP79/e_commerce_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-commerce Site Tester

Playwright JavaScript Node.js

A Playwright-based QA test suite that logs into the Swag Labs demo e-commerce site, sorts the inventory by price from low to high, and validates the result.


Tech Stack

  • Playwright v1.53.1
  • JavaScript (ES2023)
  • Node.js

Test Coverage

  • Navigate to site and login
  • Sort inventory by price low to high
  • Parse and validate that prices are correctly ordered
  • Output results to JSON per browser and HTML report

Getting Started

Installation

git clone https://github.com/timLP79/e_commerce_test.git
cd e_commerce_test
npm install

Run Tests

npx playwright test

View Report

npx playwright show-report

Output

  • output/results-${testInfo.project.name}.json -- item names and prices per browser
  • playwright-report/ -- full HTML test report
  • Console summary printed after each browser run

Sample Output

--- TEST SUMMARY (chromium) ---
Items found: 6
Sorted low to high: YES
Results saved to output/results-chromium.json

Project Structure

e_commerce_test/
├── tests/
│   ├── login.spec.js           # Login and navigation test
│   └── filter.spec.js          # Price sort validation test
├── utils/
│   └── login.js                # Shared login helper
├── output/                     # JSON results (gitignored)
├── playwright-report/          # HTML report
├── playwright.config.js        # Playwright configuration
└── README.md

Contact

About

Playwright test of a demo e-commerce site

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors