This repository contains example collections and scripts for API test automation using:
- Bruno for API request management and testing.
- Bruno CLI for running Bruno collections via the command line.
- Examples of GET, POST, and Protected API requests.
- Comprehensive demonstration of API testing workflows with assertions and pre/post-request scripts.
- Fully automated CI pipeline using GitHub Actions to run Bruno collections.
All examples in this repository are designed to work with the Practice Software Testing API, a publicly available API for learning and practicing software testing. You can explore the API documentation and endpoints here:
👉 Practice Software Testing API 👈
- GET Request: Fetch a list of brands with
GET /brands
. - Login API: Authenticate using
POST /login
with an email/password payload. - Protected API Request: Authenticate, then use a token to fetch data with
GET /invoices
.
- Bruno installed locally.
- Bruno CLI, the Bruno command-line tool. Install it globally with:
npm install -g @usebruno/cli
- Clone this repository:
git clone https://github.com/testsmith-io/api-test-automation-bruno.git
- Navigate to the project directory:
cd api-test-automation-bruno
- Run the Bruno collection using Newman:
bru run --env test --reporter-html results.html
The repository includes a GitHub Actions workflow to automatically execute the Bruno collections with Newman. It runs on every push
and pull_request
to ensure the tests pass seamlessly.