This skill converts manual test cases into production-ready automated test scripts. It analyzes the existing automation framework, interprets manual test steps, and generates maintainable tests following automation best practices. Use this skill whenever the user wants to automate manual test cases, expand test coverage, or create end-to-end automated flows from existing test documentation.
Input may be plain text, markdown steps, or comment blocks in source files (//, /* */).
2.1 Normalize Input Structure
Convert input into:
summary (or scenario title).
preconditions (optional).
steps (required) — ordered actions with expected results.
For comment-based inputs:
Treat comment markers (//, *, -) as structural hints.
Convert bullet points into ordered steps.
Bind _Expected:_ or Expected Results blocks to the preceding step.
Merge multiline expected results into a single logical expectation.
Example:
* Navigate to page
_Expected:_ Page opens
* Click once on the ${Custom statuses} block
_Expected_: List includes "manual" option.
Do not delete or rewrite original manual test comments.
Keep them as-is in the file.
Generate automation code below or alongside them.
Separate with a marker: // === AUTO-GENERATED TEST (based on steps above) ===
2.2 Handle Ambiguous Steps
Classify each step:
Clear => proceed.
Partially clear => make a reasonable assumption, mark it with ⚠️ in output (e.g., "⚠️ Assuming 'Submit' button triggers form submission"), continue.
Unclear and blocking => ask the user, with numbered options when there are alternatives:
❓ Do you want to:
1. Use existing LoginPage
2. Create new LoginPage
3. Skip login step
Use context from previous steps and common UI patterns (click, input, navigation).
Do not block the whole flow on one unclear step — continue with the rest.
2.3 Detect Inconsistencies
If step actions, expected results, and known UI patterns disagree:
Use automate-manual-test-cases skill for CodeceptJS framework to write automation
script "tests/plan-for-guest.test.ts" based on manual steps below in this file as
comments (leaving comments in the file for further analysis). Set a specific "smoke"
tag for this test.
Use as reference for extra proper examples:
* `tests/payment-methods.test.ts` - Canonical test file with team approved format.
* `src/pages/paymentMethods.page.ts` - Good described payment page object.
Avoid mistakes from legacy code examples:
* `src/pages/paymentOutdated.page.ts` - Outdated example with old patterns.
Finally, verify that the generated test is passed on - `BASE_URL = 'https://test.com/'`
and provide final review for user.
1---2name: automate-manual-test-cases3description: This skill converts manual test cases into production-ready automated test scripts. It analyzes the existing automation framework, interprets manual test steps, and generates maintainable tests following automation best practices. Use this skill whenever the user wants to automate manual test cases, expand test coverage, or create end-to-end automated flows from existing test documentation.4license: MIT5---67# Automate Manual Test Cases89Generate production-ready automated test scripts from manual test cases, reusing the project's existing framework, patterns, and components.1011## Checklist1213Complete all steps in order:14151. [ ] Analyze project architecture => detect framework (1.1), analyze conventions (1.2), find reusable components (1.3).162. [ ] Understand manual test => normalize input (2.1), handle ambiguous steps (2.2), detect inconsistencies (2.3).173. [ ] Write test code => implement using existing POM/patterns (3.1-3.2), add assertions (3.3), output code (3.4).184. [ ] Verify & heal => execute test (4.1), heal if fails: locators → timing → assertions → flow (4.2), **max 3 attempts**.195. [ ] Finalization => save test (5.1), manage test data & fixtures (5.2), run related tests and output summary (5.3).2021### Progress2223* STEP: 1/5 (Analyze Project Architecture)24* Previous: (none)25* Next ➡️ Step 2: Understand Manual Test.2627Update this block after completing each step (see CLAUDE.md).2829## Step 1: Analyze Project Architecture3031### 1.1 Detect Automation Framework3233- If the user specifies a framework (e.g., "use CodeceptJS") => trust it.34- Otherwise inspect the project:35 - `package.json` dependencies and scripts.36 - Config files (`playwright.config.js`, `codecept.conf.js`, `cypress.json`, etc.).37- If detection fails, ask with numbered options:3839 ```40 ❓ Which framework should I use?41 1. Playwright42 2. CodeceptJS43 3. Cypress44 4. Other (specify)45 ```4647After detection, apply the matching reference:48- [CodeceptJS Best Practices](./references/CODECEPTJS_BEST_PRACTICES.md)49- [Playwright Best Practices](./references/PLAYWRIGHT_BEST_PRACTICES.md)5051### 1.2 Analyze Project Conventions5253- Test structure and naming: folders (`tests/`, `e2e/`) and file patterns (`*.spec.js`, etc.).54- Execution: `package.json` scripts and test commands.55- Configuration: base URLs, env variables, global setup.56- Assertion style: libraries and patterns used in existing tests.5758### 1.3 Identify Reusable Components5960Scan for:61- Page Objects: existing locators and methods (`src/pages`, `pages/`, `page-objects/`, etc.).62- Fixtures/hooks: setup and teardown patterns.63- Test data: constants, CSV, JSON (`test-data`, `src/testData`, etc.).64- Utils/helpers (`utils/`, `helpers/`, etc.).6566Exclude from analysis:67- Dependency folders (`node_modules/`).68- Build artifacts (`dist/`, `build/`, `out/`).69- Hidden/system folders (`.git/`, `.cache/`).70- Deprecated code: `deprecated/`, `legacy/`, `old/`, `backup/`, `__backup__/`, `archive/`, `temp/`, files marked `outdated`, older versioned folders (`v1/`, `v2/`) when newer versions exist.71- Do not auto-exclude folders with unclear purpose.72- **User-specified exclusions always override auto-detected ones.**7374## Step 2: Understand Manual Test7576Input may be plain text, markdown steps, or comment blocks in source files (`//`, `/* */`).7778### 2.1 Normalize Input Structure7980Convert input into:81- `summary` (or scenario title).82- `preconditions` (optional).83- `steps` (required) — ordered actions with expected results.8485For comment-based inputs:86- Treat comment markers (`//`, `*`, `-`) as structural hints.87- Convert bullet points into ordered steps.88- Bind `_Expected:_` or `Expected Results` blocks to the preceding step.89- Merge multiline expected results into a single logical expectation.9091Example:9293```md94* Navigate to page 95 _Expected:_ Page opens96* Click once on the ${Custom statuses} block97 _Expected_: List includes "manual" option.98```99100**Do not delete or rewrite original manual test comments.**101- Keep them as-is in the file.102- Generate automation code below or alongside them.103- Separate with a marker: `// === AUTO-GENERATED TEST (based on steps above) ===`104105### 2.2 Handle Ambiguous Steps106107Classify each step:108- Clear => proceed.109- Partially clear => make a reasonable assumption, mark it with ⚠️ in output (e.g., "⚠️ Assuming 'Submit' button triggers form submission"), continue.110- Unclear and blocking => ask the user, with numbered options when there are alternatives:111112 ```113 ❓ Do you want to:114 1. Use existing LoginPage115 2. Create new LoginPage116 3. Skip login step117 ```118119Use context from previous steps and common UI patterns (click, input, navigation).120**Do not block the whole flow on one unclear step — continue with the rest.**121122### 2.3 Detect Inconsistencies123124If step actions, expected results, and known UI patterns disagree:125- Proceed with best-effort interpretation.126- Flag with ⚠️ in output.127128## Step 3: Write Test Code129130### 3.1 Choose Implementation Strategy131132- Reusable components exist (Page Objects, helpers, fixtures) => reuse them; follow project patterns and naming.133- Partial structure exists => extend existing components; keep consistency with current design.134- No structure => simple readable locators, minimal implementation, no unnecessary abstractions.135136Priorities: consistency with the project, then readability, then maintainability.137138**Do not ignore existing Page Objects or duplicate selectors/logic.**139140### 3.2 Follow Framework Patterns141142- One test, one flow — each test validates a single scenario.143- Separation of concerns: tests => assertions and flow control; Page Objects => UI interactions; utils => reusable logic.144- Extend, don't modify — add to existing components without changing stable code.145- Use fixtures for setup, authentication, and shared state.146147See [POM Best Practices](./references/POM_BEST_PRACTICES.md).148149### 3.3 Generate Assertions150151- Base assertions on expected results from manual steps.152- Validate UI state (visibility, text, attributes), data correctness, navigation outcomes.153- Avoid weak assertions (only checking page load) and over-asserting irrelevant details.154155### 3.4 Output Test Code156157- Generate complete, runnable code that integrates with the existing framework.158- Follow project formatting and style conventions.159- Place code in the appropriate test file or suggest a location.160161## Step 4: Verify & Heal162163### 4.1 Execute Test164165**Run only the generated test, never the full suite:**166- Playwright: `npx playwright test path/to/spec.ts`167- CodeceptJS: `npx codeceptjs run path/to/test.js`168169If it passes => go to Step 5. If it fails => heal (4.2).170171### 4.2 Heal Failed Tests172173Fix one issue at a time, in priority order:1741. Locators — prefer stable selectors (`data-testid`, `aria-label`), avoid deeply nested XPath.1752. Timing — use framework-native waits, avoid hard sleeps.1763. Assertions — match actual app behavior, not assumptions.1774. Flow — verify navigation, preconditions, missing steps.178179Process: identify a single failure => apply one fix => re-run => repeat.180Keep the last working version to roll back to if stuck.181182**Max 3 healing attempts. If still failing, stop and report the issues.**183184When the root cause is unclear, use the debug-fix-failed-flaky-autotests skill for structured step-by-step diagnosis.185186If MCP/debug tools are available:187- Inspect DOM (`document.querySelector(...).outerHTML`).188- Use step-by-step execution.189- Capture logs, screenshots, or traces.190191### 4.3 Stability Criteria192193A test is stable when it:194- Passes 1-2 consecutive runs.195- Has no hard waits.196- Uses resilient locators.197198## Step 5: Finalization199200### 5.1 Save Final Test Code201202- Save the working test to the appropriate project location.203- Follow naming conventions and stay consistent with existing tests.204205### 5.2 Test Data & Fixtures206207- Use centralized test data if the project has it (JSON/CSV/constants).208- Reuse authentication/setup fixtures; don't duplicate setup inside tests.209210See [Test Data Management](./references/TEST_DATA_MANAGEMENT.md).211212### 5.3 Final Run & Summary213214- Execute 1-2 related tests to confirm integration (related tests only, not the full suite).215- Exit condition: test passes 2 consecutive runs.216- Show a spec-to-code mapping:217218 | Manual Step | Automation Action |219 |-------------|-------------------|220 | Navigate to Settings | `basePage.clickOnNavigationMenuButton("Settings")` |221222- Output the final summary using [Final Summary Template](./references/FINAL_SUMMARY_TEMPLATE.md).223224## Example: Comment-Based Request225226```227Use automate-manual-test-cases skill for CodeceptJS framework to write automation228script "tests/plan-for-guest.test.ts" based on manual steps below in this file as229comments (leaving comments in the file for further analysis). Set a specific "smoke"230tag for this test.231Use as reference for extra proper examples:232* `tests/payment-methods.test.ts` - Canonical test file with team approved format.233* `src/pages/paymentMethods.page.ts` - Good described payment page object.234Avoid mistakes from legacy code examples:235* `src/pages/paymentOutdated.page.ts` - Outdated example with old patterns.236237Finally, verify that the generated test is passed on - `BASE_URL = 'https://test.com/'`238and provide final review for user.239```
Run npx skillmds@latest add testomatio/automate-manual-test-cases in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
This skill converts manual test cases into production-ready automated test scripts. It analyzes the existing automation framework, interprets manual test steps, and generates maintainable tests following automation best practices. Use this skill whenever the user wants to automate manual test cases, expand test coverage, or create end-to-end automated flows from existing test documentation. It is listed under Docs & Writing on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
testomatio (@testomatio) published this skill. Their other Agent Skills are listed on their SkillMD profile.