品質保證需要投入大量時間來設計測試策略和維護測試套件。此技能提供自動化測試生成、覆蓋率分析和端到端腳手架,以加速品質保證工作流程,同時確保 React、Next.js 和 Node.js 應用程式的全面測試覆蓋率。
Télécharger le ZIP du skill
Importer dans Claude
Allez dans Paramètres → Capacités → Skills → Importer un skill
Activez et commencez à utiliser
Tester
Utilisation de "senior-qa". Generate tests for my React button component with variants and disabled states
Résultat attendu:
- Test Suite Generated: button.test.tsx
- Coverage: 92% (8/9 branches tested)
- Missing coverage: disabled interaction state on mobile Safari
- Recommendation: Add integration test for keyboard navigation
Utilisation de "senior-qa". Analyze coverage for my Next.js dashboard
Résultat attendu:
- Low coverage areas: error handling (34%), auth middleware (45%), analytics tracking (51%)
- Priority fix: Error boundary components missing fallback tests
- Suggestion: Add integration tests for authentication flow covering token refresh
Utilisation de "senior-qa". Set up E2E testing for my e-commerce checkout
Résultat attendu:
- Configured Playwright with custom fixtures for cart and checkout flows
- Created 8 E2E scenarios: product search, cart, payment, order confirmation
- Added visual regression testing for checkout pages
Audit de sécurité
SûrAll 101 static findings are FALSE POSITIVES. The scanner incorrectly flagged markdown documentation code blocks as shell commands, TypeScript template literals (backticks) as Ruby backtick execution, argparse help text as weak crypto, and standard file I/O as dangerous operations. This skill contains only legitimate QA documentation and Python CLI tools with no malicious code, network access, command injection vectors, or cryptographic operations.
Facteurs de risque
📁 Accès au système de fichiers (3)
Score de qualité
Ce que vous pouvez construire
元件測試設置
為新元件生成具有正確模擬模式的 Jest 和 React Testing Library 測試。
覆蓋率分析
分析程式碼覆蓋率報告並識別需要額外測試覆蓋率的關鍵未測試程式碼路徑。
測試策略設計
設計全面的測試策略,包括單元測試、整合測試和端到端測試的分佈以及覆蓋率目標。
Essayez ces prompts
使用 senior-qa 技能為我位於 [file-path] 的 React 元件生成單元測試。包含對所有屬性、狀態變更和使用者互動的測試。
對我位於 [directory-path] 的專案運行覆蓋率分析器,並識別覆蓋率最低的前 5 個程式碼路徑,這些應該優先進行測試。
使用 senior-qa 技能為我位於 [project-path] 的 Next.js 應用程式建構使用 Playwright 的端到端測試設定。包含頁面物件模式。
分析我位於 [project-path] 的 Node.js API 並設計涵蓋單元測試、整合測試和合約測試的測試策略。
Bonnes pratiques
- 使用測試金字塔:底部有更多單元測試,整合測試較少,頂部有最少的端到端測試
- 力求在關鍵業務邏輯路徑上達到 80% 的程式碼覆蓋率,同時避免對樣板程式碼設置覆蓋率指標
- 在開發早期生成測試,以便在錯誤進入生產環境之前發現它們
Éviter
- 避免設定 100% 的覆蓋率目標,因為這會鼓勵測試瑣碎的程式碼而不是有意義的場景
- 不要僅依賴端到端測試,因為它們運行緩慢且維護起來脆弱
- 避免測試頻繁變更的實作細節;專注於可觀察的行為