Skip to content

Add Test Plan Generation Tool#6019

Open
jpangas wants to merge 2 commits into
mozilla:masterfrom
jpangas:add-tool-gen-test-cases
Open

Add Test Plan Generation Tool#6019
jpangas wants to merge 2 commits into
mozilla:masterfrom
jpangas:add-tool-gen-test-cases

Conversation

@jpangas
Copy link
Copy Markdown
Contributor

@jpangas jpangas commented May 11, 2026

No description provided.

Copy link
Copy Markdown
Member

@suhaibmujahid suhaibmujahid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks clean! Did you do a dry-run for this version? How does the results looks like?

Comment thread bugbug/tools/test_plans_generator/data_types.py
Comment thread bugbug/tools/test_generation/__init__.py Outdated
@jpangas
Copy link
Copy Markdown
Contributor Author

jpangas commented Jun 1, 2026

I have performed a dry-run, and it is working correctly.

@jpangas jpangas marked this pull request as ready for review June 1, 2026 09:13
Copilot AI review requested due to automatic review settings June 1, 2026 09:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a local runner script and accompanying implementation for generating QA test cases and (optionally) detailed test steps via an LLM-backed tool.

Changes:

  • Introduces TestPlanGenerationTool with prompt templates and a result dataclass.
  • Adds a local CLI script to generate test cases/steps and print them as JSON or JSONL.
  • Defines prompt templates for the two generation phases (cases, then steps).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
scripts/run_test_plans_generator.py New CLI entrypoint to run the generator and emit JSON/JSONL output locally.
bugbug/tools/test_plans_generator/prompts.py Adds prompt templates for generating test cases and test steps.
bugbug/tools/test_plans_generator/data_types.py Adds a small dataclass to represent the generation result.
bugbug/tools/test_plans_generator/agent.py Implements the LLM-backed generator tool and orchestration logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


if not args.generate_steps:
if args.json_lines:
_print_json({"type": "test_cases", **test_cases}, json_lines=True)
return

if args.json_lines:
_print_json({"type": "test_cases", **test_cases}, json_lines=True)
test_plan = _load_json(generated_test_steps, "test steps")

if args.json_lines:
_print_json({"type": "test_steps", **test_plan}, json_lines=True)
Comment on lines +32 to +36
"--no-test-steps",
dest="generate_steps",
action="store_false",
help="Only generate test cases, without detailed test steps.",
)
Comment on lines +10 to +12
class TestPlanGenerationResult:
test_cases: str
test_steps: str | None = None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants