← Back to list

testing-guidelines
by PlosinBen
⭐ 0🍴 0📅 Jan 22, 2026
SKILL.md
name: testing-guidelines description: Rules for when and how to run tests during development
Testing Guidelines
Rules that AI should automatically follow during development.
Backend API Testing
When adding or modifying Backend API:
- Ensure corresponding test file exists (
*_test.go) - New APIs must include test cases
- Run all Go tests:
docker compose exec backend go test ./...
- All tests must pass before completion
Test File Locations
- Handler tests:
internal/handlers/*_test.go - Service tests:
internal/services/*_test.go
Frontend Browser Testing
When modifying frontend pages:
- Use
browser_subagentto simulate user behavior on that page - Do NOT write JavaScript test code
- Tests should cover the modified functionality flow
Testing Principles
- Simulate real user actions (click, type, navigate)
- Verify UI state changes
- Verify API call results are reflected in the UI
Example Test Flow
1. Open target page
2. Perform user actions (click buttons, fill forms)
3. Verify page displays correct results
4. Report test results
Database Schema Changes
When modifying database schema (add/modify migrations):
- Reset database
- Run all API tests (which creates test data)
# 1. Drop and recreate database
docker compose exec postgres psql -U postgres -c "DROP DATABASE IF EXISTS lovelion"
docker compose exec postgres psql -U postgres -c "CREATE DATABASE lovelion"
# 2. Run migrations
docker compose exec backend migrate -path /app/migrations -database "$DATABASE_URL" up
# 3. Run API tests (creates test data)
docker compose exec backend go test ./...
Summary Table
| Scenario | Automatic Action |
|---|---|
| Add/modify Backend API | Run all Go tests |
| Modify frontend page | Browser test that page |
| Modify database schema | Reset DB + Run all API tests |
Score
Total Score
40/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon