Skip to main content

Report Formats

PostQode CLI supports multiple report formats to meet different needs, from human-readable HTML reports to machine-readable formats for CI/CD integration.

📊 Available Formats

HTML Reports

Default format - Human-readable reports with interactive elements.

postqode execute -s testSuites/MySuite/_meta.suite.yaml --report-formats html

Features:

  • Visual pass/fail indicators
  • Interactive request/response details
  • Professional styling for stakeholders
  • Responsive design for all devices
  • Charts and performance metrics

Use Cases:

  • Manual test result review
  • Stakeholder presentations
  • Development team collaboration
  • Test result archiving

JUnit XML Reports

CI/CD integration - XML format compatible with most CI/CD platforms.

postqode execute -s testSuites/MySuite/_meta.suite.yaml --report-formats junit

Features:

  • Standard JUnit XML schema
  • Test case results with timing
  • Error messages and stack traces
  • Compatible with Jenkins, GitLab CI, GitHub Actions
  • Supports test result trending

Use Cases:

  • CI/CD pipeline integration
  • Automated test result processing
  • Test result trending and analytics
  • Build failure notifications

Overview Reports

Quick summary - Minimal text-based summary for rapid validation.

postqode execute -s testSuites/MySuite/_meta.suite.yaml --report-formats overview

Features:

  • Concise test execution summary
  • Pass/fail counts and percentages
  • Total execution time
  • High-level error information
  • Lightweight and fast generation

Use Cases:

  • Quick test validation
  • Command-line result checking
  • Lightweight CI/CD notifications
  • Development workflow integration

🔧 Using Multiple Formats

Generate multiple report formats simultaneously:

postqode execute -s testSuites/MySuite/_meta.suite.yaml --report-formats html junit overview

This creates:

  • postqode-report-[timestamp].html - HTML report
  • postqode-junit-[timestamp].xml - JUnit XML report
  • postqode-overview-[timestamp].html - Overview text report

📁 Report File Structure

Default Naming Convention

Reports are generated with timestamps to avoid conflicts:

reports/
├── postqode-report-20250925-121500.html
├── postqode-junit-20250925-121500.xml
└── postqode-overview-20250925-121500.html

🎯 Format Selection Guide

Choose HTML When:

  • Presenting results to stakeholders
  • Manual test result analysis needed
  • Interactive exploration of failures required
  • Professional presentation format desired
  • Detailed request/response inspection needed

Choose JUnit When:

  • Integrating with CI/CD pipelines
  • Using Jenkins, GitLab CI, or GitHub Actions
  • Need automated test result processing
  • Building test result dashboards
  • Tracking test trends over time

Choose Overview When:

  • Quick command-line validation needed
  • Lightweight reporting required
  • Simple pass/fail information sufficient
  • Fast generation time critical
  • Minimal storage space available

🔧 Advanced Configuration

Environment-Specific Reports

Generate reports with environment context:

# Development environment
postqode execute -s testSuites/MySuite/_meta.suite.yaml -c dev --report-formats html

# Production environment
postqode execute -s testSuites/MySuite/_meta.suite.yaml -c prod --report-formats junit

Workspace Organization

Organize reports by workspace:

postqode execute \
-s testSuites/MySuite/_meta.suite.yaml \
-w /projects/myapp \
--report-formats html junit \
--report-dir ./reports/$(date +%Y-%m-%d)

📈 CI/CD Integration Examples

Jenkins Pipeline

pipeline {
agent any
stages {
stage('API Tests') {
steps {
sh '''
postqode execute \
-s testSuites/RegressionTests/_meta.suite.yaml \
--report-formats junit \
--report-dir ./test-results
'''
}
post {
always {
junit 'test-results/postqode-junit-*.xml'
}
}
}
}
}

GitHub Actions

name: API Tests
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install PostQode CLI
run: npm install -g @postqode/cli

- name: Run API Tests
run: |
postqode execute \
-s testSuites/APITests/_meta.suite.yaml \
--report-formats junit html \
--report-dir ./test-results

- name: Publish Test Results
uses: dorny/test-reporter@v1
if: always()
with:
name: API Test Results
path: 'test-results/postqode-junit-*.xml'
reporter: java-junit

GitLab CI

api_tests:
stage: test
script:
- npm install -g @postqode/cli
- postqode execute -s testSuites/APITests/_meta.suite.yaml --report-formats junit --report-dir ./test-results
artifacts:
when: always
reports:
junit: test-results/postqode-junit-*.xml
paths:
- test-results/