agentsclimarketplace

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

Install
npx -y skills add testbots-ai/mcp-server --skill testbots-gen-from-requirements

Assembled 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

  1. Call get_context — load existing epics/bots/suites so generated scripts don't duplicate something that already exists.

  2. Call extract_requirements with the file path.

    • The tool only parses the file — it does not generate test cases. That reasoning happens here.
    • .pdf/.docx/.txt/.md return raw_text (and .docx also returns sections by heading).
    • .csv returns rows (list of dicts keyed by header) — treat each row as one requirement/story.
    • .xlsx returns sheets (sheet name → rows) — ask the user which sheet if more than one has content.
    • If the result has an error key, stop and report it to the user (bad path, unsupported type, or file too large) rather than guessing at a fix.
  3. 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.

  4. 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.
  5. 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.

  6. For each concrete UI action a test case needs, call search_step_templates to get the real templateId AND templateTitle — 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". Call get_step_template if it's unclear which placeholder names ({{...}} in templateTitle) a template expects. Never invent a templateId.

  7. Call create_test_script for 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-locator for a live page, check get_page_by_url for an existing locator first; if none exists and a target URL is known, call crawl_url on 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) + a parameters array (NOT params) with one entry per {{placeholder}} in templateTitle — {"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's templateTitle string verbatim into the step's templateTitle field (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_id and story_id are both REQUIRED — create_test_script validates this locally and rejects the call with a clean error if either is missing, matching automationhq-frontend-v2's own create-script form (this is a hard requirement now, not a "recommended" field). Pass website_id if 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 from get_context/list_epics/list_stories. If nothing fits, call create_epic then create_story rather 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/type default to "Not Started"/"WEB" in create_test_script — leave them unless you have a real reason to change them. If status is set to "To Be Repaired", also pass repair_comment — required in that case only.
  8. If more than a few scripts were created, call create_suite and add_scripts_to_suite to group them under one suite named after the source file.

  9. 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 real locatorId — check get_page_by_url first, and if none exists, call crawl_url (when a URL is known) before writing the step
  • Never fabricate a templateId — always resolve it via search_step_templates/get_step_template first
  • Never omit templateTitle on a step whose templateId is a built-in ("template-id-N") — causes a 500
  • Never put step values in params — use parameters (a list); params does not drive step titles or execution
  • Never fabricate locateBy/locatorValue on a ui-locator parameter — pass only {"locatorId": "..."} and let the server enrich it
  • Never call create_test_script without website_id and story_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 as branch_name. Do not silently default to main: it is protected, so a later commit_branch returns 403, the edit stays an uncommitted version, and execute_bot keeps running the last committed one — the change appears saved but never executes. The same branch is what execute_bot needs as targetBranchName, 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) or template-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 error from extract_requirements, do not retry — report it to the user

Keep looking

Skills are one crate of 607,721. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.