Skip to content

Use case · API testing

API test case generator for QA

Give Testfolio an OpenAPI or Swagger file, a Postman collection or a few cURL commands, and it drafts manual API test cases: the request to send, the data to use and the status code and response you should see.

Open the test case generator

What you can give it

  • OpenAPI 3.x and Swagger 2.0 files (.json, .yaml or .yml). Paths, parameters, request bodies, schemas, security schemes and documented responses are read in your browser.
  • Postman Collection v2.0 or v2.1 exports, including folders, example bodies and saved responses.
  • cURL commands pasted into the text box, with the response you expect written beside them.
  • Plain-text API notes such as rules from a ticket (“quantity is 1–50”, “only admins can cancel”). Combine them with a file: business rules are often missing from the spec.

Credential values in common formats, such as authorization headers, API keys and tokens, are replaced with [REDACTED] before anything is saved or sent. Redaction is pattern-based, so check unusual formats yourself. The fact that an endpoint needs authentication is kept so it can be tested.

Example

An OpenAPI excerpt for creating an order, attached as a file:

Input: orders.openapi.yaml (excerpt)
openapi: 3.0.3
info: { title: Orders API, version: "1.4" }
paths:
  /v1/orders:
    post:
      summary: Create an order
      security: [{ bearerAuth: [] }]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [sku, quantity]
              properties:
                sku: { type: string, pattern: "^[A-Z]{3}-\\d{4}$" }
                quantity: { type: integer, minimum: 1, maximum: 50 }
      responses:
        "201": { description: Order created, returns the order with status "pending" }
        "400": { description: Validation error, e.g. {"error":"quantity_out_of_range"} }
        "401": { description: Missing or invalid token }
        "404": { description: Unknown SKU }

Two illustrative test cases of the kind Testfolio drafts for this input, shortened for this page. Generated output varies; a full set would typically also cover the SKU pattern, a missing token and an unknown SKU, grouped into scenarios.

TC-003Reject a quantity above the maximum of 50Priority: High
Preconditions:
A valid bearer token for a test customer. SKU ABC-1234 exists.
Test data:
Body: {"sku":"ABC-1234","quantity":51}
Basis:
Documented (schema: quantity maximum 50)
#ActionExpected result
1Send POST /v1/orders with the test data and the bearer token.Response status is 400.
2Read the response body.Body contains {"error":"quantity_out_of_range"}.
3List the customer's orders.No new order was created.
TC-001Create an order with the boundary quantity of 1Priority: High
Preconditions:
A valid bearer token for a test customer. SKU ABC-1234 exists.
Test data:
Body: {"sku":"ABC-1234","quantity":1}
Basis:
Documented
#ActionExpected result
1Send POST /v1/orders with the test data and the bearer token.Response status is 201.
2Read the response body.The order has quantity 1 and status "pending".

The spec doesn't say whether a repeated request creates a second order. Where input is silent like this, Testfolio is designed to add an open question and mark dependent tests as needing clarification rather than guess. Review the draft either way.

What you get

  • Scenarios per endpoint or behaviour, each with test cases that have preconditions, test data, steps and expected results.
  • Positive, negative, boundary and authorization cases where the input defines the rules for them.
  • Each test labelled Documented, Assumption or Exploratory, so you can see what the spec actually supports.
  • Everything is editable. Export to Excel (with Execution Status and Actual Result columns for a test run), Markdown or CSV.

Limitations

  • Testfolio writes manual test cases. It doesn't send requests to your API or generate automation code.
  • Up to 5 files per request, each up to 2 MB. References to other files or URLs inside a spec are reported, not fetched.
  • Very large specs can exceed one request; attach only the endpoints you want to test.
  • Expected results are only as precise as the spec. Undocumented behaviour becomes an open question or an assumption to review.

Tips for better API test cases

Document error bodies and limits in the spec, add the business rules the spec can't express as a short note, and say which endpoints are out of scope. See supported inputs in the documentation.

Try it with your own requirements

Browsing and sample results need no account. Generating tests needs a sign-in and uses credits; editing and exports are free.

Open the test case generator