Add Test Plan Generation Tool#6019
Open
jpangas wants to merge 2 commits into
Open
Conversation
Member
suhaibmujahid
left a comment
There was a problem hiding this comment.
Thank you! Looks clean! Did you do a dry-run for this version? How does the results looks like?
Contributor
Author
|
I have performed a dry-run, and it is working correctly. |
There was a problem hiding this comment.
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
TestPlanGenerationToolwith 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.