Files
wehub-resource-sync 161ef94b4f
Sirius CI/CD Pipeline / Merge API Manifest (push) Blocked by required conditions
Sirius CI/CD Pipeline / Build API (${{ matrix.platform }}) (push) Blocked by required conditions
Sirius CI/CD Pipeline / Build UI (${{ matrix.platform }}) (push) Blocked by required conditions
Sirius CI/CD Pipeline / Merge UI Manifest (push) Blocked by required conditions
Sirius CI/CD Pipeline / Build Engine (${{ matrix.platform }}) (push) Blocked by required conditions
Sirius CI/CD Pipeline / Merge Engine Manifest (push) Blocked by required conditions
Sirius CI/CD Pipeline / Build Infra (${{ matrix.service }}, ${{ matrix.platform }}) (push) Blocked by required conditions
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-postgres) (push) Blocked by required conditions
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-rabbitmq) (push) Blocked by required conditions
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-valkey) (push) Blocked by required conditions
Sirius CI/CD Pipeline / Integration Test (push) Blocked by required conditions
Sirius CI/CD Pipeline / Public Stack Contract (push) Blocked by required conditions
Sirius CI/CD Pipeline / Dispatch Demo Deployment (sirius-demo branch) (push) Blocked by required conditions
Sirius CI/CD Pipeline / Dispatch Demo Canary (main branch) (push) Blocked by required conditions
Check engine pin consistency / Dockerfile / CI pin consistency (push) Successful in 8s
Sirius CI/CD Pipeline / Detect Changes (push) Successful in 23s
Sirius CI/CD Pipeline / Guard Registry Namespace (push) Waiting to run
Validate Docker Configuration / Validate Docker Compose Configuration (push) Successful in 47s
chore: import upstream snapshot with attribution
2026-07-13 12:32:25 +08:00

10 KiB

title, description, template, version, last_updated, author, tags, categories, difficulty, prerequisites, related_docs, dependencies, llm_context, search_keywords
title description template version last_updated author tags categories difficulty prerequisites related_docs dependencies llm_context search_keywords
About Testing in Sirius Comprehensive guide to the Sirius testing philosophy, infrastructure, and operator-first testing approach for integration and validation testing. TEMPLATE.about 1.0.0 2025-01-03 Development Team
testing
philosophy
integration
operator-first
validation
qa
testing
philosophy
intermediate
docker
testing concepts
integration testing
README.container-testing.md
README.documentation-testing.md
README.cicd.md
testing/container-testing/
testing/documentation/
scripts/git-hooks/
high
testing philosophy
operator-first testing
integration testing
validation testing
automated qa
standalone tests
testing infrastructure

About Testing in Sirius

Overview

Testing in Sirius follows an operator-first philosophy that prioritizes real-world validation over traditional unit testing. Our testing approach focuses on proving that complete systems, processes, and integrations work correctly in realistic scenarios, rather than testing individual code units in isolation.

Testing Philosophy

Operator-First Approach

Core Principle: Tests should validate that operators can successfully use the system to accomplish real tasks.

What This Means:

  • Tests simulate actual user workflows and operations
  • Validation focuses on end-to-end functionality
  • Tests prove that complete processes work as intended
  • Results must be actionable and meaningful to operators

Example: Instead of testing a scanner function in isolation, we test that the scanner can be invoked standalone, process real data, and produce valid results that an operator would actually use.

Integration-Focused Testing

Primary Goal: Validate that different components work together correctly.

Testing Scope:

  • Cross-service communication
  • Data flow between components
  • End-to-end process validation
  • Real-world scenario simulation

Benefits:

  • Catches integration issues that unit tests miss
  • Validates complete workflows
  • Ensures system reliability for operators
  • Provides confidence in production deployments

Current Testing Infrastructure

Container Testing

Location: testing/container-testing/

Purpose: Validate Docker container builds, health, and integration

What's Tested:

  • Docker Compose configuration validation
  • Individual container builds (all targets)
  • Service health checks
  • Cross-service communication
  • Integration testing

Automation:

  • make test-all - Complete test suite
  • make test-build - Build validation
  • make test-health - Health checks
  • make test-integration - Integration testing

Documentation Testing

Location: testing/documentation/

Purpose: Validate documentation completeness, accuracy, and consistency

What's Tested:

  • YAML front matter completeness
  • Template compliance
  • Index completeness
  • Link validation
  • Metadata validity

Automation:

  • make lint-docs - Full documentation validation
  • make lint-docs-quick - Quick validation
  • make lint-index - Index completeness check

Pre-commit Validation

Location: scripts/git-hooks/

Purpose: Quick validation before commits

What's Tested:

  • Docker Compose configuration validity
  • Basic syntax checks
  • Quick documentation validation
  • Code formatting

Testing Standards

Test Structure

Standalone Execution: Every test must be able to run independently without dependencies on the main codebase.

Real Data: Tests should use realistic data and scenarios, not mocked or synthetic data.

Actionable Results: Test results must provide clear, actionable information for operators and developers.

Automated Validation: All tests must be automatable and runnable via command-line tools.

Test Categories

1. Build Validation Tests

