Copilot ChatModes for Automation Testing
This repository collects reusable "chatmodes" (conversation templates/prompts) tailored for automation testing tasks. Each chatmode is a self-contained markdown file that encodes the prompt, instructions, examples, and expected input/output style so you can quickly run or adapt automation-related conversations.
Included chatmodes
Test Conversion & Migration
SeleniumToPlaywrightConverter/๐ญ Selenium โก Playwright.chatmode.md โ Converts Selenium Page Object Model (POM) code to Playwright in C# .NET. Maintains structure, functionality, and test logic while modernizing to Playwright's async patterns and built-in waiting mechanisms.
CypressToPlaywrightConverter/๐ญ Cypress โก Playwright.chatmode.md โ Converts Cypress test code to Playwright in JavaScript/TypeScript. Transforms Cypress test implementations into modern, robust Playwright tests while preserving business logic and improving reliability.
BDD & Test Scenarios
PlaywrightBDDScenarios/๐ญ Playwright BDD Scenarios (Reqnroll).chatmode.md โ Creates BDD test scenarios for Playwright in C# .NET using Reqnroll (formerly SpecFlow). Helps structure feature files with Gherkin syntax, generate step definitions, and integrate with Playwright for robust test automation.
Reporting & Analytics
PlaywrightExtentReports/๐ญ Playwright Extent Reports.chatmode.md โ Implements ExtentReports for Playwright test automation in C# .NET. Sets up comprehensive HTML reporting with screenshots, test execution logs, detailed metrics, and beautiful visualizations for test results.
How to use a chatmode
- Open the chatmode file you want to use from the folders above.
- Provide your test code, requirements, or description to the chat interface that's running the chatmode.
- The chatmode defines the expected input shape and the preferred output style. Copy the returned code into your project and run it after adding appropriate dependencies.
Example Usage Scenarios
Selenium to Playwright (C#.NET):
Convert the following Selenium test to Playwright (C#.NET + Playwright Test):
// Selenium WebDriver
driver.Navigate().GoToUrl("https://example.com");
driver.FindElement(By.Id("login")).SendKeys("user");
driver.FindElement(By.Id("password")).SendKeys("pass");
driver.FindElement(By.CssSelector("button[type=submit]")).Click();
Cypress to Playwright (JavaScript):
Convert this Cypress test to Playwright:
cy.visit('/login');
cy.get('#username').type('testuser');
cy.get('#password').type('password123');
cy.get('button[type="submit"]').click();
cy.url().should('include', '/dashboard');
BDD Scenarios (Reqnroll):
Create BDD scenarios for a login feature with valid/invalid credentials and
empty field validation using Playwright and Reqnroll.
Extent Reports:
Implement Extent Reports for my Playwright C# .NET test project with
screenshots on failure and detailed test logging.
Naming and file conventions
- Chatmodes are markdown files containing the instructions and examples. Use descriptive filenames and include the source โ target when the chatmode performs conversions (for example:
Selenium โก Playwright).
- Keep the
๐ญ prefix for human-recognizable chatmode files if helpful; it's optional and purely cosmetic.
Adding new chatmodes
- Create a new markdown file at the repository root or inside a dedicated folder, following the naming convention above.
- Include: intent description, example inputs, expected outputs, and any configuration toggles (language, runner, sync/async).
- Add a short README entry in this file referencing the new chatmode (or submit a PR to update this repository README).
Contribution
Contributions are welcome. Simple steps:
- Fork this repository.
- Add or improve chatmode markdown files.
- Open a pull request describing the change and example usage.
License
This repository does not ship a license by default โ if you'd like to apply one, MIT is a good permissive choice. Add a LICENSE file in the repo root for clarity.
Quick Reference
| Chatmode |
Purpose |
Language/Framework |
Use Case |
| Selenium โก Playwright |
Test Migration |
C# .NET |
Converting Selenium POM tests to Playwright |
| Cypress โก Playwright |
Test Migration |
JavaScript/TypeScript |
Converting Cypress tests to Playwright |
| BDD Scenarios (Reqnroll) |
BDD Framework |
C# .NET + Reqnroll |
Creating Gherkin scenarios with Playwright |
| Extent Reports |
Test Reporting |
C# .NET |
Adding comprehensive HTML reports to tests |
Repository Structure
Copilot-ChatModes-For-Testing/
โโโ SeleniumToPlaywrightConverter/
โ โโโ ๐ญ Selenium โก Playwright.chatmode.md
โโโ CypressToPlaywrightConverter/
โ โโโ ๐ญ Cypress โก Playwright.chatmode.md
โโโ PlaywrightBDDScenarios/
โ โโโ ๐ญ Playwright BDD Scenarios (Reqnroll).chatmode.md
โโโ PlaywrightExtentReports/
โ โโโ ๐ญ Playwright Extent Reports.chatmode.md
โโโ README.md