Testbots gen from requirements
Skill testbots-ai/mcp-server/skills/testbots-gen-from-requirements
Read a requirements document and write test scripts that cover it (PDF/DOCX/XLSX/CSV/TXT)From its SKILL.md
npx -y skills add testbots-ai/mcp-server --skill testbots-gen-from-requirementsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
9.1 KB, as published. Nobody here has run it
When to use this skill
The user has a requirements doc, user story export, or spec file and wants TestBots test scripts generated from it — no live app/URL involved.
What to collect before starting
- Absolute path to the requirements file (required)
- Which epic/story to attach the scripts to, if any (optional — ask, don't guess)
Workflow
-
Call
get_context— load existing epics/bots/suites so generated scripts don't duplicate something that already exists. -
Call
extract_requirementswith the file path.- The tool only parses the file — it does not generate test cases. That reasoning happens here.
.pdf/.docx/.txt/.mdreturnraw_text(and.docxalso returnssectionsby heading)..csvreturnsrows(list of dicts keyed by header) — treat each row as one requirement/story..xlsxreturnssheets(sheet name → rows) — ask the user which sheet if more than one has content.- If the result has an
errorkey, stop and report it to the user (bad path, unsupported type, or file too large) rather than guessing at a fix.
-
Read the extracted content and identify discrete requirements — each row (CSV/XLSX), each heading section (DOCX), or each paragraph/numbered item (PDF/TXT) that describes a single piece of behavior.
-
For each requirement, derive one or more Given/When/Then test cases:
- Given — preconditions / starting state
- When — the user action being tested
- Then — the expected observable outcome
- Assign a priority:
critical(core flow, blocks release),high(common path),medium(edge case),low(cosmetic/rare). Base it on language cues in the requirement (e.g. "must", "shall" → critical/high; "may", "optional" → low) — do not invent a priority scheme per file.
-
Build a traceability matrix before creating anything: one row per requirement showing
requirement_id/heading → test case name(s) → priority. Show this to the user for confirmation before writing scripts, since requirements → test case mapping is not always 1:1. -
For each concrete UI action a test case needs, call
search_step_templatesto get the realtemplateIdANDtemplateTitle— templates are live per-project data (built-ins plus org-defined Common Functions), never a fixed list you can assume. Single-word searches work much better than full phrases — e.g. "Navigate" only matches back/forward history templates, use "Go to"/"Open" to find "Open Web Browser and go to page {{text}}"; "Enter Text" matches nothing, use "Enter"; "Assert Text" matches nothing, this platform uses "Verify". Callget_step_templateif it's unclear which placeholder names ({{...}}intemplateTitle) a template expects. Never invent a templateId. -
Call
create_test_scriptfor each derived test case:- Name format: "<Requirement ref> — <Scenario>" (e.g. "REQ-12 — Login with invalid password")
- Steps use the templateIds resolved above. If a requirement needs a
ui-locatorfor a live page, checkget_page_by_urlfor an existing locator first; if none exists and a target URL is known, callcrawl_urlon it to capture real locators rather than falling back to a placeholder. Only leave a single descriptive placeholder step (flagged as needing manual locator/template work) when no concrete UI target or URL is known at all — never guess a raw selector as a substitute. - Build each step in the exact shape below — it is the proven-working one, and the near-miss
variants fail in ways that look like success. Each step needs
templateId+templateTitle(built-ins only) + aparametersarray (NOTparams) with one entry per{{placeholder}}intemplateTitle—{"key": "ui-locator", "value": {"locatorId": "<real id>"}, "paramClass": "ai.automationhq.commons.entities.assets.UILocator"}for element targets (never fabricate locateBy/locatorValue, the server enriches from the saved locator), and{"key": "text", "value": {"type": 0, "value": "<literal>"}, "paramClass": "ai.automationhq.commons.entities.assets.TypeValuePair"}for scalar values. - For every built-in templateId (
"template-id-N"), copy that template'stemplateTitlestring verbatim into the step'stemplateTitlefield (placeholders intact) — the server does not look this up itself for built-ins and omitting it causes a 500 error. Not needed for Common-Function templateIds (real UUIDs). website_idandstory_idare both REQUIRED —create_test_scriptvalidates this locally and rejects the call with a clean error if either is missing, matchingautomationhq-frontend-v2's own create-script form (this is a hard requirement now, not a "recommended" field). Passwebsite_idif the requirement maps to a known application.- Attach to an epic/story (
story_id) if the user specified one, or if there's an obviously matching one fromget_context/list_epics/list_stories. If nothing fits, callcreate_epicthencreate_storyrather than skipping the field — there is always a way to satisfy this now, so don't flag-and-move-on the way this skill used to. status/typedefault to"Not Started"/"WEB"increate_test_script— leave them unless you have a real reason to change them. Ifstatusis set to"To Be Repaired", also passrepair_comment— required in that case only.
-
If more than a few scripts were created, call
create_suiteandadd_scripts_to_suiteto group them under one suite named after the source file. -
Return to the user:
- The traceability matrix (requirement → test case → priority)
- Scripts created (count + names)
- Any requirements skipped and why (ambiguous, no clear UI target, duplicate of existing script)
Rules
- Never fabricate UI locators that weren't derivable from context — flag those scripts instead of
guessing (this mirrors the grounding-rules discipline used for
crawl_url/testbots-gen-from-url) - Never write a raw guessed selector (e.g.
input[type='email']) into a step instead of a reallocatorId— checkget_page_by_urlfirst, and if none exists, callcrawl_url(when a URL is known) before writing the step - Never fabricate a templateId — always resolve it via
search_step_templates/get_step_templatefirst - Never omit
templateTitleon a step whose templateId is a built-in ("template-id-N") — causes a 500 - Never put step values in
params— useparameters(a list);paramsdoes not drive step titles or execution - Never fabricate
locateBy/locatorValueon aui-locatorparameter — pass only{"locatorId": "..."}and let the server enrich it - Never call
create_test_scriptwithoutwebsite_idandstory_id— both are validated locally and rejected if missing; resolve or create an epic/story rather than omitting it - Ask the user which branch the scripts should land on before creating them — offer a new branch alongside the real ones from
list_branches, and pass the answer asbranch_name. Do not silently default tomain: it is protected, so a latercommit_branchreturns 403, the edit stays an uncommitted version, andexecute_botkeeps running the last committed one — the change appears saved but never executes. The same branch is whatexecute_botneeds astargetBranchName, so settle it before the bot runs, not after - Never create a script with 0 steps
- After any step that can trigger navigation (a submit/sign-in/link click) and before the next
step that verifies the result, insert a wait step —
template-id-36("Wait for visibility of {{ui-locator}} for {{number}} seconds", preferred when a destination-page locator is known) ortemplate-id-35("Wait for {{number}} seconds", plain fixed delay ~5-10s otherwise). Skipping this causes the verify step to run before the page has navigated and fail: the URL/element check is a single immediate read with no retry loop, so it sees the page the click was meant to leave. - Script names must be unique — append " (2)", " (3)" if duplicates arise
- Always show the traceability matrix before writing scripts, not just in the final summary
- If the file has an
errorfromextract_requirements, do not retry — report it to the user