QCS Playwright Automation Extension
A VS Code extension integrating GitHub Copilot with Azure DevOps and Playwright to automatically generate, maintain, validate, and execute Playwright test suites directly from Azure DevOps Test Cases and Work Items. 🚀 Key Features
📋 Prerequisites
🏁 Quick Start
🧠 The 4-Tier Memory ArchitectureThe extension structures AI memory into 4 distinct scopes to ensure maximum token efficiency, team collaboration, and local developer privacy:
Level 1: Enterprise Skills (
|
| Skill | Key | Description & Patterns |
|---|---|---|
| SSO Authentication | auth-sso |
Microsoft Entra ID login redirects, session persistence via .auth/user.json, MFA handling. |
| Data Tables & Grids | data-tables |
Dynamic row lookup by cell text, column sorting, pagination, virtualized scrolling (AG Grid / Syncfusion). |
| Complex Forms | complex-forms |
Searchable dropdowns (Select2 / Material), date pickers, multi-select components, file uploads, modals. |
| Iframes & Shadow DOM | iframe-shadowdom |
Nested frameLocator() switching and piercing Shadow DOM custom elements. |
Level 2: Global User Memory (~/.qcs/global-memory.md)
Cross-project developer preferences that apply to every repository opened on this machine:
# 👤 Global Developer Profile (~/.qcs/global-memory.md)
- **Developer:** John Doe (QA Automation)
- **Preferred Browser:** Chromium in headed mode (`--headed`)
- **Coding Style:** Always generate TypeScript with strict types and JSDoc comments on Page Object actions.
- **Dynamic Test Accounts:** Prefix test accounts with `johndoe_qa_<timestamp>`.
- Querying:
qcs_get_workspace_memory({ topic: "global" }). - Updating:
qcs_update_workspace_memory({ topic: "global", content: "..." })when the user expresses cross-cutting preferences ("Always...", "By default for all my tests...").
Level 3: Shared Workspace Memory (.qcs/memory/)
Living, project-specific context committed to Git so all team members and Copilot share the same knowledge:
📁 <Project Root>/
└── 📁 .qcs/
├── 📁 memory/ # Shared Team Memory (Committed to Git)
│ ├── 📄 index.md # Catalog of available topics & registered Page Objects
│ ├── 📄 app-profile.md # Configured base URL, browsers, default timeouts
│ ├── 📄 auth.md # SSO login flows & session storageState (.auth/user.json)
│ ├── 📄 page-registry.md # Living register of all Page Objects & components
│ ├── 📄 locators.md # Selector hierarchy & widget conventions
│ ├── 📄 quirks.md # Loading overlay & timing workarounds
│ └── 📁 modules/ # Feature-specific sub-domain memories (e.g. billing.md)
└── 📄 local-memory.md # Private developer local overrides (.gitignore)
- Automatic Updates: Copilot automatically registers newly created Page Objects into
page-registry.md. - Manual Customization: Edit any file in
.qcs/memory/to teach the agent custom selector rules or application quirks. - Re-indexing: Run
QCS Playwright Automation: Sync Workspace Memoryat any time to refresh topic files from your codebase.
Level 4: Workspace Local Memory (.qcs/local-memory.md)
Private developer overrides for this specific project that stay on your local machine and are never committed to Git:
# 🔒 Local Developer Overrides (.qcs/local-memory.md)
- **Local Base URL:** `http://localhost:4200`
- **Preferred Browser Mode:** Headed (`--headed`)
- **Local Test Account:** `qa_tester_john`
- **Notes:** Local Docker Redis container must be running on port 6379 before starting tests.
- Automatic Overlay: When Copilot queries
app-profile, the extension automatically overlays your local overrides on top of the team defaults. - Git Protection: Ignored automatically by
.gitignore(.qcs/local-memory.md).
⌨️ Extension Commands & Sidebar Actions
All actions can be accessed via the QCS Automation Activity Bar side panel or the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
| Action / Command | Identifier | Description |
|---|---|---|
| Connect Azure DevOps | qcsPlaywrightAutomation.signIn |
Sign in with Microsoft Entra ID. |
| Select ADO Organization & Project | qcsPlaywrightAutomation.selectAdoProject |
Change target Azure DevOps Organization and Project. |
| Scaffold Playwright Framework | qcsPlaywrightAutomation.scaffoldFramework |
Initialize workspace folders and install dependencies. |
| Sync Workspace Memory | qcsPlaywrightAutomation.syncWorkspaceMemory |
Scan codebase and populate .qcs/memory/ topic files. |
| Check Framework Updates | qcsPlaywrightAutomation.checkFrameworkUpdates |
Check for framework template updates and apply patches. |
| Search Azure DevOps Test Cases | qcsPlaywrightAutomation.searchTestCases |
Search ADO test cases with live WIQL query in the sidebar. |
| Open Getting Started Walkthrough | qcsPlaywrightAutomation.openWalkthrough |
Launch the interactive 5-step onboarding guide. |
| Switch Agent Branch | qcsPlaywrightAutomation.switchBranch |
Point to alternate or experimental agent prompt branches. |
| Run Setup Check | qcsPlaywrightAutomation.runSetupCheck |
Validate environment prerequisites, Node/npm, and tool readiness. |
| Show Logs | qcsPlaywrightAutomation.showLogs |
Open diagnostic output stream for troubleshooting. |
⚙️ Settings
Configure preferences in VS Code Settings (Ctrl+, $\rightarrow$ search QCS Playwright):
| Setting | Default | Description |
|---|---|---|
qcsPlaywrightAutomation.adoOrg |
"" (auto-detected) |
Azure DevOps organization name. |
qcsPlaywrightAutomation.agentGitOrigin |
https://dev.azure.com/.../qcs-playwright-agent |
Git repository holding central prompts and skills. |
qcsPlaywrightAutomation.agentBranch |
master |
Git branch to fetch agent rules and skills from. |
qcsPlaywrightAutomation.autoSignIn |
true |
Automatically authenticate with Microsoft account at startup. |
qcsPlaywrightAutomation.verboseLogging |
false |
Enables detailed diagnostic output logs. |
🆘 Troubleshooting & Support
- Status indicates
setup requiredordegraded: RunQCS Playwright Automation: Run Setup Checkto identify missing prerequisites. - Authentication Expired: Run
QCS Playwright Automation: Connect Azure DevOps. - Playwright Test Execution Issues: Refer to
docs/troubleshooting.mdin your project for common locator, timeout, and overlay solutions. - Logs: Run
QCS Playwright Automation: Show Logsto inspect real-time traces. - Support Contact: Reach out to DLQCSLeads@Emerson.com.