09. Writing and running Tests
Guide2 min read
Use this after feature implementation is done and you need to verify that it really works as intended.
09. Writing and running Tests
When to use this flow
Use this after feature implementation is done and you need to verify that it really works as intended. Verification splits into two different branches: automated code tests and manual verification that requires human judgment.
Overall flow
guidebook
1. write test cases -> 2. run test sheet (code test + e2e test) -> 3. if results differ from expectations, fix and rerun| Step | What happens |
|---|---|
| 1. write test cases | Use ywc-gen-testcase to create PR / Task / diff-based manual verification testsheets for developers and QA |
| 2a. code test | Run unit / integration tests using the project's existing test runner |
| 2b. e2e test | Run flows generated by ywc-e2e-test-strategy - see 10. E2E Test automation strategy |
| 3. rerun | Fix results that do not match expectations, then rerun only the relevant test |
ywc-gen-testcase examples
Create a dev+QA testsheet from a PR number
claude code
ywc-gen-testcase 250codex
ywc-gen-testcase 250Use the current diff, QA-only audience, Japanese output
claude code
ywc-gen-testcase --from-diff --audience qa --lang jacodex
ywc-gen-testcase --from-diff --audience qa --lang jaTask-based, including regression items
claude code
ywc-gen-testcase 000020-010 --include-regressioncodex
ywc-gen-testcase 000020-010 --include-regressionManual verification vs automation: when to use what
| Verification target | Method |
|---|---|
| Visual/pixel accuracy, exploratory UX judgment | ywc-gen-testcase (manual) - areas that require human judgment |
| One-time migration, 3rd-party OAuth flow, email/SMS verification | ywc-gen-testcase (manual) - usually too costly to automate for the value |
| Login/logout, core feature happy path, flows with repeated regressions | ywc-e2e-test-strategy (automated) - see 10 |
| Function/module-level logic | The project's existing unit/integration test runner |
The two methods are not substitutes; they complement each other. For UX judgment that automation cannot catch, supplement every release with a manual QA checklist from ywc-gen-testcase.
Previous: 08. Entering an existing Repo for the first time - Next: 10. E2E Test automation strategy