Bug Test Automation

Writes automated tests for a bug: generates test code from the bug context, runs it locally, and opens a PR with the new tests.

Parameters

Configured via customParams in the agent JSON or the project .dmtools/config.js (project values win).

  • autoStartReview — when true, automatically trigger the PR review workflow after this agent finishes.
  • autoStartReviewConfigFile — agent config file used for the auto-started review workflow.
  • checkOpenPR — when true, skip tickets that already have an open pull request for this work.
  • customStatuses — status name overrides for this workflow (maps logical statuses to project-specific names).
  • removeLabel — label removed from the ticket after a successful run (idempotency cleanup).
  • testFilesGlob — glob that selects which test files belong to this automation scope.

Human doc: agents/docs/agents/bug_test_automation.md

Attributes

AttributeValue
JobTeammate
Configbug_test_automation.json
ContextIdbug_test_automation
outputTypenone
skipAIProcessingtrue

Prompt snapshot

Full prompt / instruction set: agents/snapshots/bug_test_automation.md

Actions

preJSAction: checkWipLabel.js

Check WIP Label Pre-Action

  • Source: agents/js/checkWipLabel.js
  • Side effects:
    • post Jira comment
  • Parameters (customParams):
    • checkOpenPR

preCliJSAction: preCliStoryTestAutomationSetup.js

Pre-CLI Story Test Automation Setup Action

  • Source: agents/js/preCliStoryTestAutomationSetup.js
  • Writes:
    • input/<KEY>/merge_conflicts.md
    • outputs/review_replies.json
  • Side effects:
    • git push
    • git checkout
  • Parameters (customParams):
    • testFilesGlob

postJSAction: postStoryTestAutomationResults.js

Post Story Test Automation Results Action

  • Source: agents/js/postStoryTestAutomationResults.js
  • Side effects:
    • post Jira comment
    • attach file to ticket
    • git push
    • git merge
  • Parameters (customParams):
    • autoStartReview
    • autoStartReviewConfigFile
    • customStatuses
    • removeLabel
    • testFilesGlob

LLM step

  • outputType: none
  • Prompt snapshot: agents/snapshots/bug_test_automation.md

Custom params

  • removeLabel: "sm_bug_test_automation_triggered"
  • checkOpenPR (used by JS action)
  • testFilesGlob (used by JS action)
  • autoStartReview (used by JS action)
  • autoStartReviewConfigFile (used by JS action)
  • customStatuses (used by JS action)

Generated by js/agentDocGenerator.js

View the agent config on GitHub →

Generated from bug_test_automation.json in the agents repository and its human doc — edit either and the page follows. Last updated .