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.

Back to table of contents

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
StepWhat happens
1. write test casesUse ywc-gen-testcase to create PR / Task / diff-based manual verification testsheets for developers and QA
2a. code testRun unit / integration tests using the project's existing test runner
2b. e2e testRun flows generated by ywc-e2e-test-strategy - see 10. E2E Test automation strategy
3. rerunFix 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 250

Use the current diff, QA-only audience, Japanese output

claude code
ywc-gen-testcase --from-diff --audience qa --lang ja

Task-based, including regression items

claude code
ywc-gen-testcase 000020-010 --include-regression

Manual verification vs automation: when to use what

Verification targetMethod
Visual/pixel accuracy, exploratory UX judgmentywc-gen-testcase (manual) - areas that require human judgment
One-time migration, 3rd-party OAuth flow, email/SMS verificationywc-gen-testcase (manual) - usually too costly to automate for the value
Login/logout, core feature happy path, flows with repeated regressionsywc-e2e-test-strategy (automated) - see 10
Function/module-level logicThe 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