defprod-sync-story-test-status

Detects per-story test coverage across Playwright, Vitest, and Jest suites and syncs results to DefProd.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/defprod1/defprod-skills --skill defprod-sync-story-test-status-defprod1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: defprod-sync-story-test-status
Source: https://github.com/defprod1/defprod-skills/tree/main/skills/defprod-sync-story-test-status
Command: npx skills add https://github.com/defprod1/defprod-skills --skill defprod-sync-story-test-status-defprod1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping a product's test-status dashboard in sync with the actual state of your test suites is manual and error-prone. This Skill runs a sync script that detects which user stories are covered by tests, executes the suites, and posts pass/fail/flaky results to DefProd so the dashboard reflects reality. ## Core Features & Use Cases - Multi-harness coverage detection: Walks Playwright e2e, Vitest, and Jest suite directories in a single run to map covered vs. uncovered stories. - Automated result sync: Executes each suite with its JSON reporter, merges per-story results, and POSTs a syncStoryTestStatus payload to the DefProd API. - Scoped and safe syncs: Supports --area-key, --test-suites, --dry-run, and --skip-run flags to control scope, preview payloads, and avoid orphan-delete side effects on partial syncs. - Use Case: After retrofitting tests for several stories, ask the agent to sync test status to production; it confirms the destination, runs the script across all configured harnesses, and reports per-story pass/fail counts plus upsert/delete totals. ## Quick Start Ask the agent to sync test status to DefProd, optionally with --dry-run to preview the payload before writing to production.

Frequently Asked Questions about defprod-sync-story-test-status

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync test results to DefProd?

Run the sync-story-test-status.sh script from the repository root with an env file containing DEFPROD_PRODUCT_ID, DEFPROD_API_URL, DEFPROD_API_KEY, and DEFPROD_TEST_SUITES. The script detects coverage, runs each suite with its JSON reporter, and POSTs merged results to the DefProd API.

How do I sync only one test harness or area?

Use --area-key to scope the sync to a single area and --test-suites to override the configured suite list for that run. This prevents the orphan-delete step from affecting areas covered by harnesses you are not running.

Does the sync support Playwright, Vitest, and Jest together?

Yes. DEFPROD_TEST_SUITES accepts a semicolon-separated list of harness:dir:config entries mixing playwright, vitest, and jest. The script walks each suite for coverage, runs it with the appropriate JSON reporter, and merges per-story results with first-wins on overlap.

Can I preview the sync payload without writing to production?

Yes. Pass --dry-run to run coverage detection and test execution but print the payload instead of POSTing it. Use --skip-run to refresh only the covered/uncovered flags without executing the test harnesses.

Why did stories get marked uncovered or deleted after a sync?

A full-product sync upserts payload records and deletes records whose area keys appear in the payload but whose stories do not. If DEFPROD_TEST_SUITES does not cover every area with dashboard entries, those areas lose records; use --area-key for partial syncs.