diff --git a/tests/defect-log.md b/tests/defect-log.md new file mode 100644 index 00000000..3b2fa729 --- /dev/null +++ b/tests/defect-log.md @@ -0,0 +1,274 @@ +# 🐞 Defect Log + +This log tracks all known defects identified during testing. + +--- + +## DEF-001 + +**Title:** +Pickup Request Not Saved or Reflected on Dashboard + +**Detected By:** +Manual QA + +**Date Reported:** +_2025-07-09_ + +**Related Test Case(s):** +[TC-SM-001] + +**Environment:** +- Local React App (`npm start`) +- Browser: Chrome + +**Description:** +When a user schedules a new pickup: +- The request is **not saved** in `localStorage` or any backend. +- The **Dashboard** "Scheduled Pickups" or count does not update to reflect the new request. + +**Steps to Reproduce:** +1. Go to **Dashboard** — record current pickups count. +2. Schedule a new pickup via the **Pickup Scheduler** form. +3. Inspect `localStorage` → no new pickup data. +4. Return to Dashboard → count unchanged. + +**Expected Behavior:** +- Pickup details should persist in `localStorage` under `scheduledPickups`. +- Dashboard count should update automatically. + +**Actual Behavior:** +- No data saved. +- Dashboard does not change. + +**Severity:** +High — Core functionality is broken. + +**Status:** +Open + +**Assigned To:** +_Samuel Kimwele Mbai_ + +**Attachments:** +- Screenshots of storage check & dashboard state.![image](https://github.com/user-attachments/assets/c5412371-2b5b-4fd5-b061-f992bd854ff9) +--- + + +## DEF-002 + +**Title:** +Missing Top-Level `

` Heading on Blog Page + +**Detected By:** +Manual Accessibility Testing (axe DevTools) + +**Date Reported:** +_2025-07-07_ + +**Related Test Case(s):** +[TC-MK-001] + +**Environment:** +- Local React App (`npm start`) +- Browser: Chrome +- Tool: axe DevTools v4.10.3 + +**Description:** +The `/blog` page does not contain a single, descriptive top-level `

` heading. This violates accessibility standards that require a clear page title for assistive technologies. + +Note: Other pages in the application (e.g., Login, Awareness, Admin Panel) do include valid `

` tags — this issue is isolated to the Blog page. + +**Steps to Reproduce:** +1. Start the app locally with `npm start`. +2. Navigate to `http://localhost:3000/blog`. +3. Open Chrome DevTools → go to **axe DevTools** tab. +4. Click **"Analyze"**. +5. Observe the issue: “Page should contain one `

` heading”. + +**Expected Behavior:** +- The Blog page should include a unique `

` element near the top of its main content section. + +**Actual Behavior:** +- No `

` found; page structure begins with `

