A comprehensive API testing suite for the Trello REST API, demonstrating automated testing for CRUD operations, dynamic variable handling, and response validation.
- About
- Features
- Test Coverage
- Prerequisites
- Installation
- Configuration
- Usage
- Running with Newman
- Test Results
- Project Structure
- Security
- Author
This collection provides end-to-end API testing for Trello's REST API, covering the complete lifecycle of board management with validation at each step.
Testing Flow:
- Get all existing boards
- Create a new board (dynamic naming)
- Retrieve the created board
- Create TODO and DONE lists
- Create a card in TODO
- Move card to DONE
- Delete the board
- Verify deletion (404)
- β Complete CRUD Operations - Full lifecycle testing
- β Dynamic Variables - Automatic ID passing between requests
- β Smart Naming - Incremental board names (TestBoard, TestBoard_1...)
- β 27 Test Assertions - Comprehensive validation
- β Newman Compatible - Ready for CLI execution
- β Security First - No hardcoded credentials
| Endpoint | Method | Tests | Key Validations |
|---|---|---|---|
| Get All Boards | GET | 1 | Status code |
| Create Board | POST | 7 | Name, URL, permissions, labels |
| Get Board | GET | 1 | Board retrieval |
| Create TODO List | POST | 4 | Name, state, board relationship |
| Create DONE List | POST | 4 | Name, state, board relationship |
| Create Card | POST | 5 | Name, list assignment, board link |
| Move Card | PUT | 3 | Name persistence, list update |
| Delete Board | DELETE | 1 | Deletion success |
| Get Deleted Board | GET | 1 | 404 error validation |
Total Tests: 27 automated assertions
- Postman (Desktop or Web)
- Trello Account
- Trello API Key & Token
git clone https://github.com/tyraelw/trello-api-testing.git
cd trello-api-testingOption A: Postman Desktop
- Open Postman
- Click "Import"
- Select
trello-api-collection.json
Option B: Postman Web
- Go to Postman Web
- Click "Import"
- Drag and drop
trello-api-collection.json
- Go to https://trello.com/app-key
- Copy your API Key
- Click "Token" link and generate a Token
- Save both securely
Method A: Collection Variables (Recommended)
- Right-click collection β Edit
- Go to "Variables" tab
- Update Current Value column only:
| Variable | Initial Value | Current Value |
|---|---|---|
| trellokey | YOUR_KEY_HERE | your-actual-key |
| trellotoken | YOUR_TOKEN_HERE | your-actual-token |
| baseUrl | https://api.trello.com | https://api.trello.com |
Method B: Environment Variables
- Create Environment: "Trello - Local"
- Add variables:
{
"trellokey": "your-key",
"trellotoken": "your-token",
"baseUrl": "https://api.trello.com"
}- Select environment from dropdown
Run Entire Collection:
- Click collection name
- Click "Run" button
- Select all requests
- Click "Run Trello API"
Run Individual Request:
- Open request
- Click "Send"
- Check "Test Results" tab
Expected Results:
All tests pass with 200 OK (except "Get Deleted Board" expects 404)
Example output:
β Status code is 200
β Board created successfully
β Board has a name
β Board has a valid URL
β Board is open (not closed)
Newman runs Postman collections from command line.
npm install -g newmannewman run trello-api-collection.json \
--env-var "trellokey=YOUR_KEY" \
--env-var "trellotoken=YOUR_TOKEN" \
--reporters cli,htmlnewman run trello-api-collection.json \
--env-var "trellokey=YOUR_KEY" \
--env-var "trellotoken=YOUR_TOKEN" \
--reporters html \
--reporter-html-export testResults.htmlnpm install -g newman-reporter-htmlextra
newman run trello-api-collection.json \
--env-var "trellokey=YOUR_KEY" \
--env-var "trellotoken=YOUR_TOKEN" \
--reporters htmlextra \
--reporter-htmlextra-export report.htmlExample successful run:
β Create Board
β Board created successfully
β Board has a name
β Board has a valid URL
β Board is open
β Create TODO List
β TODO list created
β List name is "TODO"
β List belongs to board
... (27 total assertions)
βββββββββββββββββββββββ¬βββββββββββ¬βββββββββ
β β executed β failed β
βββββββββββββββββββββββΌβββββββββββΌβββββββββ€
β iterations β 1 β 0 β
β requests β 10 β 0 β
β test-scripts β 20 β 0 β
β assertions β 27 β 0 β
βββββββββββββββββββββββ΄βββββββββββ΄βββββββββ
trello-api-testing/
βββ trello-api-collection.json # Main collection
βββ trello-environment-example.json # Template
βββ .gitignore # Protects credentials
βββ README.md # Documentation
- β Never commit credentials to git
- β Use environment variables
- β Keep "Initial Value" empty in collection
- β Use .gitignore for environment files
- β Rotate API keys regularly
Isrrael Andres Toro Alvarez
- GitHub: @tyraelw
- LinkedIn: Isrrael Toro Alvarez
- Email: tyrael78w@gmail.com
For questions or feedback: tyrael78w@gmail.com
- Cypress E-Commerce Testing - UI automation with Page Object Model
- Grocery Store API - E-commerce API testing
β If you find this project useful, please consider giving it a star!