Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tyraelw/trello-api-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

πŸ”· Trello API - Automated Testing Suite

Postman Newman REST API

A comprehensive API testing suite for the Trello REST API, demonstrating automated testing for CRUD operations, dynamic variable handling, and response validation.

πŸ“‹ Table of Contents

🎯 About

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:

  1. Get all existing boards
  2. Create a new board (dynamic naming)
  3. Retrieve the created board
  4. Create TODO and DONE lists
  5. Create a card in TODO
  6. Move card to DONE
  7. Delete the board
  8. Verify deletion (404)

✨ Features

  • βœ… 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

πŸ§ͺ Test Coverage

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

πŸ“¦ Prerequisites

  • Postman (Desktop or Web)
  • Trello Account
  • Trello API Key & Token

πŸš€ Installation

1. Clone Repository

git clone https://github.com/tyraelw/trello-api-testing.git
cd trello-api-testing

2. Import to Postman

Option A: Postman Desktop

  1. Open Postman
  2. Click "Import"
  3. Select trello-api-collection.json

Option B: Postman Web

  1. Go to Postman Web
  2. Click "Import"
  3. Drag and drop trello-api-collection.json

πŸ”‘ Configuration

Step 1: Get Trello Credentials

  1. Go to https://trello.com/app-key
  2. Copy your API Key
  3. Click "Token" link and generate a Token
  4. Save both securely

Step 2: Configure Variables

Method A: Collection Variables (Recommended)

  1. Right-click collection β†’ Edit
  2. Go to "Variables" tab
  3. 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

⚠️ Important: Only edit "Current Value" - not exported with collection

Method B: Environment Variables

  1. Create Environment: "Trello - Local"
  2. Add variables:
{
 "trellokey": "your-key",
 "trellotoken": "your-token",
 "baseUrl": "https://api.trello.com"
}
  1. Select environment from dropdown

πŸ’» Usage

Running in Postman

Run Entire Collection:

  1. Click collection name
  2. Click "Run" button
  3. Select all requests
  4. Click "Run Trello API"

Run Individual Request:

  1. Open request
  2. Click "Send"
  3. 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)

πŸ€– Running with Newman

Newman runs Postman collections from command line.

Install Newman

npm install -g newman

Run Collection

newman run trello-api-collection.json \
 --env-var "trellokey=YOUR_KEY" \
 --env-var "trellotoken=YOUR_TOKEN" \
 --reporters cli,html

Generate HTML Report

newman run trello-api-collection.json \
 --env-var "trellokey=YOUR_KEY" \
 --env-var "trellotoken=YOUR_TOKEN" \
 --reporters html \
 --reporter-html-export testResults.html

Enhanced Reports (Optional)

npm 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.html

πŸ“Š Test Results

Example 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 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

trello-api-testing/
β”œβ”€β”€ trello-api-collection.json # Main collection
β”œβ”€β”€ trello-environment-example.json # Template
β”œβ”€β”€ .gitignore # Protects credentials
└── README.md # Documentation

πŸ›‘οΈ Security Best Practices

  • βœ… Never commit credentials to git
  • βœ… Use environment variables
  • βœ… Keep "Initial Value" empty in collection
  • βœ… Use .gitignore for environment files
  • βœ… Rotate API keys regularly

πŸ‘€ Author

Isrrael Andres Toro Alvarez

πŸ“§ Contact

For questions or feedback: tyrael78w@gmail.com

πŸ”— Related Projects


⭐ If you find this project useful, please consider giving it a star!

About

Automated API testing suite for Trello REST API using Postman and Newman

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /