con un clic
wpt-gen-manual-test
// Instructions to manually test the generate workflow of WPT-Gen to verify system integrity.
// Instructions to manually test the generate workflow of WPT-Gen to verify system integrity.
Generate Web Platform Tests (WPT) from minimal XML test suggestions. The agent will autonomously determine the test type and implementation details by analyzing existing repository paradigms. Use when the user asks to generate a Web Platform Test based on a test suggestion.
Best practices for CLI infrastructure, outputs, subprocess management, and templating in WPT-Gen.
Best practices for configuring LLM integrations, concurrent networking, context scraping, and managing prompts in WPT-Gen.
Instructions on managing dependencies, build tools, project architecture rules, and integrating workflows via the Makefile in WPT-Gen.
Guidelines for Python testing using pytest, including coverage constraints, mock migrations, type safety (mypy), and style linting (ruff) in WPT-Gen.
Guidelines for finalizing changes, running presubmit checks, and preparing for submission in WPT-Gen.
| name | wpt-gen-manual-test |
| description | Instructions to manually test the generate workflow of WPT-Gen to verify system integrity. |
This skill provides step-by-step instructions to manually test the generate workflow of WPT-Gen. This acts as a robust smoke test to catch regressions and verify the system's integrity during development.
We will use a small, stable web feature for this test: abortable-fetch.
Run the Generate Workflow:
Execute the following CLI command to trigger the generate workflow for abortable-fetch:
wpt-gen generate abortable-fetch
Wait for Generation: Allow the workflow to complete. It should read blueprints and generate tests autonomously.
Locate Generated Output:
Check the out/ or generated/ directory for the output tests related to abortable-fetch. You can also check the local WPT directory if it outputs there.
Inspect Generated Files:
testharness.js and testharnessreport.js inclusions) is present.AbortController and fetch).Check for Regressions:
After successfully verifying the generated tests, you must clean up the workspace to ensure no residual files interfere with future tests or get accidentally committed to the WPT repository.
Delete Generated Test Files:
Read the ~/.cache/wpt-gen/generated_tests.json file. Parse the path for each generated test and delete those specific files from the file system to safely remove untracked generated files without affecting the user's other work.
Revert Tracked Changes in WPT:
Navigate to the configured WPT repository and safely revert only the files that were modified during the generation step (such as WEB_FEATURES.yml) by running:
WPT_DIR="${WPT_DIR:-../wpt}"
git -C "$WPT_DIR" restore WEB_FEATURES.yml
Clear State Artifacts: Remove the JSON artifact to fully reset the test state:
rm -f ~/.cache/wpt-gen/generated_tests.json