Quick Start

Screenshot: VS Code with a newly created hello.nap file open, showing the GET request line and the CodeLens Run button above it

Get up and running with Napper in under 5 minutes.

How do I create my first request? (spec: nap-minimal, nap-request)

Create a file called hello.nap:

GET https://jsonplaceholder.typicode.com/posts/1

Run it:

napper run ./hello.nap

You should see the JSON response printed to your terminal.

How do I add assertions? (spec: nap-assert)

Edit hello.nap to verify the response:

[request]
GET https://jsonplaceholder.typicode.com/posts/1

[assert]
status = 200
body.userId = 1
body.title exists

Run it again. Napper will report whether each assertion passed or failed.

How do I use variables and environments? (spec: nap-vars, cli-env)

Create a .napenv file in the same directory:

baseUrl = https://jsonplaceholder.typicode.com

Update your request to use the variable:

[request]
GET {{baseUrl}}/posts/1

[assert]
status = 200

How do I create a test suite?

Create a smoke.naplist file:

[meta]
name = Smoke Tests

[steps]
./hello.nap
./users/get-users.nap
./users/create-user.nap

Run the entire suite:

napper run ./smoke.naplist

How do I use Napper in CI/CD? (spec: cli-output, cli-exit-codes)

Output JUnit XML for your pipeline:

napper run ./smoke.naplist --output junit > results.xml

Napper exits with code 0 when all assertions pass, 1 when any assertion fails, and 2 on runtime errors. This integrates naturally with any CI platform that fails on non-zero exit codes.

Screenshot: Napper CLI output after running a .naplist suite, showing green checkmarks for all assertions and a summary pass/fail count

Next steps