COMMON CHECKLIST API TEST CASES

Anh Tester chia sẻ đến bạn checklist test cases cho việc kiểm thử API (common api test cases)

Dưới đây là hơn 150 test cases gợi ý cho các bạn trong quá trình kiểm thử API, các bạn tham khảo nhé.

  1. Verify that the API response status code is 200
  2. Verify that the API response is in the expected format (e.g. JSON, XML).
  3. Verify that the API response contains all the expected
  4. Verify that the API response contains the correct data for each
  5. Verify that the API response time is within acceptable
  6. Verify that the API request parameters are correctly passed to the
  7. Verify that the API request method is correct (e.g. GET, POST, PUT, DELETE).
  8. Verify that the API endpoint URL is
  9. Verify that the API response headers are
  10. Verify that the API response payload size is within acceptable
  11. Verify that the API returns an error message if the request is
  12. Verify that the API returns an error message if the authentication
  13. Verify that the API returns an error message if the request payload is
  14. Verify that the API returns an error message if the requested resource does not
  15. Verify that the API returns an error message if the requested resource is not
  16. Verify that the API returns an error message if the request payload exceeds the allowed
  17. Verify that the API returns an error message if the request payload contains invalid
  18. Verify that the API returns an error message if the request method is not allowed for the
  19. Verify that the API returns a success message if the resource is created
  20. Verify that the API returns a success message if the resource is updated
  21. Verify that the API returns a success message if the resource is deleted
  22. Verify that the API returns a success message if the resource is retrieved
  23. Verify that the API returns the correct resource based on the provided resource
  24. Verify that the API returns the correct resource based on the provided search
  25. Verify that the API response contains the correct pagination
  26. Verify that the API response contains the correct sorting order based on the provided sort
  27. Verify that the API response contains the correct filtering information based on the provided filter
  28. Verify that the API returns the correct results when searching for a partial
  29. Verify that the API returns the correct results when searching for a case-insensitive
  30. Verify that the API returns the correct results when searching for a string with special
  31. Verify that the API returns the correct results when searching for a string with multiple
  32. Verify that the API returns the correct results when searching for a string with a combination of letters and
  33. Verify that the API returns the correct results when searching for a string with
  34. Verify that the API returns the correct results when searching for a string with non-ASCII
  35. Verify that the API returns the correct results when searching for a string with mixed character types (e.g. letters, numbers, symbols).
  36. Verify that the API returns the correct results when searching for a string with HTML
  37. Verify that the API returns the correct results when searching for a string with escape
  38. Verify that the API response contains the correct resource representation based on the provided content
  39. Verify that the API response is compressed when the client sends a request with the "Accept-Encoding" header set to "gzip".
  40. Verify that the API response is not compressed when the client does not send the "Accept-Encoding"
  41. Verify that the API response is not compressed when the client sends a request with the "Accept-Encoding" header set to a value other than "gzip".
  42. Verify that the API response contains the correct resource representation based on the specified language (e.g. English, Spanish, French).
  43. Verify that the API response contains the correct resource representation based on the specified locale (e.g. en-US, fr-FR).
  44. Verify that the API response contains the correct resource representation based on the specified time
  45. Verify that the API response contains the correct resource representation when the resource contains nested objects or
  46. Verify that the API returns a response within a specified timeout
  47. Verify that the API handles concurrent requests
  48. Verify that the API handles partial updates correctly (e.g. PATCH requests).
  49. Verify that the API returns a response with a custom HTTP header when a specific request header is
  50. Verify that the API correctly handles file uploads and
  51. Verify that the API response contains the correct resource representation based on the specified
  52. Verify that the API correctly handles rate limiting and returns the correct HTTP status
  53. Verify that the API correctly handles retries and returns the correct HTTP status
  54. Verify that the API correctly handles redirects and returns the correct HTTP status
  55. Verify that the API correctly handles cookies and returns the correct HTTP status
  56. Verify that the API correctly handles caching and returns the correct HTTP status
  57. Verify that the API correctly handles CSRF tokens and returns the correct HTTP status
  58. Verify that the API correctly handles cross-site scripting (XSS) attacks and returns the correct HTTP status
  59. Verify that the API correctly handles SQL injection attacks and returns the correct HTTP status
  60. Verify that the API correctly handles cross-site request forgery (CSRF) attacks and returns the correct HTTP status
  61. Verify that the API correctly handles input validation and returns the correct HTTP status
  62. Verify that the API correctly handles output encoding and returns the correct HTTP status
  63. Verify that the API correctly handles SSL/TLS certificates and returns the correct HTTP status
  64. Verify that the API correctly handles content negotiation and returns the correct HTTP status
  65. Verify that the API correctly handles authentication and authorization and returns the correct HTTP status
  66. Verify that the API correctly handles request rate limiting and returns the correct HTTP status
  67. Verify that the API correctly handles retry attempts and returns the correct HTTP status
  68. Verify that the API correctly handles timeouts and returns the correct HTTP status
  69. Verify that the API correctly handles network failures and returns the correct HTTP status
  70. Verify that the API correctly handles race conditions and returns the correct HTTP status
  71. Verify that the API correctly handles caching and returns the correct HTTP status
  72. Verify that the API correctly handles versioning and returns the correct HTTP status
  73. Verify that the API correctly handles version negotiation and returns the correct HTTP status
  74. Verify that the API correctly handles content negotiation and returns the correct HTTP status
  75. Verify that the API correctly handles partial updates and returns the correct HTTP status
  76. Verify that the API correctly handles error conditions and returns the correct HTTP status code and error
  77. Verify that the API correctly handles various types of requests, such as GET, POST, PUT, DELETE, OPTIONS, HEAD, and
  78. Verify that the API correctly handles various types of data, such as strings, numbers, dates, and binary
  79. Verify that the API correctly handles various types of authentication, such as basic authentication, token authentication, and OAuth.
  80. Verify that the API correctly handles various types of authorization, such as role-based
  81. Verify that the API returns the correct HTTP status code for requests that are not supported (e.g. HTTP 405 Method Not Allowed).
  82. Verify that the API returns the correct HTTP status code for invalid requests (e.g. HTTP 400 Bad Request).
  83. Verify that the API returns the correct HTTP status code for unauthorized requests (e.g. HTTP 401 Unauthorized).
  84. Verify that the API returns the correct HTTP status code for forbidden requests (e.g. HTTP 403 Forbidden).
  85. Verify that the API returns the correct HTTP status code for resource not found (e.g. HTTP 404 Not Found).
  86. Verify that the API correctly handles pagination and returns the correct resources for each
  87. Verify that the API correctly handles sorting and filtering of
  88. Verify that the API correctly handles searching for resources based on specific
  89. Verify that the API correctly handles batch requests and returns the correct resources for each
  90. Verify that the API correctly handles web hooks and delivers the correct events to subscribed
  91. Verify that the API correctly handles server-side validation and returns the correct HTTP status code and error
  92. Verify that the API correctly handles client-side validation and returns the correct HTTP status code and error
  93. Verify that the API correctly handles field-level validation and returns the correct HTTP status code and error
  94. Verify that the API correctly handles database transactions and returns the correct HTTP status code and error
  95. Verify that the API correctly handles database backups and restores and returns the correct HTTP status code and error
  96. Verify that the API correctly handles encryption and decryption of
  97. Verify that the API correctly handles compression and decompression of
  98. Verify that the API correctly handles rate limiting based on user account or IP
  99. Verify that the API correctly handles authentication based on user account or API
  100. Verify that the API correctly handles authorization based on user roles or
  101. Verify that the API correctly handles cross-origin resource sharing (CORS) and returns the correct HTTP status code and error message.
  102. Verify that the API correctly handles input sanitization and returns the correct HTTP status code and error
  103. Verify that the API correctly handles output sanitization and returns the correct HTTP status code and error
  104. Verify that the API correctly handles SQL injection prevention and returns the correct HTTP status code and error
  105. Verify that the API correctly handles cross-site scripting (XSS) prevention and returns the correct HTTP status code and error message.
  106. Verify that the API correctly handles cross-site request forgery (CSRF) prevention and returns the correct HTTP status code and error message.
  107. Verify that the API correctly handles broken links and returns the correct HTTP status code and error
  108. Verify that the API correctly handles CORS preflight requests and returns the correct HTTP status code and error
  109. Verify that the API correctly handles multi-language support and returns the correct resources for each
  110. Verify that the API correctly handles multi-currency support and returns the correct resources for each
  111. Verify that the API correctly handles multi-timezone support and returns the correct resources for each
  112. Verify that the API correctly handles multi-locale support and returns the correct resources for each
  113. Verify that the API correctly handles multi-region support and returns the correct resources for each
  114. Verify that the API correctly handles multi-tenant support and returns the correct resources for each
  115. Verify that the API correctly handles multi-environment support and returns the correct resources for each
  116. Verify that the API correctly handles multi-platform support
  117. Verify that the API returns the correct response time for different types of requests (e.g. GET, POST, PUT, DELETE).
  118. Verify that the API correctly handles large payloads and returns the correct HTTP status code and error
  119. Verify that the API correctly handles small payloads and returns the correct HTTP status code and error
  120. Verify that the API correctly handles concurrent requests and returns the correct resources for each
  121. Verify that the API correctly handles slow requests and returns the correct HTTP status code and error
  122. Verify that the API correctly handles high traffic and returns the correct HTTP status code and error
  123. Verify that the API correctly handles low traffic and returns the correct HTTP status code and error
  124. Verify that the API correctly handles error recovery and returns the correct HTTP status code and error
  125. Verify that the API correctly handles failover and returns the correct HTTP status code and error
  126. Verify that the API correctly handles load balancing and returns the correct HTTP status code and error
  127. Verify that the API correctly handles server clustering and returns the correct HTTP status code and error
  128. Verify that the API correctly handles versioning and returns the correct resources for each
  129. Verify that the API correctly handles API documentation and returns the correct resources for each API
  130. Verify that the API correctly handles API change logs and returns the correct resources for each API
  131. Verify that the API correctly handles API testing and returns the correct resources for each API
  132. Verify that the API correctly handles API monitoring and returns the correct resources for each API
  133. Verify that the API correctly handles API security and returns the correct resources for each API
  134. Verify that the API correctly handles API performance and returns the correct resources for each API performance
  135. Verify that the API correctly handles API scalability and returns the correct resources for each API scalability
  136. Verify that the API correctly handles API availability and returns the correct resources for each API availability
  137. Verify that the API correctly handles API reliability and returns the correct resources for each API reliability
  138. Verify that the API correctly handles API maintainability and returns the correct resources for each API maintainability
  139. Verify that the API correctly handles API usability and returns the correct resources for each API usability
  140. Verify that the API correctly handles API accessibility and returns the correct resources for each API accessibility
  141. Verify that the API correctly handles API localization and returns the correct resources for each API localization
  142. Verify that the API correctly handles API internationalization and returns the correct resources for each API internationalization metric.
  143. Verify that the API correctly handles API compliance and returns the correct resources for each API compliance
  144. Verify that the API correctly handles API analytics and returns the correct resources for each API analytic metric.
  145. Verify that the API correctly handles API audit logs and returns the correct resources for each API audit
  146. Verify that the API correctly handles API error logs and returns the correct resources for each API error
  147. Verify that the API correctly handles API debug logs and returns the correct resources for each API debug
  148. Verify that the API correctly handles API performance logs and returns the correct resources for each API performance
  149. Verify that the API correctly handles API security logs and returns the correct resources for each API security
  150. Verify that the API correctly handles API usage logs and returns the correct resources for each API usage
  151. Verify that the API correctly handles API event logs and returns the correct resources for each API event
  152. Verify that the API correctly handles API version
  153. Verify response body with JSON Schema

Tài liệu được tham khảo thêm từ tác giả Shady Ahmed

  • Anh Tester

    Đường dẫu khó chân vẫn cần bước đi
    Đời dẫu khổ tâm vẫn cần nghĩ thấu