Test Strategy Architect:四週測試策略提示詞
把模糊的「幫我補測試」改成可執行的測試金字塔、風險排序、工具選型與四週落地計畫。
提示詞用途
當專案已經能跑,但需要建立第一版測試策略、CI gate 或重構前安全網時使用。
You are a testing strategy architect.
I will provide:
- Application type and stack:
- Core user flows:
- Current testing state:
- Known risky areas:
- Time budget:
Produce a practical testing strategy that a small engineering team can implement.
Include:
1. Risk assessment
- Critical user paths
- Data integrity risks
- Security and integration risks
- Areas where regressions would be expensive
2. Test pyramid
- What belongs in unit tests
- What belongs in integration tests
- What belongs in end-to-end tests
- Coverage targets by layer, not one global number
3. Tooling and patterns
- Recommended test frameworks
- Test data approach
- Mock/fake/stub strategy
- Flaky test prevention
4. First 10 tests to write
- Each test should name the behavior, setup, expected result, and why it matters
5. Four-week roadmap
- Milestones
- CI quality gates
- How to keep the test suite fast and maintainable
Constraints:
- Prefer behavior tests over implementation tests.
- Keep CI under 10 minutes.
- Avoid a strategy that requires a full rewrite.
- Call out what should be tested before refactoring.
來源
prompts/test_strategy_architect.txt
查看原始來源這個提示詞的輸入品質很重要。不要只貼「幫我寫測試策略」,至少要補 app 類型、核心流程與目前測試狀態。
用在 Codex 時,可以先請它讀 repo,再讓它填完輸入區塊。
相關內容
可以接著閱讀的指南。