# Strale Test Case Generator

> Strale Test Case Generator is a paid API for AI agents from api.strale.io, paid per call via x402, $0.162/call, status unknown (last checked 2026-09-15).

Generates structured test cases for a described function, including edge cases, given a function description and target language.

## Facts

- Endpoint: GET https://api.strale.io/x402/v2/test-case-generate
- Price: $0.162/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/strale-test-case-generator-ab3c6d5a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gnyPI77MrnH_hXxZEvhyi

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability strale-test-case-generator-ab3c6d5a
```

Example prompt: Generate test cases for a Python function that takes a list of integers and returns the median, including edge cases like empty lists and lists with one element.

## When to prefer this

Choose this endpoint when you need to quickly scaffold test cases from a plain-language function description without writing them manually, especially when edge case coverage matters. Prefer it over general-purpose LLM prompting when you need a consistent, auditable, structured test output with cryptographic chain hashing for compliance or traceability.

## Known failure modes

- Missing or empty function_description returns an error or empty result
- Unsupported or ambiguous language may yield generic test cases
- Very vague function descriptions may produce low-quality or irrelevant tests
- Network timeout if the generative backend is slow to respond

## How this service works

The trust layer for AI agents — 250+ independently tested data capabilities across 27 countries. Execute capabilities via REST, MCP, A2A, or x402 micropayments. Every call returns an audit record with cryptographic chain hashing.

## Output

A structured set of test cases derived from the function description, including normal-path scenarios and (optionally) edge cases, organized by scenario with expected inputs and outputs or assertions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "function_description"
     ],
     "properties": {
      "language": {
       "type": "string"
      },
      "include_edge_cases": {
       "type": "boolean"
      },
      "function_description": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/strale-test-case-generator-ab3c6d5a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