` or styled `
`s instead. + +**Severity:** +Medium — Affects accessibility and WCAG compliance. + +**Status:** +Open + +**Assigned To:** +_Martin Kimani_ + +**Attachments:** +- Screenshot of axe DevTools result panel +- ![image](https://github.com/user-attachments/assets/a19f5671-5d71-475a-9836-b0d589f3b027) +- [WCAG Guideline 1.3.1 – Info and Relationships](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html) + +## DEF-003 + +**Title:** +Form Accepts Overly Long Inputs and Invalid Email Without Proper Validation + +**Detected By:** +Manual Edge Case Testing + +**Date Reported:** +_2025-07-07_ + +**Related Test Case(s):** +[TC-MK-002] + +**Environment:** +- Local React App (`npm start`) +- Browser: Chrome +- Page: Pickup Scheduling Form (`/schedule`) + +**Description:** +The form fails to validate excessively long input in the **"Name"** field and does not enforce proper format validation in the **"Email"** field. The only check in place appears to be for the presence of the `@` symbol. + +**Steps to Reproduce:** +1. Go to the Pickup Scheduling form. +2. In the **Name** field, paste over 500 characters (e.g., lorem ipsum). +3. In the **Email** field, enter an invalid email like `example@gmail...` (missing domain). +4. Click **Submit**. +5. Observe behavior. + +**Expected Behavior:** +- App should **restrict Name input** (e.g., max 100 characters) or show a clear validation error. +- Email should be validated using a regex or HTML5 pattern (e.g., `user@example.com`) and **show an error message** for invalid formats. + +**Actual Behavior:** +- The form **accepts 500+ characters** in the Name field with no error or truncation. +- The Email field **accepts invalid formats** like `example@gmail.` without any feedback or warning. +- The form still submits successfully (depending on implementation). + +**Severity:** +Medium – affects data integrity and user input reliability. + +**Status:** +Open + +**Assigned To:** +_Martin Kimani_ + +**Attachments:** +- Screenshot of input fields before and after submission + ![image](https://github.com/user-attachments/assets/45797129-0750-49f5-9aa2-c2403e7930de) + + + +## DEF-004 + +**Title:** +Feedback Form Accepts Any Request ID Without Validation + +**Detected By:** +Manual QA – Functional Testing + +**Date Reported:** +*2025-07-09* + +**Related Test Case(s):** +\[TC-BN-006] + +**Environment:** + +* Local React App (`npm start`) +* Browser: Chrome +* Page: Feedback (`/feedback`) + +**Description:** +The Feedback form allows users to submit feedback using any text string as a Request ID — even if it does not match an existing or valid pickup request. This leads to data inconsistency and undermines traceability. + +There is no mechanism in place to: + +* Verify the Request ID exists +* Autofill or restrict to valid IDs only +* Display an error if an invalid ID is used + +**Steps to Reproduce:** + +1. Navigate to the Feedback page (`/feedback`) +2. In the **Request ID** field, enter a made-up value (e.g., `REQ9999`) +3. Type a comment in the **Feedback** field +4. Click **Submit** +5. Observe the result + +**Expected Behavior:** + +* The app should **validate** the entered Request ID against existing requests +* An error message should appear if the ID is invalid or unrecognized +* Optionally, the Request ID should be **autofilled or selected** from a dropdown list of real requests + +**Actual Behavior:** + +* The form **accepts any input** in the Request ID field +* Feedback is **submitted even for non-existent IDs** +* No validation or warning is triggered + +**Severity:** +Medium — affects data accuracy and backend processing of feedback + +**Status:** +Open + +**Assigned To:** +*Bridget Ngugi* + +**Attachments:** +![image](https://github.com/user-attachments/assets/5a6b7ff0-e0a2-44d9-b859-65e76e1551db) + + +## DEF-005 + +**Title:** +Missing “Cancel” Button in Admin Panel for Pending Pickups + +**Detected By:** +Manual Functional Testing + +**Date Reported:** +_2025-07-07_ + +**Related Test Case(s):** +[TC-BR-002] + +**Environment:** +- Local HTML App (opened via Live Server) +- File: `index.html` +- Browser: Chrome + +**Description:** +According to test case TC-BR-002, admins should be able to cancel user pickup requests from the "Pending Pickups" section. However, the current Admin Panel UI does **not include a “Cancel” button**, making it impossible to complete this action. + +**Steps to Reproduce:** +1. Open `index.html` in Live Server +2. Log in as Admin (or simulate admin access) +3. Navigate to the **Admin Panel** → **Pending Pickups** +4. Observe that no “Cancel” option is present for any listed user request + +**Expected Behavior:** +- Each request in "Pending Pickups" should include a visible **"Cancel" button** +- On clicking "Cancel", the request should be removed from the list and show a **confirmation alert/message** + +**Actual Behavior:** +- No "Cancel" buttons are present +- No UI mechanism to remove or manage pickup requests as an admin + +**Severity:** +High — Admin functionality is incomplete and does not support request management + +**Status:** +Open + +**Assigned To:** +_Bridget Ngugi_ + +**Attachments:** +- Screenshot of Admin Panel showing missing Cancel buttons + ![image](https://github.com/user-attachments/assets/a39bde06-ccd4-4908-a881-e06a171bbdec) + + + diff --git a/tests/environment.md b/tests/environment.md new file mode 100644 index 00000000..15a12271 --- /dev/null +++ b/tests/environment.md @@ -0,0 +1,72 @@ +# 🌍 Test Environment Setup – CleanCity QA Project + +**Project:** CleanCity – Waste Pickup Scheduler +**Team Name:** CleanTrackers +**Prepared by:** Samuel Mbai, Martin Kimani, Bridget Ngugi +**Date:** July 4, 2025 + +--- + +## 🧰 Required Tools & Platforms + +| Category | Tool / Platform | +|-----------------------|----------------------------------| +| Version Control | GitHub | +| Browser Testing | Chrome, Firefox, Edge, Safari | +| Device Emulation | Chrome DevTools Responsive Mode | +| Accessibility Testing | axe DevTools, WAVE, NVDA | +| Performance Tools | Google Lighthouse | +| Project Management | GitHub Projects (Kanban Board) | +| Documentation | Markdown (`.md`), GitHub Issues | + +--- + +## 🌐 Browser Compatibility Matrix + +| Browser | OS | Version Tested | +|----------------|---------------|----------------| +| Chrome | Windows/macOS | 114+ | +| Firefox | Windows/macOS | 102+ | +| Safari | macOS/iOS | 15+ | +| Microsoft Edge | Windows | 114+ | + +--- + +## 📱 Device Coverage + +| Device Type | Testing Method | +|-------------|----------------------------------| +| Desktop | Manual + DevTools | +| Tablet | Chrome DevTools → iPad emulation | +| Mobile | Chrome DevTools → iPhone/Android emulation | + +--- + +## 📶 Network Conditions Tested + +| Network Type | Tool/Method | +|--------------|----------------------------------| +| WiFi | Real-time testing (stable) | +| 4G / 3G | Chrome DevTools → Throttling | + +--- + +## ♿ Accessibility Testing Tools + +| Tool | Purpose | +|-----------------|----------------------------------------------| +| axe DevTools | Automated WCAG compliance scans | +| WAVE Extension | Color contrast, landmarks, ARIA checks | +| NVDA | Screen reader simulation (keyboard support) | +| Manual Keyboard | Tab/Shift navigation through all elements | +--- +## 📋 Project Management Platform + +- **Tool:** GitHub Projects (Classic Kanban Board) +- **Workflow:** To Do → In Progress → In Review → Done +- **Issue Types:** Bug, Task, Story +- **Used for:** Task tracking, defect logging, test planning +--- +## 📝 Notes +- All test environments were selected based on project guidelines, device/browser usage statistics, and CleanCity's responsive design expectations. +- Automation tools (e.g., Jest + React Testing Library) may be integrated in Week 2 or 3 for bonus marks. diff --git a/tests/team-roles.md b/tests/team-roles.md new file mode 100644 index 00000000..164f634e --- /dev/null +++ b/tests/team-roles.md @@ -0,0 +1,23 @@ +### 🧑‍💼 Samuel Mbai – Team Lead & QA Coordinator +- Leads weekly meetings and task delegation +- Oversees creation of test strategy and test plan +- Sets up GitHub Kanban board and workflow columns +- Tracks progress and ensures timely submissions +- Reviews documentation, manages GitHub activity + +--- + +### 🧑‍💻 Martin Kimani – Manual Tester & Accessibility Specialist +- Writes and executes test cases for forms, scheduling, and dashboard features +- Performs accessibility checks using tools like axe DevTools and WAVE +- Manually verifies edge cases and mobile responsiveness +- Prepares and maintains test documentation (`test-plan.md`, `test-data.md`, `test-cases.md`) + +--- + +### 👩‍💻 Bridget Ngugi – Functional Tester & Bug Analyst +- Designs and executes manual test cases across all user roles +- Logs bugs clearly in GitHub Issues with steps, screenshots, and severity labels +- Performs exploratory and regression testing across browsers +- Helps maintain defect log and prioritizes reported issues +- Assists in drafting the final test report and 5-minute presentation outline diff --git a/tests/test-cases.md b/tests/test-cases.md new file mode 100644 index 00000000..6442d1a8 --- /dev/null +++ b/tests/test-cases.md @@ -0,0 +1,105 @@ +# BugBreakers CleanCity QA Test Cases + +## 1. Introduction +This document outlines the test cases for the CleanCity project, developed by the BugBreakers team (Samuel, Martin, Bridget). The team shares the workload, with Samuel assigned 6 test cases, Martin 9 test cases, and Bridget 9 test cases, totaling 24 test cases to ensure comprehensive coverage of functional requirements (FRs). + +### 1.1 Objective +To validate the CleanCity application’s functionality, accessibility, usability, performance, security, and compatibility per the requirements in [`functional-requirements.md`](/docs/functional-requirements.md). +## 2. Test Case Summary +| Module | Test Cases | FRs Covered | Tester | Count | +|-----------------------|-------------------------------------|---------------------------------|--------------|-------| +| Authentication | TC-SM-001–TC-SM-002, TC-MT-001–TC-MT-002, TC-SM-006 | FR-001, FR-002, FR-004–FR-005, FR-008 | Samuel, Martin | 5 | +| Pickup Request Form | TC-MT-003–TC-MT-005 | FR-012–FR-013, FR-015 | Martin | 3 | +| Scheduling | TC-SM-003–TC-SM-004 | FR-013 | Samuel | 2 | +| Dashboard | TC-BT-001–TC-BT-003, TC-MT-006 | FR-023, FR-025, FR-027 | Bridget, Martin | 4 | +| Community Feed | TC-MT-007, TC-SM-005 | FR-041–FR-043 | Martin, Samuel | 2 | +| Admin Panel | TC-BT-004–TC-BT-006 | FR-053–FR-054, FR-057 | Bridget | 3 | +| Accessibility | TC-MT-008–TC-MT-009 | FR-071–FR-072 | Martin | 2 | +| Usability | TC-BT-007 | FR-075 | Bridget | 1 | +| `localStorage` | TC-MT-012 | FR-078 | Martin | 1 | +| Performance | TC-BT-008 | FR-084 | Bridget | 1 | +| Security | TC-MT-013 | FR-082 | Martin | 1 | +| Compatibility | TC-BT-009 | FR-086 | Bridget | 1 | +| **Total** | | | | **24** | + +## 3. Test Cases + +### 3.1 Authentication +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-SM-001 | Verify successful user registration | FR-001 | `user1@test.com`, `Test123!` | 1. Navigate to Register. 2. Enter valid email, password. 3. Submit. | Success message, user in `localStorage` | Pass | - | Samuel | +| TC-SM-002 | Verify login with valid credentials (Jest) | FR-004–FR-005 | `user1@test.com`, `Test123!` | 1. Run Jest script to simulate login. 2. Check session in `localStorage`. | User logged in, session stored | Pass | - | Samuel | +| TC-MT-001 | Verify login with invalid email | FR-004 | `invalid-email`, `Test123!` | 1. Navigate to Login. 2. Enter invalid email, valid password. 3. Submit. | Error: “Invalid email format” | Pass | - | Martin | +| TC-MT-002 | Verify password requirements enforcement | FR-008 | `user1@test.com`, `weak` | 1. Navigate to Register. 2. Enter valid email, weak password. 3. Submit. | Error: “Password must be 8+ chars, include uppercase, number” | Pass | - | Martin | +| TC-SM-006 | Verify account verification email sent | FR-002 | `user1@test.com` | 1. Register user. 2. Check email delivery. | Verification email sent | To Do | - | Samuel | + +### 3.2 Pickup Request Form +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-MT-003 | Verify form submission with valid data | FR-012 | Organic waste, 2025-07-20 | 1. Login. 2. Fill form with valid data. 3. Submit. | Success message, request in `localStorage` | Pass | - | Martin | +| TC-MT-004 | Verify form with empty fields | FR-015 | Empty fields | 1. Login. 2. Submit empty form. | Error: “All fields required” | Pass | - | Martin | +| TC-MT-005 | Verify form with invalid waste type | FR-012 | `invalid-type` | 1. Login. 2. Enter invalid waste type. 3. Submit. | Error: “Invalid waste type” | Pass | - | Martin | + +### 3.3 Scheduling +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-SM-003 | Verify scheduling with future date (Jest) | FR-013 | 2025-07-20 | 1. Run Jest script for scheduling. 2. Check `localStorage`. | Schedule saved, confirmation displayed | Pass | - | Samuel | +| TC-SM-004 | Verify scheduling with past date | FR-013 | 2025-07-10 | 1. Login. 2. Schedule pickup for past date. 3. Submit. | Error: “Cannot schedule past date” | Fail | DEF-001 | Samuel | + +### 3.4 Dashboard +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-BT-001 | Verify dashboard stats display | FR-023 | `user1@test.com` | 1. Login. 2. Check dashboard stats. | Stats display correctly | Pass | - | Bridget | +| TC-BT-002 | Verify dashboard filter by status | FR-025 | `Pending` filter | 1. Login. 2. Apply status filter. 3. Check results. | Only `Pending` requests shown | Pass | - | Bridget | +| TC-BT-003 | Verify dashboard sorting by date | FR-027 | Sort by `Date` | 1. Login. 2. Sort dashboard by date. 3. Check order. | Requests sorted by date | Pass | - | Bridget | +| TC-MT-006 | Verify dashboard with localStorage overflow | FR-027 | 10MB data | 1. Login. 2. Fill `localStorage` to limit. 3. Check dashboard. | Error: “Storage limit exceeded” | Fail | DEF-001 | Martin | + +### 3.5 Community Feed +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-SM-005 | Verify community post submission | FR-041–FR-043 | `Test post` | 1. Login. 2. Submit post. 3. Check feed. | Post appears in feed | Fail | DEF-003 | Samuel | +| TC-MT-007 | Verify post with XSS payload | FR-042 | `` | 1. Login. 2. Submit post with XSS. 3. Check sanitization. | XSS sanitized, no alert executed | Pass | - | Martin | + +### 3.6 Admin Panel +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-BT-004 | Verify request status update | FR-053 | `Pending` to `Approved` | 1. Login as admin. 2. Update request status. 3. Check update. | Status updated in `localStorage` | Pass | - | Bridget | +| TC-BT-005 | Verify request cancellation | FR-054 | `Pending` request | 1. Login as admin. 2. Cancel request. 3. Check status. | Request canceled, user notified | Pass | - | Bridget | +| TC-BT-006 | Verify admin data display | FR-057 | `user1@test.com` | 1. Login as admin. 2. Check data display. | All requests displayed correctly | Pass | - | Bridget | + +### 3.7 Accessibility +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-MT-008 | Verify WCAG 2.1 AA compliance (axe scan) | FR-071 | axe DevTools | 1. Run axe scan on homepage. 2. Check violations. | No WCAG 2.1 AA violations | Fail | DEF-002 | Martin | +| TC-MT-009 | Verify keyboard navigation | FR-072 | Keyboard only | 1. Navigate app using Tab/Enter. 2. Check all controls accessible. | All controls reachable by keyboard | Pass | - | Martin | + +### 3.8 Usability +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-BT-007 | Verify intuitive navigation | FR-075 | `user1@test.com` | 1. Login. 2. Navigate app. 3. Check ease of use. | All features accessible in <3 clicks | Pass | - | Bridget | + +### 3.9 localStorage +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-MT-012 | Verify data persistence in localStorage | FR-078 | `user1@test.com` | 1. Login. 2. Submit request. 3. Clear cache, reload. | Data persists in `localStorage` | Fail | DEF-004 | Martin | + +### 3.10 Performance +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-BT-008 | Verify page load time (<3s) | FR-084 | Chrome, `user1@test.com` | 1. Login. 2. Measure load time of dashboard. | Load time <3s | Pass | - | Bridget | + +### 3.11 Security +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-MT-013 | Verify input validation against XSS | FR-082 | `` | 1. Login. 2. Submit form with XSS. 3. Check sanitization. | XSS sanitized, no alert executed | Pass | - | Martin | + +### 3.12 Compatibility +| ID | Description | FR | Test Data | Steps | Expected Result | Actual Result | Defect ID | Tester | +|------------|------------------------------------------------|--------|----------------------------|----------------------------------------------------------------------|----------------------------------------------|---------------|-----------|--------| +| TC-BT-009 | Verify cross-browser compatibility | FR-086 | Chrome, Firefox, Safari, Edge | 1. Login on each browser. 2. Test form submission, dashboard. | Consistent UI/functionality across browsers | Pass | - | Bridget | + +### 3.13 Non-Viable Test Cases +| ID | Reason for Non-Viability | Impact | Action Taken | Tester | +|------------|-------------------------|--------|--------------|--------| +| TC-SM-005 | Community feed not implemented | Cannot test FR-041–FR-043, DEF-003 | Log DEF-005, monitor for implementation | Samuel | + diff --git a/tests/test-plan.md b/tests/test-plan.md new file mode 100644 index 00000000..30f447bd --- /dev/null +++ b/tests/test-plan.md @@ -0,0 +1,164 @@ +# 1. Introduction + +## 1.1 Overview +**Document Version:** 2.0 +**Date:** 2025-07-14 +**Author:** Martin +**Phase:** Test Planning and Execution (STLC Phase 2–3) + +This test plan outlines the strategy, scope, methods, resources, and schedule for quality assurance (QA) testing of the CleanCity web application, a platform for waste management and community engagement. It consolidates deliverables for Week 1 (Phase 1, July 2, 2025) and Week 2 (Phase 2, July 9, 2025) and plans for Week 3 (Phase 3, July 16, 2025) per [`submission.md`](/docs/submission.md), aligning with the Software Testing Life Cycle (STLC) and [`functional-requirements.md`](/docs/functional-requirements.md). + +## 1.2 Objectives +- Validate 100% coverage of functional requirements (FR-001–FR-097) for authentication, waste management, dashboard, content management, and admin functions. +- Ensure WCAG 2.1 AA compliance for accessibility (FR-071–FR-074). +- Verify cross-browser compatibility (Chrome, Firefox, Safari, Edge) per FR-086. +- Confirm responsive design across desktop, tablet, and mobile (FR-069–FR-070). +- Validate performance (page load <3 seconds, FR-084–FR-085) and security (FR-082–FR-083). +- Document at least 15 bugs (3 critical/major, 5 medium, 7 minor/cosmetic) per `faq.md`. +- Implement automated smoke tests using Jest for bonus points. + +# 2. Scope + +## 2.1 In-Scope +| Feature/Module | Testing Areas | +|-------------------------|-------------------------------------------------------------------------------| +| Authentication | Registration, login, session management (FR-001–FR-011) | +| Pickup Request Form | Field validation, scheduling logic, error states (FR-012–FR-019) | +| Dashboard | Stats display, filtering, `localStorage` updates (FR-023–FR-030) | +| Community Feed | Post submission, persistence, moderation (FR-036–FR-044) | +| Admin Panel | Request status updates, cancellation, data display (FR-053–FR-064) | +| Accessibility | WCAG 2.1 AA, alt-text, tab order, screen readers (FR-071–FR-074) | +| Responsive Design | Layout integrity across desktop, tablet, mobile (FR-069–FR-070) | +| Performance | Page load time (<3s), resource usage (FR-084–FR-085) | +| Security | Input validation, XSS prevention (FR-081–FR-083) | + +## 2.2 Out-of-Scope +| Area | Rationale | +|-------------------------|-----------------------------------------------------------------------| +| Backend/API Testing | Client-side only; uses `localStorage` (FR-078) | +| Real-Time Updates | Not supported in current architecture | +| IoT Device Integration | Beyond project scope | +| Localization | English-only per `functional-requirements.md` | + +# 3. Test Approach + +## 3.1 Testing Methods +| Type | Details | +|------------------------|-------------------------------------------------------------------------| +| Manual Testing | UI/UX, form validation, edge cases, exploratory testing, accessibility | +| Automated Testing | Jest for core logic (login, scheduling) | +| Accessibility Testing | Automated (axe, WAVE) and manual (NVDA, keyboard) testing | +| Compatibility Testing | Cross-browser (Chrome, Firefox, Safari, Edge) and device emulation | +| Performance Testing | Lighthouse for page load and resource metrics | +| Security Testing | Manual XSS and input validation tests using `test-data.md` payloads | + +## 3.2 Testing Techniques +- **Black-box Testing**: Validate UI behavior and functional requirements (e.g., form submissions, dashboard filtering). +- **White-box Testing**: Inspect `localStorage` interactions (FR-078–FR-080, e.g., DEF-001). +- **Boundary Value Analysis**: Test input limits (e.g., max string length, date boundaries per `test-data.md`). +- **Equivalence Partitioning**: Test valid/invalid inputs (e.g., emails, request IDs per `test-data.md`). +- **Decision Table Testing**: Validate admin approval/cancellation logic (FR-054–FR-057). +- **Exploratory Testing**: Identify UI/UX and accessibility issues (FR-071–FR-077). + +## 3.3 Test Data +- **Accounts**: `user1@test.com`/`Test123!` (resident), `admin@test.com`/`Admin123!` (admin) per `test-data.md`. +- **Inputs**: Valid/invalid emails (e.g., `invalid-email`), long strings, Unicode characters, XSS payloads (e.g., ``) per `test-data.md`. +- **Scenarios**: Empty inputs, maximum file sizes, `localStorage` limits. + +# 4. Tools and Environment +| Category | Tools | +|--------------------|----------------------------------------------------| +| Testing | Chrome DevTools, axe DevTools, WAVE, NVDA, Lighthouse | +| Automation | Jest (logic) | +| Browsers | Chrome (114+), Firefox (102+), Safari (15+), Edge (114+) | +| Devices | Desktop, tablet (iPad emulation), mobile (iPhone/Android emulation) | +| Network | WiFi, 4G/3G emulation via DevTools | +| Project Management | GitHub Projects (`jira-setup.md`) | +| Development | VS Code for test script writing | +| Test Data | `test-data.md` (e.g., test accounts, XSS payloads) | + +# 5. Roles and Responsibilities + +| Team Member | Role | Responsibilities | +|-------------|-----------------------------------|---------------------------------------------------------------------------------| +| Samuel | Team Lead & QA Coordinator | Oversees test strategy, manages GitHub Projects, reviews documentation, implements Jest automation | +| Martin | Manual Tester & Accessibility Specialist | Writes/executes test cases for forms, scheduling, dashboard, accessibility; maintains `test-plan.md`, `test-cases.md` | +| Bridget | Functional Tester & Bug Analyst | Designs/executes test cases, logs defects in `defect-log.md`, performs compatibility/performance testing, assists with final report | + +# 6. Entry and Exit Criteria + +## 6.1 Entry Criteria +- Test environment documented in `environment.md` (Week 1). +- Test cases drafted for 100% functional coverage in `test-cases.md` (Week 2). +- GitHub Projects configured per `jira-setup.md` (Week 1). +- Test data prepared per `test-data.md` (Week 1). +- Functional and non-functional requirements reviewed (`functional-requirements.md`, Week 1). + +## 6.2 Exit Criteria +- 100% test case execution for functional requirements (FR-001–FR-097). +- At least 15 bugs logged (3 critical/major, 5 medium, 7 minor/cosmetic) in `defect-log.md`. +- All critical/major defects resolved or in “Fixed, Awaiting Retest” status. +- WCAG 2.1 AA compliance verified via axe/WAVE and manual tests. +- Cross-browser compatibility confirmed (Chrome, Firefox, Safari, Edge). +- Performance metrics meet FR-084–FR-085 (page load <3s). +- Traceability matrix in [`traceability-matrix.md`](./traceability-matrix.md +) confirms requirement coverage. +- Final report [`final-report.md`](./final-report) and video submitted per [`submission.md`](/docs/submission.md). + +# 7. Risk Assessment +| Risk | Likelihood | Impact | Mitigation | +|-------------------------------------------|------------|--------|--------------------------------------------------------------------------| +| `localStorage` limitations cause data loss | High | High | Test `localStorage` capacity, log defects (e.g., DEF-001), recommend fallback | +| Accessibility fails WCAG 2.1 (e.g., DEF-002) | Medium | Medium | Run axe/WAVE scans, manual NVDA/keyboard tests (Martin) | +| Insufficient defect count (<15) | High | High | Expand testing to authentication, performance, security, edge cases (Martin, Bridget) | +| Unresolved critical defects (e.g., DEF-001) | Medium | High | Prioritize fixes, retest by July 15 (Samuel, Martin) | +| Cross-browser issues on Safari/Edge | Medium | Medium | Test compatibility early, log defects (Bridget) | +| Limited team bandwidth | Medium | Medium | Redistribute tasks, document solo efforts if needed (Martin, Samuel) | + +# 8. Test Schedule +| Phase | Dates | Notes | +|------------------------|---------------------|-----------------------------------------| +| Requirement Analysis | 26–28 June 2025 | Completed, per [`functional-requirements.md`](/docs/functional-requirements.md) | +| Risk Assessment | 28–29 June 2025 | Completed, documented in this plan | +| Test Planning | 29 June – 1 July 2025 | Completed, `test-plan.md` | +| Test Case Design | 1–7 July 2025 | Completed, `tests/test-cases.md` (Week 2) | +| Test Execution | 7–14 July 2025 | Ongoing, manual (Martin, Bridget), automated (Samuel) | +| Final Reporting | 14–16 July 2025 | `tests/final-report.md`, video submission | + +**Week 2 Summary (Phase 2, July 9, 2025)**: +- Drafted 6 test cases in `test-cases.md` (e.g., TC-SM-001 for dashboard, TC-MK-001 for accessibility), covering forms, scheduling, dashboard, accessibility. +- Initialized `defect-log.md` with 5 defects (2 high, 3 medium, e.g., DEF-001, DEF-002). +- Challenges: Incomplete TC-SM-002 (community post, FR-041–FR-043); `localStorage` issues (DEF-001). + +**Week 3 Plan (Phase 3, July 14–16, 2025)**: +- Finalize 20+ test cases, execute 100% (Martin, Bridget). +- Log 10+ more defects (3 critical/major, 5 medium, 7 minor) (Bridget, Martin). +- Develop Jest scripts for login (FR-004–FR-005) and scheduling (FR-012–FR-013) in `tests/scripts/` (Samuel). +- Create `traceability-matrix.md` and `final-report.md`. +- Record 5-minute video (MP4, <100MB) per `video-guide.md`. + +# 9. Defect Management +- Defects logged in `tests/defect-log.md` and tracked on GitHub Projects per `jira-setup.md`. +- Fields: Summary, description, environment, severity, steps, attachments, linked test case. +- Workflow: Bridget logs defects, Samuel assigns fixes, Martin retests. +- Target: 15 defects (3 critical/major, 5 medium, 7 minor) by July 16. + +# 10. Automation Plan +- **Tool**: Jest for smoke tests (login, scheduling). +- **Scope**: Validate critical paths (FR-004–FR-005, FR-012–FR-013). +- **Timeline**: Scripts drafted by July 14, executed by July 16 (Samuel). +- **Storage**: `tests/scripts/` folder in repository. +- **Goal**: Achieve 10% bonus per `faq.md` by demonstrating automation in video. + +# 11. Test Deliverables +| Document/Artifact | Description | Phase | +|---------------------------|-----------------------------------------------------------------------------|--------| +| `tests/team-roles.md` | Team roles and responsibilities | Week 1 | +| `tests/environment.md` | Test environment setup (browsers, devices, tools) | Week 1 | +| `tests/test-plan.md` | Test strategy, scope, schedule (this document) | Week 1, 2 | +| `tests/test-cases.md` | Manual and automated test cases with results | Week 2, 3 | +| `tests/defect-log.md` | Logged defects with status, severity, and traceability | Week 2, 3 | +| `tests/traceability-matrix.md` | Maps test cases to functional requirements (FR-001–FR-097) | Week 3 | +| `tests/final-report.md` | Test summary, metrics, recommendations | Week 3 | +| Video Presentation | 5-minute MP4 (<100MB) per `video-guide.md` | Week 3 | +| Test Report | PDF (<50MB) per `submission.md` | Week 3 | \ No newline at end of file diff --git a/tests/traceability-matrix.md b/tests/traceability-matrix.md new file mode 100644 index 00000000..b03dccbb --- /dev/null +++ b/tests/traceability-matrix.md @@ -0,0 +1,58 @@ +# 1. Bugbreakers CleanCity QA Traceability Matrix + +## 1.1 Document Overview +**Document Version:** 1.0 +**Date:** 2025-07-14 +**Author:** Martin +**Phase:** Test Case Execution and Reporting (STLC Phase 3) + +This traceability matrix maps test cases from [`test-cases.md`](test-cases.md) to functional requirements (FR-001–FR-097) from [`functional-requirements.md`](../docs/functional-requirements.md), ensuring 100% coverage as required by `Bugbreakers_CleanCity_QA_test-plan.md` and [`submission.md`](../docs/submission.md). It supports Phase 3 deliverables (Week 3, July 16, 2025), linking test cases to defects in `defect-log.md` via GitHub Projects (`jira-setup.md`). The Bugbreakers team (Samuel, Martin, Bridget) verifies mappings to confirm test execution and defect tracking for the CleanCity web application. + +## 1.2 Objectives +- Map all test cases to functional requirements (FR-001–FR-097). +- Verify 100% coverage of authentication, forms, scheduling, dashboard, community feed, admin, accessibility, usability, `localStorage`, performance, security, and compatibility. +- Link test cases to defects (e.g., DEF-001–DEF-004) for traceability. +- Support final report and video submission per `submission.md`. + +# 2. Traceability Matrix +| Test Case ID | FR Covered | Description | Status | Defect ID | Tester | +|--------------|--------------------|------------------------------------------------|--------|-----------|--------------| +| TC-SM-001 | FR-001 | Verify successful user registration | Pass | - | Samuel | +| TC-SM-002 | FR-004–FR-005 | Verify login with valid credentials (Jest) | Pass | - | Samuel | +| TC-MT-001 | FR-004 | Verify login with invalid email | Pass | - | Martin | +| TC-MT-002 | FR-008 | Verify password requirements enforcement | Pass | - | Martin | +| TC-MT-003 | FR-012 | Verify form submission with valid data | Pass | - | Martin | +| TC-MT-004 | FR-015 | Verify form with empty fields | Pass | - | Martin | +| TC-MT-005 | FR-012 | Verify form with invalid waste type | Pass | - | Martin | +| TC-SM-003 | FR-013 | Verify scheduling with future date (Jest) | Pass | - | Samuel | +| TC-SM-004 | FR-013 | Verify scheduling with past date | Fail | DEF-001 | Samuel | +| TC-BT-001 | FR-023 | Verify dashboard stats display | Pass | - | Bridget | +| TC-BT-002 | FR-025 | Verify dashboard filter by status | Pass | - | Bridget | +| TC-BT-003 | FR-027 | Verify dashboard sorting by date | Pass | - | Bridget | +| TC-MT-006 | FR-027 | Verify dashboard with `localStorage` overflow | Fail | DEF-001 | Martin | +| TC-SM-002 | FR-041–FR-043 | Verify community post submission | Fail | DEF-003 | Martin | +| TC-MT-007 | FR-042 | Verify post with XSS payload | Pass | - | Martin | +| TC-BT-004 | FR-053 | Verify request status update | Pass | - | Bridget | +| TC-BT-005 | FR-054 | Verify request cancellation | Pass | - | Bridget | +| TC-BT-006 | FR-057 | Verify admin data display | Pass | - | Bridget | +| TC-MT-008 | FR-071 | Verify WCAG 2.1 AA compliance (axe scan) | Fail | DEF-002 | Martin | +| TC-MT-009 | FR-072 | Verify keyboard navigation | Pass | - | Martin | +| TC-MT-010 | FR-073 | Verify screen reader support (NVDA) | Fail | DEF-002 | Martin | +| TC-MT-011 | FR-074 | Verify color contrast | Pass | - | Martin | +| TC-BT-007 | FR-075 | Verify intuitive navigation | Pass | - | Bridget | +| TC-MT-012 | FR-078 | Verify data persistence in `localStorage` | Fail | DEF-004 | Martin | +| TC-BT-008 | FR-084 | Verify page load time (<3s) | Pass | - | Bridget | +| TC-MT-013 | FR-082 | Verify input validation against XSS | Pass | - | Martin | +| TC-BT-009 | FR-086 | Verify cross-browser compatibility | Pass | - | Bridget | + +**Notes**: +- **Coverage**: Test cases cover FR-001, FR-004–FR-005, FR-008, FR-012–FR-013, FR-015, FR-023, FR-025, FR-027, FR-041–FR-043, FR-053–FR-054, FR-057, FR-071–FR-075, FR-078, FR-082, FR-084, FR-086, addressing key modules (authentication, forms, scheduling, dashboard, community feed, admin, accessibility, usability, `localStorage`, performance, security, compatibility). +- **Defects**: Linked to `defect-log.md` (DEF-001: `localStorage` issues, DEF-002: accessibility violations, DEF-003: community post failure, DEF-004: `localStorage` persistence). +- **Status**: 19 test cases passed, 5 failed, aligning with `test-cases.md` (4.0). +- **Testers**: Samuel (automation, coordination), Martin (forms, scheduling, dashboard, accessibility, `localStorage`, security), Bridget (dashboard, admin, usability, performance, compatibility). + +# 3. Traceability Summary +- **Total Test Cases**: 24, covering all specified FRs. +- **Functional Coverage**: 100% for listed FRs (additional FRs may require further test cases in `final-report.md`). +- **Defect Tracking**: 5 defects logged (DEF-001–DEF-004), targeting 15 by July 16, 2025 (3 critical/major, 5 medium, 7 minor) per `faq.md`. +- **Next Steps**: Review mappings with Samuel and Bridget, finalize defect logging, include in `final-report.md` and video submission. \ No newline at end of file