Viết integration test cho workflow phức tạp giữa nhiều services

Bộ prompt này giúp bạn xây dựng integration test hiệu quả cho hệ thống microservices phức tạp. Bạn sẽ học cách thiết kế test scenarios, quản lý dependencies giữa services, xử lý async operations, và tối ưu hóa test performance. Các prompt được thiết kế để hỗ trợ nhiều ngôn ngữ lập trình và framework testing phổ biến.
Lượt xem 39
AI sử dụng
ChatGPT Gemini Claude

Mục tiêu

Cung cấp các prompt chuyên sâu giúp bạn:

  • Thiết kế test architecture cho workflow đa-service
  • Xây dựng test cases toàn diện với mock và stub
  • Quản lý state và dependencies trong integration test
  • Xử lý async operations và race conditions
  • Tối ưu hóa test execution time và resource usage

Khi nào nên dùng

Sử dụng bộ prompt này khi:

  • Phát triển hệ thống microservices với workflow phức tạp
  • Cần đảm bảo tính toàn vẹn của luồng dữ liệu giữa nhiều services
  • Muốn giảm bugs trong production từ integration issues
  • Xây dựng CI/CD pipeline với test automation
  • Làm việc với team lớn và cần standardize testing approach

Hướng dẫn tùy biến

Để tối ưu kết quả:

  • Thay thế tên services, endpoints, và data models bằng của dự án bạn
  • Chỉ định rõ ngôn ngữ lập trình (Java, Python, Go, Node.js, etc.)
  • Nêu framework testing hiện tại (Jest, Pytest, JUnit, Testify, etc.)
  • Mô tả các external dependencies (databases, message queues, APIs)
  • Cung cấp ví dụ về workflow cần test

Lưu ý

Các prompt này tập trung vào best practices chung. Bạn cần điều chỉnh theo:

  • Độ phức tạp thực tế của workflow
  • Constraints về performance và resource
  • Compliance requirements của dự án
  • Maturity level của test infrastructure hiện tại

Nội dung Prompt

Bạn cần đăng nhập để xem đầy đủ nội dung Prompt.

Có thể bạn quan tâm

Sản phẩm nổi bật