# Tool: Tạo Prompt Viết Unit Test Tự Động

> Đạt được độ tin cậy kiểm thử 100% với Bộ Prompt Tự Động Hóa QA của BOP Prompts. Được xây dựng cho Kỹ sư Tự động hóa QA, Backend Developer và những người thực hành TDD, công cụ này tạo các prompt chỉ đạo các mô hình AI viết các bộ test suite hoàn chỉnh, độc lập bằng Vitest, Jest, PyTest hoặc Go Testing Library với cơ chế mock dependency injection và bao phủ toàn bộ các trường hợp biên.

**Category**: prompts-code-design | **Target AI Models**: Gemini 3.1 Pro, GPT-4o

## Domain Parameters:
- `testRunner` (select): Framework kiểm thử (Default: "Vitest")
- `mockStrategy` (select): Chiến lược Mock (Default: "MSW")
- `tableDriven` (toggle): Kiểm thử theo bảng tham số hóa (Parameterized Tests) (Default: "true")
- `testCoverage` (multiselect): Trọng tâm kiểm tra xác nhận (Assertion) (Default: "Happy Path,Boundary Limits,Error Exceptions")

## Master Prompt Engineering Architecture (5 Pillars):
1. **Role & Persona**: Domain expert framing
2. **Task & Deliverable**: Primary objective & constraints
3. **Context & Parameters**: Technical specs & camera/stack parameters
4. **Negative Constraints**: Forbidden artifacts & bad practices
5. **Output Spec**: Section formatting & XML/Markdown structure

## Programmatic API Execution:
```http
POST /api/generate-prompt
Content-Type: application/json

{
  "toolSlug": "generate-prompt-for-automated-unit-testing",
  "rawPrompt": "Your raw concept here",
  "thinkingLevel": "HIGH"
}
```
