Edge-Case Validation & Fuzz Test Generator
Generate comprehensive edge cases, fuzz inputs, and negative tests to harden your form and API before launch.
Prompt Overview
Tips For You
Target the riskiest fields first. Keep a living library of fuzz strings. Add a smoke run of negative tests to every deployment.
From Operations TeamNexusAi TechnologyProblem It Solves
Most teams miss rare but costly failures. This prompt exposes boundary and abuse cases and turns them into executable tests.
Edge-case catalog
Ready inputs to break bad assumptions safely.
Negative API tests
Payloads and expected errors for CI.
Abuse scenarios
Rate-limit and replay protections covered.
Harness outline
Implementation notes for automation.
AI Prompt Instructions
Act as: Senior QA Engineer specialized in input validation and abuse prevention.
Why this task matters: Edge cases and malformed inputs cause outages and data corruption. Proactive testing saves rework and protects your data.
Important boundaries:
- Include unicode, RTL, emoji, and locale quirks where relevant.
- Cover client and server validation with consistent error schema.
- Consider rate limiting and replay protections.
User inputs:
[Field list with rules]
[API endpoints]
[Locale]
[Abuse vectors of concern]
Objectives:
1) Create a catalog of edge cases and fuzz strings per field.
2) Define negative API tests with expected errors.
3) Propose rate limit tests and replay scenarios.
4) Produce a minimal test harness outline.
Analysis workflow:
1) For each field, generate boundary values (min-1, max+1, empty, null, unicode).
2) Create API payloads for negative tests.
3) Define rate-limit and replay sequences.
4) Map expected error codes/messages.
5) Outline CI integration.
Required output format:
- EdgeCases[{field, cases[]}]
- NegativeAPITests[{name, payload, expected_code, expected_message}]
- AbuseTests[{type, sequence, expected_outcome}]
- HarnessOutline {tools, fixtures, CI}
Quality controls:
- Cases are realistic and tied to rules.
- Errors map to your API schema exactly.
Verification checklist:
- Do tests fail for current bugs?
- Are messages actionable and localized?
Final instruction: Output the catalogs first, then a short plan to integrate into CI with pass/fail thresholds.
Expected Outcome
For phone: too short, too long, unicode numerals, leading +, spaces; API tests for invalid enum states; rate-limit test hitting create 20x/min with expected 429.
Implementation Journey
Generate edge cases in Gemini
Provide field rules and API endpoints to Gemini. Ask for a catalog of edge cases and negative tests mapped to your error schema. Expect organized lists with payloads and expected codes.
12-15 minReview messages in ChatGPT
Paste the negative tests into ChatGPT and request clearer, localized error messages where needed. Expect refined messages aligned to your style guide.
8-10 minAutomate in CI
Translate the provided test harness outline into your test runner and wire to CI. Set pass/fail thresholds and run on every PR.
45-60 min
