# Restassured Bootstrap

> Use when Codex needs to scaffold, retrofit, or normalize a Java Rest Assured test module with JUnit 5, Maven or Gradle, shared specifications, and an initial runnable smoke test.

- **Type:** Skill
- **Install:** `agentstack add skill-jovd83-restassured-skill-bootstrap`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jovd83](https://agentstack.voostack.com/s/jovd83)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [jovd83](https://github.com/jovd83)
- **Source:** https://github.com/jovd83/restassured-skill/tree/main/bootstrap

## Install

```sh
agentstack add skill-jovd83-restassured-skill-bootstrap
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Bootstrap Rest Assured

## 1. Inspect

1. Detect the build tool from `pom.xml`, `build.gradle`, or `build.gradle.kts`.
2. Detect the Java version from compiler settings, toolchains, or CI.
3. Detect the active test engine from dependencies and existing tests.
4. Detect existing HTTP test libraries before adding Rest Assured.

## 2. Choose a Baseline

1. Use JUnit 5 for new work unless the repository clearly standardizes on TestNG.
2. Use Rest Assured `6.x` only when Java `17+` is available.
3. Use Rest Assured `5.5.x` for Java `11` compatibility.
4. Add `json-schema-validator`, Testcontainers, or WireMock only when the request requires them.

## 3. Scaffold

1. Run `python bootstrap/scripts/init_restassured_module.py --help` to inspect options.
2. Run the script with the target path, package, build tool, and Java version.
3. Pass a known stable smoke endpoint with `--smoke-path` when the target API does not expose `/health`.
4. Let the script derive an endpoint-specific smoke test class name from `--smoke-path`, or override it explicitly with `--smoke-class-name`.
3. Generate:
   1. The build file additions.
   2. `src/test/java//support/Specifications.java`.
   3. `src/test/java//tests/.java`.
   4. `src/test/resources/test.properties`.
4. Skip overwriting user files unless the request explicitly allows replacement.

## 4. Verify

1. Run the narrowest test command first.
2. Use the generated smoke test class name for the first targeted run, for example `mvn -Dtest=OpenapiSmokeTest test`.
3. Use the generated smoke test class name for Gradle, for example `./gradlew test --tests '*OpenapiSmokeTest'`.
4. Fix missing env vars, base URLs, or TLS settings before writing more tests.

## 5. Read When Needed

1. Read [bootstrap-checklist.md](references/bootstrap-checklist.md) before scaffolding a new module.
2. Read [dependency-matrix.md](references/dependency-matrix.md) when choosing dependencies or plugin wiring.

## 6. Examples

1. Input: `Set up Maven JUnit 5 Rest Assured tests under services/orders.`
   Output:
   ```bash
   python bootstrap/scripts/init_restassured_module.py --path services/orders --build maven --package com.example.orders --java-version 17
   ```
2. Input: `Retrofit this Gradle Java 11 repo without forcing a Java upgrade.`
   Output:
   ```bash
   python bootstrap/scripts/init_restassured_module.py --path . --build gradle --package com.example.api --java-version 11 --restassured-version 5.5.7
   ```
3. Input: `Bootstrap tests for Swagger Petstore, using the OpenAPI endpoint as smoke check.`
   Output:
   ```bash
   python bootstrap/scripts/init_restassured_module.py --path dry-run/petstore-tests --build maven --package com.example.petstore --java-version 17 --smoke-path /api/v3/openapi.json
   ```
4. Input: `Bootstrap tests for /store/inventory and force a specific smoke class name.`
   Output:
   ```bash
   python bootstrap/scripts/init_restassured_module.py --path services/store-tests --build maven --package com.example.store --java-version 17 --smoke-path /store/inventory --smoke-class-name StoreInventorySmokeTest
   ```

## 7. Troubleshooting

1. Problem: The repo already has JUnit 4 only.
   Fix: Add JUnit Jupiter carefully and update the selected test task or Surefire version.
2. Problem: The smoke test fails with `Connection refused`.
   Fix: Confirm `BASE_URL` and server startup order before changing the test.
3. Problem: The target repo uses Kotlin Gradle scripts.
   Fix: Generate Gradle output for `.kts` syntax and keep the repo's existing style.
4. Problem: The generated smoke test uses the wrong endpoint.
   Fix: Rerun the bootstrap script with `--smoke-path` pointing at a stable endpoint exposed by the target API.
5. Problem: The generated smoke test class name is too generic or awkward.
   Fix: Rerun the bootstrap script with `--smoke-class-name` and keep the endpoint-specific path.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jovd83](https://github.com/jovd83)
- **Source:** [jovd83/restassured-skill](https://github.com/jovd83/restassured-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jovd83-restassured-skill-bootstrap
- Seller: https://agentstack.voostack.com/s/jovd83
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
