Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,19 @@ jobs:
- name: Build images
run: |
make docker-compose
- name: Start services
run: |
MODE=dev make start
sleep 10
- name: Run newman tests
run: |
make check-api
- name: Stop services
if: always()
run: |
MODE=dev make stop
- name: Clean up
if: always()
run: |
make clean
docker system prune -f
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ clean-images:
check-dashboard:
docker compose -f tests/dashboard/docker-compose.yml up --abort-on-container-exit || (echo "check dashboard failed $$?"; exit 1)

check-api: ##@Test Run API tests with newman
cd tests/postman && docker compose up --abort-on-container-exit || (echo "API tests failed $$?"; exit 1)

start-docker-compose:
docker compose -f bootup/docker-compose-files/${COMPOSE_FILE} up -d --force-recreate --remove-orphans

Expand Down Expand Up @@ -230,6 +233,8 @@ dashboard:
all \
license \
check \
check-api \
check-dashboard \
doc \
help \
docker \
Expand Down
6 changes: 0 additions & 6 deletions tests/postman/Makefile

This file was deleted.

48 changes: 48 additions & 0 deletions tests/postman/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Postman API Testing

This directory contains Postman test collections and Newman automation testing configuration for Hyperledger Cello API Engine.

## Features

- **Hyperledger Cello Api Engine.postman_collection.json**: Complete API test collection with all RESTful endpoints
- **Cello Engine CI Test.postman_collection.json**: Streamlined test collection for CI/CD

### Test Coverage
- 🔐 User Authentication (login, registration, token verification)
- 🤖 Agent Management (Docker/Kubernetes agents)
- 🏢 Organization Management
- 🌐 Network Management
- 🖥️ Node Management (Peer/Orderer)
- 📡 Channel Management
- 📦 Chaincode Management
- 👥 User Management
- 📁 File Management

## Newman Usage

### 1. Using Makefile Commands
```bash
# Run API tests
make check-api
```

### 2. Using Docker Compose
```bash
# Navigate to test directory
cd tests/postman

# Run tests
docker compose up --abort-on-container-exit
```

## Configuration

### Environment Variables
Tests use internally defined collection variables:
- `base_url`: API base URL (default: http://127.0.0.1:8080)
- `token`: JWT access token
- Other business-related variables (org_id, agent_id, etc.)

### Test Reports
- **JUnit Format**: `junitResult.xml` - for CI/CD integration
- **CLI Output**: Real-time console test results
Binary file added tests/postman/basic.tar.gz
Binary file not shown.
Loading
Loading