Skip to main content
POST
/
test-suites
/
{id}
/
generate-tests
Generate Test Cases
curl --request POST \
  --url https://api.revring.ai/v1/test-suites/{id}/generate-tests \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "prompt": "<string>",
  "previousMessages": [
    {
      "role": "user",
      "content": "<string>"
    }
  ]
}
'
{
  "data": {
    "tests": [
      {
        "name": "<string>",
        "script": "<string>",
        "scoringRubric": "<string>"
      }
    ],
    "messages": [
      {
        "role": "<string>",
        "content": "<string>"
      }
    ]
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication. Generate API keys from the RevRing dashboard.

Path Parameters

id
string<uuid>
required

Test suite ID

Body

application/json
prompt
string
required

Description of the test scenarios to generate

Maximum string length: 5000
previousMessages
object[]

Previous conversation messages for iterative generation

Response

Generated test case suggestions

data
object