This guide is for QA / deploy teammates. Use it when a build is ready and you need what changed and how to test for each commit.
In Cursor chat (Agent), say any of:
gen test plangenerate test plan for new commits產測試計畫 / 有新 commit,幫我出 test plan/gen-commit-test-plansCursor will run the generator and put Word files in docs/deploy/commit-plans/.
You can be more specific:
gen test plan for latest commitgen test plan for HEAD~5..HEADgen test plan since abc1234Running the generator creates one Word file per commit under:
docs/deploy/commit-plans/
YYYY-MM-DD_<shortsha>_<slug>.docx
_index.md ← list of all generated plans
Each .docx includes:
These plans are a starting point (from commit message + file paths). For critical releases, refine steps with the developer or ask the Cursor agent to review the real diff.
FPSMS-backend.pip install python-docx
FPSMS-backend).Generate plans for the last 10 commits:
python scripts/generate_commit_test_plans_docx.py HEAD~10..HEAD
Then open the folder:
docs/deploy/commit-plans/
Start from _index.md to see the list, then open each .docx.
python scripts/generate_commit_test_plans_docx.py HEAD~5..HEAD
python scripts/generate_commit_test_plans_docx.py HEAD~1..HEAD
python scripts/generate_commit_test_plans_docx.py <last_deployed_sha>..HEAD
Example:
python scripts/generate_commit_test_plans_docx.py b12b9a49..HEAD
production that are not yet on another branchpython scripts/generate_commit_test_plans_docx.py origin/staging..origin/production
(Adjust branch names to match your remote.)
python scripts/generate_commit_test_plans_docx.py HEAD~10..HEAD --out-dir docs/deploy/commit-plans/release-2026-08-01
python scripts/generate_commit_test_plans_docx.py HEAD~10..HEAD --also-md
python scripts/generate_commit_test_plans_docx.py HEAD~50..HEAD --limit 15
last_sha..new_sha).docs/deploy/commit-plans/ folder (or zip it) with testers.no message), ask the author to clarify before sign-off.docs/deploy/YYYYMMDD_topic.md (see TEMPLATE.md).| File | Purpose |
|---|---|
scripts/generate_commit_test_plans_docx.py |
Auto Word plans per commit |
scripts/generate_deploy_test_plan.py |
One Markdown scaffold for a whole range |
docs/deploy/TEMPLATE.md |
Manual deploy / QA note template |
docs/deploy/20260727_isextra_truck_x_ticket_fix.md |
Example of a filled manual note |
| Problem | What to try |
|---|---|
No module named 'docx' |
pip install python-docx |
No commits in range |
Check the range syntax: A..B means commits reachable from B but not from A |
| Word filename looks odd | Filenames are ASCII-only on purpose (Windows-safe). Chinese text is still inside the document |
| Steps look too generic | Commit had no message or unusual paths — ask author / refine with agent |
| Need frontend checks | This repo is backend; also check FPSMS-frontend if the change is UI |
cd /path/to/FPSMS-backend
git fetch
git checkout <deploy-branch>
pip install python-docx
python scripts/generate_commit_test_plans_docx.py <previous_release_sha>..<this_release_sha>
explorer docs\deploy\commit-plans
(On Mac/Linux, open docs/deploy/commit-plans in Finder/files instead of explorer.)