Purpose: Ensure components can be built correctly

Examples:

  • Docker container builds
  • Multi-stage build validation
  • Architecture compatibility
  • Dependency resolution

Validation Criteria:

  • Build completes without errors
  • All build targets work correctly
  • Images are properly tagged
  • Dependencies are resolved

2. Health Validation Tests

Purpose: Ensure services start and remain healthy

Examples:

  • Service startup validation
  • Health endpoint checks
  • Resource availability
  • Graceful shutdown

Validation Criteria:

  • Services start within expected time
  • Health endpoints respond correctly
  • No critical errors in logs
  • Proper resource utilization

3. Integration Validation Tests

Purpose: Ensure components work together correctly

Examples:

  • Cross-service communication
  • Database connectivity
  • Message queue functionality
  • API endpoint integration

Validation Criteria:

  • Services can communicate
  • Data flows correctly
  • APIs respond as expected
  • Error handling works

4. Process Validation Tests

Purpose: Ensure complete workflows function correctly

Examples:

  • End-to-end scanning processes
  • Data processing pipelines
  • User authentication flows
  • Deployment processes

Validation Criteria:

  • Complete workflows execute successfully
  • Results are valid and usable
  • Error conditions are handled
  • Performance meets requirements

Future Testing Objectives

Next 3 Months

Priority 1: Scanner Testing Infrastructure

  • Standalone scanner execution tests
  • Real vulnerability detection validation
  • Output format verification
  • Performance benchmarking

Priority 2: API Testing Infrastructure

  • Endpoint functionality validation
  • Authentication and authorization testing
  • Data validation and error handling
  • Performance and load testing

Priority 3: Engine Testing Infrastructure

  • Agent communication testing
  • Task execution validation
  • Resource management testing
  • Error recovery testing

Long-term Vision

Comprehensive Test Coverage: Every major component and process will have dedicated testing infrastructure.

Automated Validation: All tests will be integrated into CI/CD pipelines and pre-commit hooks.

Operator Confidence: Tests will provide operators with confidence that the system works correctly in production.

Continuous Improvement: Testing infrastructure will evolve with the system to maintain high quality standards.

Testing Best Practices

For Test Developers

  1. Start with Real Scenarios: Design tests around actual operator workflows
  2. Use Real Data: Test with realistic data, not synthetic or mocked data
  3. Validate Complete Processes: Test end-to-end functionality, not just individual components
  4. Make Tests Standalone: Ensure tests can run independently without external dependencies
  5. Provide Clear Results: Test output should be actionable and meaningful

For System Developers

  1. Design for Testability: Build components that can be tested independently
  2. Expose Health Endpoints: Provide clear health and status indicators
  3. Use Standard Interfaces: Follow consistent patterns for APIs and data formats
  4. Document Dependencies: Clearly document what each component needs to function
  5. Plan for Validation: Consider how operators will validate that components work correctly

For Operators

  1. Run Tests Regularly: Use testing infrastructure to validate system health
  2. Understand Test Results: Learn to interpret test output for troubleshooting
  3. Report Issues: Use test failures to identify and report problems
  4. Validate Changes: Run tests after any system changes or updates
  5. Trust the Tests: Use test results to make operational decisions

Testing Tools and Commands

Container Testing

# Full test suite
cd testing/container-testing
make test-all

# Individual tests
make test-build
make test-health
make test-integration

# Quick validation
make build-all

Documentation Testing

# Full documentation validation
cd testing/documentation
make lint-docs

# Quick validation
make lint-docs-quick
make lint-index

Pre-commit Validation

# Automatic validation
git commit  # Runs quick validation automatically

# Manual validation
cd testing/container-testing
make build-all
make lint-docs-quick

Integration with Development

CI/CD Pipeline

Pre-commit: Quick validation (~30 seconds)

  • Docker Compose configuration validation
  • Basic syntax checks
  • Quick documentation validation

CI/CD: Full testing (~5-10 minutes)

  • Complete Docker builds
  • Integration testing
  • Health checks
  • Cross-service communication

Local Development

Available Commands: Developers can run full test suites locally when needed

Testing Strategy: Quick validation for commits, full testing for CI and local validation

Troubleshooting

Common Issues

Issue Symptoms Solution
Test Failures Tests fail unexpectedly Check logs, verify dependencies, run individual tests
Build Issues Docker builds fail Check Dockerfile syntax, verify base images
Integration Issues Services can't communicate Check network configuration, verify service health
Documentation Issues Linting fails Check YAML front matter, verify template compliance

Debugging Commands

# Check test logs
cd testing/container-testing
make logs

# Run individual tests
make test-build
make test-health

# Check documentation
cd testing/documentation
make lint-docs

Getting Help

Documentation

Common Issues

  • Check test logs for specific error messages
  • Verify all dependencies are available
  • Ensure proper environment configuration
  • Run tests individually to isolate issues

Support

  • Review testing documentation for guidance
  • Check CI/CD logs for automated test results
  • Use local testing for debugging and validation
  • Report issues with specific test output and logs

This testing philosophy guide follows the Sirius Documentation Standard. For specific testing implementation details, see README.container-testing.md and README.documentation-testing.md.