Automated Combination β Compilation β Execution β Reporting Platform for Robot Framework
- Overview
- Features
- Architecture
- Project Structure
- Prerequisites
- Installation
- Running the Application
- API Endpoints
- Workflow
- GitHub Actions Integration
- Environment Variables
- Testing
- Troubleshooting
TestForge is an end-to-end test automation platform that transforms test case combinations into executable Robot Framework tests with real-time execution monitoring and comprehensive reporting.
- Generate Test Combinations from CSV/Excel input
- Compile Test Cases into Robot Framework scripts
- Execute Tests with real-time SSE (Server-Sent Events) streaming
- Download Reports as zipped artifacts
- GitHub Actions Integration for CI/CD workflows
- β Test Combination Generator β Upload CSV/XLSX files and auto-generate test case combinations
- β
Smart Robot Framework Compilation β Auto-detect base URLs, convert full URLs to relative paths, and generate clean
.robottest files - β Comprehensive Request/Response Logging β Every test case logs full request details (method, endpoint, headers, body) and response data (status, headers, body) for easy debugging
- β Real-Time Execution Streaming β Monitor test progress via Server-Sent Events (SSE)
- β Report Download β Zip and download test execution reports with detailed logs
- β GitHub Actions Trigger β Re-run tests in CI/CD pipelines via API
- β
Docker Support β Containerized deployment with
docker-compose - β
Async File I/O β High-performance file handling with
aiofiles
graph TB
Client[Client/Browser] -->|1. Upload CSV/XLSX| API[FastAPI Server]
API -->|2. Generate Combinations| Combo[Combination Service]
Combo -->|Excel with 2 sheets| Client
Client -->|3. Upload Filled Excel| API
API -->|4. Compile to .robot| Compile[Compile Service]
Compile -->|Save to workspace/{testName}/| FS[File System]
Client -->|5. Start Execution Stream| API
API -->|6. Run Robot Tests| Run[Run Service]
Run -->|7. Stream SSE Events| Client
Run -->|8. Generate Reports| FS
Client -->|9. Download Report| API
API -->|10. Zip & Return| Download[Download Service]
Client -->|11. Trigger CI/CD| API
API -->|12. Workflow Dispatch| GH[GitHub Actions]
style API fill:#009688,color:#fff
style Client fill:#2196F3,color:#fff
style FS fill:#FF9800,color:#fff
style GH fill:#673AB7,color:#fff
TestForge/
βββ π app/
β βββ main.py # FastAPI application entry point
β βββ π core/
β β βββ config.py # Environment configuration
β β βββ utils_io.py # File I/O utilities
β β βββ utils_sse.py # Server-Sent Events utilities
β β βββ utils_zip.py # Zip compression utilities
β βββ π routers/
β β βββ combination_router.py # POST /api/v1/combination-test-case
β β βββ compile_router.py # POST /api/v1/compile-test-case
β β βββ run_router.py # GET /api/v1/run-test-case/{testName}/stream
β β βββ download_router.py # GET /api/v1/download/{testName}
β β βββ github_router.py # POST /api/v1/github/run/{testName}
β βββ π schemas/
β β βββ compile_request.py # Pydantic models for compilation
β β βββ test_summary.py # Test result schemas
β βββ π services/
β βββ combination_service.py # Test combination logic
β βββ compile_service.py # Robot Framework generation
β βββ run_service.py # Test execution engine
β βββ download_service.py # Report packaging
β βββ github_service.py # GitHub API integration
βββ π tests/
β βββ test_smoke.py # Smoke tests
βββ π workspace/ # Auto-generated test workspaces
β βββ {testName}/
β βββ rawData.xlsx # Original test data
β βββ generated/ # .robot files
β βββ reports/ # HTML/XML reports
βββ docker-compose.yml # Docker orchestration
βββ Dockerfile # Container image definition
βββ requirements.txt # Python dependencies
βββ README.md # This file
Before installing TestForge, ensure you have:
- Python 3.14.0 (required)
- pip (comes with Python)
- Git (for cloning the repository)
- Docker & Docker Compose (optional, for containerized deployment)
# Using Homebrew (recommended)
brew install python@3.14
# Verify installation
python3.14 --version # Should output: Python 3.14.0Or download from python.org/downloads
git clone https://github.com/yourusername/TestForge.git
cd TestForge# Create virtual environment
python3.14 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Verify Python version inside venv
python --version # Should show Python 3.14.0pip install --upgrade pip
pip install -r requirements.txtpython -c "import fastapi; import pandas; import robot; print('β
All dependencies installed!')"Option A: Download Installer
- Go to python.org/downloads
- Download Python 3.14.0 for Windows
- Run the installer
- β Check "Add Python 3.14 to PATH"
- Click "Install Now"
Option B: Using Windows Package Manager (winget)
winget install Python.Python.3.14Verify Installation:
python --version # Should output: Python 3.14.0git clone https://github.com/yourusername/TestForge.git
cd TestForge# Create virtual environment
python -m venv venv
# Activate virtual environment
.\venv\Scripts\Activate.ps1
# If you get execution policy error, run:
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Verify Python version inside venv
python --version # Should show Python 3.14.0python -m pip install --upgrade pip
pip install -r requirements.txtpython -c "import fastapi; import pandas; import robot; print('β
All dependencies installed!')"# Activate virtual environment (if not already active)
source venv/bin/activate
# Run the server
uvicorn app.main:app --host 0.0.0.0 --port 3000 --reload# Activate virtual environment (if not already active)
.\venv\Scripts\Activate.ps1
# Run the server
uvicorn app.main:app --host 0.0.0.0 --port 3000 --reloadAccess the API:
- π Swagger UI: http://localhost:3000/docs
- π ReDoc: http://localhost:3000/redoc
# Build image
docker-compose build
# Start service
docker-compose up -d
# View logs
docker-compose logs -f testforge-api- π Swagger UI: http://localhost:3000/docs
docker-compose downsequenceDiagram
actor User
participant API as TestForge API
participant FS as File System
participant RF as Robot Framework
participant GH as GitHub Actions
User->>API: 1. POST /combination-test-case (CSV/XLSX)
API-->>User: Excel with combinations (2 sheets)
User->>API: 2. POST /compile-test-case (Filled Excel + testName)
API->>FS: Save rawData.xlsx
API->>FS: Generate .robot files
API-->>User: {"status": "compiled", "run_url": "..."}
User->>API: 3. GET /run-test-case/{testName}/stream
API->>RF: Execute tests
API-->>User: SSE: {"status": "running", "case": "TC001"}
RF->>FS: Generate HTML/XML reports
API-->>User: SSE: {"status": "completed", "download_url": "..."}
User->>API: 4. GET /download/{testName}
API->>FS: Zip reports folder
API-->>User: report.zip
User->>API: 5. POST /github/run/{testName}
API->>GH: Trigger workflow_dispatch
GH-->>API: {"status": "triggered"}
Endpoint: GET /api/v1/download/example-combination-data
Description: Download example Excel template with sample data and comprehensive prefix documentation.
Request:
curl -OJ http://localhost:3000/api/v1/download/example-combination-dataResponse: example-combination-data.xlsx with 2 sheets:
- Sheet 1 (combination-data): Sample test data with examples of all prefix types
- Sheet 2 (note): Complete documentation of all available prefixes:
[API]endpoint- API endpoint URL[API]Method- HTTP method (GET, POST, PUT, DELETE)[Request][Header]<name>- Request headers[Request][Params]<name>- Path parameters (reserved)[Request][Query]<name>- Query string parameters[Request][Body]<field>- Request body fields[Request][Body]<parent>.<child>- Nested objects (dot notation)[Request][Body]<array>[<index>].<field>- Array elements (bracket notation)[Response][API]status- Expected HTTP status code[Response][Body]<json-path>- Expected response body values (supports operators)[Response][Body]<json-path>:<operator>- Dynamic assertions with operators[Response][Body]<json-path>:<operator>[Type:<type>]- With explicit data type casting[Response][Header]<name>- Expected response headers
Supported Assertion Operators:
Comparison Operators:
eq(default) β Exact equality checkneβ Not equalgtβ Greater than (numeric)ltβ Less than (numeric)betweenβ Numeric range check; use cell value likelow,high(e.g.,50,80)
String Operators:
containsβ Substring presentregexβ Regular expression match
Type & Structure Validation:
is_nullβ Field value isnullis_not_nullβ Field value is notnullis_emptyβ String/array/object is empty ("",[],{})is_not_emptyβ String/array/object is not emptyis_arrayβ Field is a JSON arrayis_objectβ Field is a JSON objectis_stringβ Field is a stringis_numberβ Field is a numberis_boolβ Field is a boolean
Supported Data Types (optional):
[Type:int]or[Type:integer]β Integer numbers[Type:float]or[Type:number]β Floating-point numbers[Type:bool]or[Type:boolean]β Boolean values (true/false)[Type:string]β String values (default)
Sentinel Keywords (Special Values):
TestForge supports special keywords for edge case testing:
| Keyword | Generated Value | Use Case |
|---|---|---|
[EMPTY] or [EMPTY_STRING] |
"" |
Send empty string explicitly |
[NULL] |
null |
Send JSON null value |
[EMPTY_ARRAY] |
[] |
Send empty array |
[EMPTY_OBJECT] |
{} |
Send empty object |
| (blank cell) | field omitted | Don't send field at all |
Sentinel Keyword Examples:
Request Examples:
| [Request][Body]name | [Request][Body]age | [Request][Body]tags | [Request][Body]meta |
|---------------------|-------------------|---------------------|---------------------|
| [EMPTY] | [NULL] | [EMPTY_ARRAY] | [EMPTY_OBJECT] |
β Generates request body:
{
"name": "",
"age": null,
"tags": [],
"meta": {}
}Response Validation Examples:
| [Response][Body]error:is_null | [Response][Body]items:is_empty | [Response][Body]data:is_not_null |
|-------------------------------|-------------------------------|----------------------------------|
| true | true | true |
β Validates:
errorfield isnullitemsarray is empty[]datafield exists and is notnull
Basic Examples:
[Response][Body]idwith value123β equality check (string)[Response][Body]age:gt[Type:int]with value18β checks age > 18 (integer)[Response][Body]score:between[Type:float]with value50.5,80.9β checks 50.5 β€ score β€ 80.9[Response][Body]active[Type:bool]with valuetrueβ checks boolean equality[Response][Body]name:containswith valueJohnβ checks if name contains "John"[Response][Header]Content-Type:regexwith value^application/jsonβ regex match
Advanced Examples:
[Request][Body]emailwith[EMPTY]β sends{"email": ""}[Request][Body]addresswith[NULL]β sends{"address": null}[Response][Body]profile.address:is_nullwithtrueβ validates nested null value[Response][Body]items:is_arraywithtrueβ validates field is array[Response][Body]metadata:is_emptywithtrueβ validates empty object/string/array
Endpoint: POST /api/v1/combination-test-case
Description: Upload a CSV or XLSX file to generate test case combinations.
Request:
curl -X POST http://localhost:3000/api/v1/combination-test-case \
-F "file=@input.xlsx"Response: Excel file with 2 sheets:
- Sheet 1 (combination): Generated test case combinations (Cartesian product)
- Sheet 2 (note): Instructions and prefix documentation (same as example template)
Note: After downloading, manually add [Response] columns to define expected results.
Endpoint: POST /api/v1/compile-test-case
Description: Upload filled Excel file to generate Robot Framework .robot files.
Request:
curl -X POST http://localhost:3000/api/v1/compile-test-case \
-F "file=@testcases.xlsx" \
-F "testName=MyTestSuite"Response:
{
"status": "compiled",
"testName": "MyTestSuite",
"cases": 15,
"run_url": "/api/v1/run-test-case/MyTestSuite/stream"
}File Structure Created:
workspace/
βββ MyTestSuite/
βββ rawData.xlsx
βββ generated/
β βββ TC_001.robot
β βββ TC_002.robot
β βββ ...
βββ Report/ (created after execution)
Generated Robot File Features:
- β
Auto-detects base URL from endpoint (e.g.,
http://mockoon.ariyanaragroup.com) - β
Converts full URLs to relative paths (e.g.,
/api/v1/public/home) - β Only creates variables when data exists (no empty dictionaries)
- β
Uses
json=parameter for request bodies - β
Logs complete request and response details with
console=yesfor visibility - β
Accepts all HTTP status codes with
expected_status=anyβ prevents RequestsLibrary from raising HTTPError on 4xx/5xx responses, allowing tests to validate expected error codes properly
Endpoint: GET /api/v1/run-test-case/{testName}/stream
Description: Execute Robot Framework tests with real-time progress updates.
Request:
curl -N http://localhost:3000/api/v1/run-test-case/MyTestSuite/streamResponse (SSE Stream):
data: {"status": "running", "case": "TC001", "progress": 10}
data: {"status": "passed", "case": "TC001", "progress": 20}
data: {"status": "running", "case": "TC002", "progress": 30}
data: {"status": "completed", "download_url": "http://localhost:3000/api/v1/download/MyTestSuite"}
JavaScript Example (Frontend):
const eventSource = new EventSource('/api/v1/run-test-case/MyTestSuite/stream');
eventSource.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log(`Status: ${data.status}, Progress: ${data.progress}%`);
if (data.status === 'completed') {
console.log(`Download report: ${data.download_url}`);
eventSource.close();
}
};Endpoint: GET /api/v1/download/{testName}
Description: Download zipped test execution reports.
Request:
curl -OJ http://localhost:3000/api/v1/download/MyTestSuiteResponse: MyTestSuite_report.zip containing:
log.htmlβ Detailed execution logreport.htmlβ Test report with statisticsoutput.xmlβ Machine-readable results
Endpoint: POST /api/v1/github/run/{testName}
Description: Trigger workflow_dispatch event in GitHub Actions.
Request:
curl -X POST http://localhost:3000/api/v1/github/run/MyTestSuiteResponse:
{
"status": "triggered",
"testName": "MyTestSuite",
"workflow": "test-execution.yml"
}-
Download example template
curl -OJ http://localhost:3000/api/v1/download/example-combination-data
-
Customize the template with your API test data (or generate combinations from your own file)
-
Generate combinations (optional if you already have complete data)
curl -X POST http://localhost:3000/api/v1/combination-test-case -F "file=@your-data.xlsx" -
Add expected results - Fill in
[Response]columns in the Excel file -
Compile tests
curl -X POST http://localhost:3000/api/v1/compile-test-case \ -F "testName=MyTest" -F "file=@filled-data.xlsx"
-
Run tests - Visit
http://localhost:3000/docsand use the stream endpoint -
Download reports - Get the ZIP file with all test results
Create a .env file in the project root:
# Storage Configuration
STORAGE_PATH=./workspace
# Logging
LOG_LEVEL=INFO
# GitHub Integration (Optional)
GITHUB_REPOSITORY=owner/TestForge
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxEnvironment Variables:
| Variable | Description | Default | Required |
|---|---|---|---|
STORAGE_PATH |
Directory for test workspaces | ./workspace |
No |
LOG_LEVEL |
Logging level (DEBUG/INFO/WARNING/ERROR) | INFO |
No |
GITHUB_REPOSITORY |
GitHub repo (format: owner/repo) |
owner/TestForge |
No |
GITHUB_TOKEN |
GitHub Personal Access Token | β | Yes (for GitHub features) |
# Activate virtual environment
source venv/bin/activate # macOS/Linux
.\venv\Scripts\Activate.ps1 # Windows
# Run tests
pytest tests/test_smoke.py -vUse the interactive API documentation:
- Swagger UI: http://localhost:3000/docs
- ReDoc: http://localhost:3000/redoc
Solution:
# macOS
brew install python@3.14
# Windows
winget install Python.Python.3.14
# Verify
python --versionError:
execution of scripts is disabled on this system
Solution:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserSolution:
# Change port in command
uvicorn app.main:app --host 0.0.0.0 --port 8080 --reloadOr kill the process:
# macOS/Linux
lsof -ti:3000 | xargs kill -9
# Windows
netstat -ano | findstr :3000
taskkill /PID <PID> /FSolution:
# Clean rebuild
docker-compose down -v
docker-compose build --no-cache
docker-compose up -dCheck:
- Verify
.robotfiles exist inworkspace/{testName}/generated/ - Check
rawData.xlsxformat matches expected schema - Review logs:
docker-compose logs -f testforge-api - Enable detailed logging: All test cases automatically log request/response details with
console=yesflag - Check report logs: Open
log.htmlin the Report folder to see full request/response data - Common issues:
- Missing base URL β Check that
[API]endpointcontains full URL in first row - Variable not found errors β Ensure compile service only creates variables when data exists
- HTTPError on expected error codes β Fixed! All generated tests now use
expected_status=anyto accept any HTTP status code (200, 400, 500, etc.) and validate it properly with assertions
- Missing base URL β Check that
Example Generated Test Case:
*** Test Cases ***
TC_044
${headers}= Create Dictionary x-mock-status=400
${payload}= Create Dictionary Gender=Female Age=18-30
${resp}= POST On Session api /api/combination-data headers=${headers} json=${payload} expected_status=any
Should Be Equal As Integers ${resp.status_code} 400The expected_status=any parameter ensures that RequestsLibrary does not raise an exception when the API returns error status codes (4xx, 5xx), allowing the test to proceed and validate the actual status code.
TestForge provides comprehensive CI/CD integration with GitHub Actions for automated testing workflows.
File: .github/workflows/api-integration-test.yml
Complete end-to-end test pipeline covering all 5 actions:
- Download example template
- Generate test combinations
- Compile to Robot Framework
- Run tests with SSE streaming
- Download test reports
Triggers:
- β Manual (workflow_dispatch)
- β
Push to
master(whenapp/**changes) - β
Pull requests to
master
Quick Start:
# Via GitHub CLI
gh workflow run api-integration-test.yml \
-f testName=my-test-suite \
-f inputFile=data/custom-input.xlsx
# Via GitHub UI
# Actions β "TestForge API Integration Test" β Run workflowInputs:
testName(optional): Test suite name, default:github-action-testinputFile(optional): Path to input file, default: uses example template
Artifacts: All generated files, logs, and reports (30 days retention)
For granular control, run each action separately:
| Workflow | File | Purpose | Usage |
|---|---|---|---|
| Download Example | action-1-download-example.yml |
Get example template | gh workflow run action-1-download-example.yml |
| Generate Combinations | action-2-combination.yml |
Create test combinations | gh workflow run action-2-combination.yml -f inputFile=data/input.xlsx |
| Compile Tests | action-3-compile.yml |
Build Robot Framework tests | gh workflow run action-3-compile.yml -f testName=suite -f inputFile=data/filled.xlsx |
| Run Tests (Stream) | action-4-run-stream.yml |
Execute with SSE output | gh workflow run action-4-run-stream.yml -f testName=suite |
| Download Report | action-5-download-report.yml |
Get test reports | gh workflow run action-5-download-report.yml -f testName=suite |
# Any push to master with changes in app/ triggers full integration test
git add app/
git commit -m "Update API logic"
git push origin master
# Workflow runs automatically with default settings
# View results: https://github.com/{owner}/{repo}/actions# Run complete test pipeline with custom inputs
gh workflow run api-integration-test.yml \
-f testName=staging-smoke-test \
-f inputFile=data/staging-tests.xlsx
# Monitor progress
gh run watch
# Download artifacts after completion
gh run list --workflow=api-integration-test.yml --limit 1
gh run download <RUN_ID># Step 1: Download template
gh workflow run action-1-download-example.yml
# Step 2: Generate combinations (after filling input file)
gh workflow run action-2-combination.yml -f inputFile=data/my-tests.xlsx
# Step 3: Compile (after filling response columns)
gh workflow run action-3-compile.yml \
-f testName=api-regression \
-f inputFile=data/filled-tests.xlsx
# Step 4: Run tests
gh workflow run action-4-run-stream.yml -f testName=api-regression
# Step 5: Download report
gh workflow run action-5-download-report.yml \
-f testName=api-regression \
-f timestamp=20251030_143022View Workflow Runs:
# List recent runs
gh run list --workflow=api-integration-test.yml
# View specific run details
gh run view <RUN_ID>
# Download all artifacts
gh run download <RUN_ID>Artifact Retention:
- Main integration test: 30 days
- Individual actions: 7-30 days (varies by workflow)
Available Artifacts:
- Example templates (
.xlsx) - Generated combinations (
.xlsx) - Compiled test data (
.xlsx) - Robot Framework test files (
.robot) - Execution logs (
.log) - Test reports (
.zipwith HTML/XML) - Server logs (
.log)
- Check
server.login artifacts - Verify Python 3.14.0 compatibility
- Review dependency installation logs
- Increase timeout in workflow (default: 60s)
- Check for port conflicts (port 3000)
- Review server startup logs
- Ensure
inputFilepath is relative to repo root - Verify file exists in repository
- Check Git LFS for large files
- Validate input file format (CSV/XLSX)
- Check required columns:
[API],[Request],[Response] - Review
compile_response.jsonin artifacts
- Review SSE stream output (
sse_output.log) - Check API endpoint accessibility from GitHub Actions runners
- Verify test data format matches schema
For comprehensive GitHub Actions documentation, see:
- Workflow Guide:
.github/workflows/README.md - GitHub Actions Docs: https://docs.github.com/en/actions
This project is licensed under the MIT License.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For issues or questions:
- π§ Email: support@testforge.io
- π Issues: GitHub Issues
Built with β€οΈ using Python 3.14, FastAPI, and Robot Framework