Skip to main content
Glama
README.md
# ๐Ÿงช nopCommerce QA Automation + MCP

A professional **QA Automation project** built with **Playwright, TypeScript, Node.js, and Model Context Protocol (MCP)** to automate end-to-end testing and provide structured QA reports, test history, failure analysis, and dashboards.

## ๐Ÿš€ Project Overview

This project combines Playwright automation with an MCP server that allows QA tests to be executed and analyzed through dedicated automation tools.

### Architecture

```text
QA Engineer
     โ”‚
     โ–ผ
MCP Inspector
     โ”‚
     โ–ผ
MCP Server
     โ”‚
     โ”œโ”€โ”€ Run Tests
     โ”œโ”€โ”€ Test Summary
     โ”œโ”€โ”€ Test Details
     โ”œโ”€โ”€ QA Report
     โ”œโ”€โ”€ Test History
     โ”œโ”€โ”€ Failure Analysis
     โ””โ”€โ”€ QA Dashboard
     โ”‚
     โ–ผ
Playwright
     โ”‚
     โ–ผ
nopCommerce
```

## ๐Ÿ› ๏ธ Tech Stack

* **Playwright**
* **TypeScript**
* **Node.js**
* **MCP (Model Context Protocol)**
* **MCP Inspector**
* **JSON Test Reporting**
* **GitHub Actions**
* **End-to-End Testing**

## ๐Ÿงช Automated Tests

The project currently contains **7 automated Playwright tests**:

| # | Test                                    | Status   |
| - | --------------------------------------- | -------- |
| 1 | Update product quantity in cart         | โœ… Passed |
| 2 | Complete checkout after login           | โœ… Passed |
| 3 | nopCommerce homepage loads successfully | โœ… Passed |
| 4 | Invalid login credentials               | โœ… Passed |
| 5 | Customer logout                         | โœ… Passed |
| 6 | Add product to cart                     | โœ… Passed |
| 7 | Remove product from cart                | โœ… Passed |

## ๐Ÿค– MCP QA Tools

The MCP server provides dedicated tools for interacting with the Playwright test suite:

* `run_tests` โ€” Run the complete Playwright test suite
* `test_summary` โ€” Display test names and statuses
* `test_details` โ€” Display detailed information for a test
* `qa_report` โ€” Generate a complete QA automation report
* `test_history` โ€” Track previous test executions
* `failure_analysis` โ€” Analyze failed and timed-out tests
* `qa_dashboard` โ€” Display the latest QA dashboard
* `run_test` โ€” Run a specific Playwright test
* `list_tests` โ€” List available automated tests
* `run_all_and_dashboard` โ€” Execute all tests and generate a dashboard
* `run_failed_tests` โ€” Re-run failed tests
* `compare_test_runs` โ€” Compare recorded test executions

## ๐Ÿ“Š Latest Test Results

```text
QA AUTOMATION DASHBOARD

Total Tests: 7
Passed: 7
Failed: 0
Skipped: 0
Flaky: 0

Pass Rate: 100%

Status: ALL TESTS PASSED

Execution Time: ~50 seconds
```

## ๐Ÿ“ Project Structure

```text
nopcommerce-qa-mcp/
โ”‚
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/
โ”‚       โ””โ”€โ”€ playwright.yml
โ”‚
โ”œโ”€โ”€ mcp/
โ”‚   โ””โ”€โ”€ server.ts
โ”‚
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ cart.spec.ts
โ”‚   โ”œโ”€โ”€ checkout.spec.ts
โ”‚   โ”œโ”€โ”€ example.spec.ts
โ”‚   โ”œโ”€โ”€ login.spec.ts
โ”‚   โ”œโ”€โ”€ logout.spec.ts
โ”‚   โ”œโ”€โ”€ products.spec.ts
โ”‚   โ””โ”€โ”€ remove-from-cart.spec.ts
โ”‚
โ”œโ”€โ”€ playwright.config.ts
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ .gitignore
```

## โ–ถ๏ธ Run the Tests

Install dependencies:

```bash
npm install
```

Run all Playwright tests:

```bash
npx playwright test
```

Run tests with the line reporter:

```bash
npx playwright test --reporter=line
```

Run TypeScript validation:

```bash
npx tsc --noEmit
```

## ๐Ÿ“‹ Test Reporting

Playwright generates a JSON test report used by the MCP server for test analysis and dashboards.

The report contains:

* Test names
* Test files
* Pass/Fail status
* Execution duration
* Test output
* Errors
* Test execution timestamps

Generated test results are intentionally excluded from Git using `.gitignore`.

## ๐Ÿ”„ CI/CD

The project includes a **GitHub Actions workflow** for Playwright testing.

```text
GitHub Push
     โ”‚
     โ–ผ
GitHub Actions
     โ”‚
     โ–ผ
Install Dependencies
     โ”‚
     โ–ผ
Run Playwright Tests
     โ”‚
     โ–ผ
Test Results
```

## ๐ŸŽฏ QA Capabilities

This project demonstrates practical experience with:

* End-to-End Testing
* UI Automation
* Test Automation Architecture
* Test Reporting
* Test Result Analysis
* Failure Analysis
* Test History Tracking
* Automated Regression Testing
* CI/CD Testing
* MCP-based QA tooling

## ๐Ÿ” Security

The project excludes sensitive and generated files such as:

```text
node_modules/
test-results/
playwright-report/
.env
nopCommerce-develop/
```

## ๐Ÿ‘จโ€๐Ÿ’ป Author

**Omar Aljerbi**

QA Automation Engineer | Cloud & Automation

GitHub:
https://github.com/Omar-Aljerbi

---

โญ If you find this project useful, feel free to explore the repository.