TE
testsmith-io/api-test-automation-bruno
API Test Automation Examples implemented in Bruno for practicesoftwaretesting.com
API Test Automation with Bruno
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.
Features
- 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.
Test API
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 ๐
Examples Included
- GET Request: Fetch a list of brands with
GET /brands. - Login API: Authenticate using
POST /loginwith an email/password payload. - Protected API Request: Authenticate, then use a token to fetch data with
GET /invoices.
Prerequisites
- Bruno installed locally.
- Bruno CLI, the Bruno command-line tool. Install it globally with:
npm install -g @usebruno/cli
Setup and Run
- 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
Automated Workflow
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.
On this page
Contributors
Created December 20, 2024
Updated March 7, 2025