fast-api-tester 1.0.23 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme +55 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-api-tester",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Ultra-fast, connection-pooled API testing library for Node.js",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/readme CHANGED
@@ -259,6 +259,61 @@ await engine.startHeartbeat(async () => {
259
259
 
260
260
  ---
261
261
 
262
+ ## ⚡ Key Visualizations & Diagnostic Features
263
+
264
+ ### 🌊 1. 500 Cascade Waterfall Timeline (Floating Execution Window)
265
+
266
+ - **What it does**: Renders a floating horizontal bar chart displaying the exact timing, duration, and execution sequence of every HTTP request in your test workflow.
267
+ - **Why it matters**: In sequential API chains (e.g., `Auth` → `Cart` → `Checkout`), a single `500 Internal Server Error` can stall downstream services. The waterfall chart visually pinpoints the precise endpoint and millisecond offset where the execution chain collapsed.
268
+ - **Color Coding**:
269
+ - 🟢 Green: Successful execution (2xx / 3xx).
270
+ - 🟠 Orange: Client-side failure (4xx).
271
+ - 🔴 Red Alert: Critical backend server fault (500 / 5xx).
272
+
273
+ ### 🥧 2. Status Code Distribution Matrix
274
+
275
+ - **What it does**: Categorizes responses into high-level HTTP status families (2xx Success, 4xx Client Errors, 5xx Server Failures).
276
+ - **Why it matters**: Quickly exposes whether test failures are caused by client assertion mismatches (404 / 422) or infrastructure/service outages (500 / 502 / 503).
277
+
278
+ ### 📈 3. Historical Run Trend Analysis
279
+
280
+ - **What it does**: Tracks pass/fail counts across the last 10 test execution cycles (persisted automatically via local execution history).
281
+ - **Why it matters**: Detects flaky endpoints, intermittent microservice degradation, and build stability trends over time when running continuous heartbeat monitoring.
282
+
283
+ ### 📄 4. One-Click Executive PDF Export
284
+
285
+ - **What it does**: Embedded browser-side PDF generation via client-side streaming (PDFKit & Blob Stream).
286
+ - **Why it matters**: Instantly creates a clean, C-suite ready PDF summary containing SLA metrics, overall pass rates, and detailed execution logs — no external server-side PDF generator binaries required.
287
+
288
+ ---
289
+
290
+ ## 🚀 Semantic Status Code Helpers
291
+
292
+ To make test assertions more expressive, readable, and maintainable, a comprehensive suite of semantic status code helpers has been integrated into the `ApiResponse` class.
293
+
294
+ These new methods seamlessly wrap around the existing `.expectStatus()` mechanism and error-handling flow, keeping the core engine intact while drastically improving test script readability.
295
+
296
+ ### Summary of Available Helpers
297
+
298
+ | Category | Method | Expected Status Code / Range |
299
+ |---|---|---|
300
+ | 2xx Success | `.expectStatusCreated()` | 201 Created |
301
+ | 2xx Success | `.expectStatusAccepted()` | 202 Accepted |
302
+ | 2xx Success | `.expectStatusNoContent()` | 204 No Content |
303
+ | 2xx Success | `.expectStatus2xx()` | Any 200–299 status code |
304
+ | 4xx Client Errors | `.expectStatusBadRequest()` | 400 Bad Request |
305
+ | 4xx Client Errors | `.expectStatusUnauthorized()` | 401 Unauthorized |
306
+ | 4xx Client Errors | `.expectStatusForbidden()` | 403 Forbidden |
307
+ | 4xx Client Errors | `.expectStatusNotFound()` | 404 Not Found |
308
+ | 4xx Client Errors | `.expectStatusUnprocessableEntity()` | 422 Unprocessable Entity |
309
+ | 4xx Client Errors | `.expectStatus4xx()` | Any 400–499 status code |
310
+ | 5xx Server Errors | `.expectStatusInternalServerError()` | 500 Internal Server Error |
311
+ | 5xx Server Errors | `.expectStatusBadGateway()` | 502 Bad Gateway |
312
+ | 5xx Server Errors | `.expectStatusServiceUnavailable()` | 503 Service Unavailable |
313
+ | 5xx Server Errors | `.expectStatus5xx()` | Any 500–599 status code |
314
+
315
+ ---
316
+
262
317
  ## 📜 License
263
318
 
264
319
  [MIT](./LICENSE) © Kushan Amarasiri