Getting Started¶
Prerequisites¶
- GraalVM Java 25 — the project requires Java 25. Install it using sdkman:
- Maven Wrapper — included in the repository; no separate Maven installation required
Installation¶
Clone the repository and build:
git clone https://github.com/snytkine/api-tester-cli.git
cd api-tester-cli
# JVM build (recommended for development — fast, instant startup after build)
./mvnw clean package
# GraalVM native binary (optional — start instantly, no JVM overhead)
./mvnw -Pnative native:compile
The JVM build produces a JAR in target/ that runs with java -jar. The native build produces a standalone executable in target/.
Running your first test suite¶
Create a simple test suite file, example.yml:
name: "My First Test Suite"
tests:
- name: "Verify API is responding"
request:
method: "GET"
url: "https://httpbin.org/status/200"
assertions:
- type: "status_code"
expected: 200
Run it:
# Using the JAR
java -jar target/api-tester-cli-0.0.1-SNAPSHOT.jar run-suite --suite=$(pwd)/example.yml
# Or use the alias
rs --suite=$(pwd)/example.yml
You'll see the interactive terminal UI with real-time progress. Tests are shown with pass/fail indicators.
Output modes¶
The tool automatically detects your environment and chooses an output mode:
Interactive UI (default on TTY)¶
When running in a terminal, the tool displays an interactive grid showing test progress in real time, with color-coded results (✓ for passed, ✗ for failed).
Disable with --no-ui to force JSON output:
JSON output (CI-friendly)¶
The JSON output is suitable for parsing in CI/CD pipelines and includes detailed assertion failure information. Force it with --no-ui or run on a non-TTY:
Force UI on non-TTY¶
To enable the interactive UI even when stdout doesn't look like a terminal:
Next steps:
- Explore CLI Reference to learn all available options
- Check Test Suite Configuration to understand YAML structure
- Learn Templating to inject dynamic values into your tests
- Explore Assertions to see all 25+ assertion types available