Associate Playwright BDD scenarios (written in Gherkin .feature files or Playwright TypeScript .spec.ts files) directly with Azure DevOps Test Cases and automatically update their Automation Status in real-time right from VS Code!
🌟 Key Features
Inline CodeLens Integration: One-click scenario association (🔗 ADO: Associate Scenario with Test Case, ✅ ADO [#1234](https://github.com/hari-repos/vscode-playwright-ado-test-automation/issues/1234) (Automated), 🌐 Open in ADO).
Real-Time Azure DevOps Sync: Automatically updates Microsoft.VSTS.TCM.AutomationStatus to "Automated" (or "Not Automated"), setting AutomatedTestName, AutomatedTestStorage, and AutomatedTestId.
Scenario Outline & Examples Support: Assign unique ADO Test Case IDs to individual Examples: blocks in Gherkin feature files.
Repository Configuration (.adoconfig.json): Commit .adoconfig.json in your project repo to auto-configure Organization URL and Project Name so team members only need to provide their Personal Access Token (PAT).
Strict Branch Safeguard: Hardcoded strictly to main, master, and develop branches. Test case updates on unapproved feature branches are strictly blocked to prevent accidental overwrites.
Secure PAT Vault: PAT tokens are saved securely using VS Code's OS-level SecretStorage (Keychain / Credential Vault) with automatic expiration recovery.
Standalone CLI Sync Tool: Includes a CLI utility (npx sync-ado-automation) for CI/CD pipelines.
Enter your Azure DevOps Organization URL (e.g. https://dev.azure.com/your-org), Project Name, and PAT Token (Scope: Work Items: Read & write).
2. Associate a BDD Scenario
Open any .feature or .spec.ts file in your workspace.
Click 🔗 ADO: Associate Scenario with Test Case above any scenario.
Enter the numeric ADO Test Case ID. The extension tags the scenario with @tc:1234 and marks the test case as Automated in Azure DevOps!
💡 CodeLens Setup (Troubleshooting)
CodeLens provides inline clickable actions directly above your scenarios in the editor (🔗 ADO: Associate Scenario with Test Case, ✅ ADO [#1234](https://github.com/hari-repos/vscode-playwright-ado-test-automation/issues/1234) (Automated), 🌐 Open in ADO).
If CodeLenses are not visible above your scenarios:
Open VS Code Settings (Cmd+, on Mac or Ctrl+, on Windows/Linux).
Search for codeLens in the settings search bar.
Ensure Editor: Code Lens is enabled ("editor.codeLens": true).
📁 Repository Configuration (.adoconfig.json)
To share Azure DevOps settings across your project team, create .adoconfig.json in your repository root: