A minimal, runnable Express + SuperTest starter (Node's built-in node:test runner) demonstrating status-code, response-shape, and negative-case assertions for a small users API.
Companion code for the Autonoma blog post: How to Pick API Testing Tools From 5 Categories
Node 18 or newer.
git clone https://github.com/Autonoma-Tools/api-testing-tools.git
cd api-testing-tools
npm install
npm testTwo commands: npm install, then npm test. You should see 5 passing tests.
The five tests cover status codes, response shape, and the negative cases: a 404 for a user that does not exist and a 400 for a POST /users body missing name.
Tests run on Node's built-in node:test runner (npm test is just node --test), so there is no test framework to install. The only dependencies are express for the app under test and supertest for issuing requests against it without binding a port.
api-testing-tools/
├── app.js # Express app: /health, GET /users/:id, POST /users
├── package.json # deps + `npm test` script
└── test/
└── users.test.js # 5 tests: status codes, response shape, 404 + 400
app.js exports the Express app rather than calling listen(), which is what lets SuperTest drive it in-process.
This repository is maintained by Autonoma as reference material for the linked blog post. Autonoma builds autonomous AI agents that plan, execute, and maintain end-to-end tests directly from your codebase.
If something here is wrong, out of date, or unclear, please open an issue.
Released under the MIT License © 2026 Autonoma Labs.