Skip to content

OpenAPI Test Generator

Deterministic test generation from OpenAPI specs. This repo provides a core engine, optional feature modules, a CLI, and a Gradle plugin.

Choose your path

Quick start

CLI

./gradlew :cli:installDist
./cli/build/install/openapi-testgen/bin/openapi-testgen --help

Gradle plugin

plugins {
    id("art.galushko.openapi-test-generator") version "0.8.0"
}

openApiTestGenerator {
    specFile.set("src/test/resources/openapi.yaml")
    outputDir.set(layout.buildDirectory.dir("generated/openapi-tests"))
    generator.set("template")
    generatorOptions.putAll(
        mapOf(
            "templateSet" to "restassured-java",
            "templateVariables" to mapOf(
                "package" to "com.example.generated",
                "baseUrl" to "http://localhost:8080",
            ),
        )
    )
}