Files
labFusion/services/service-adapters/run_tests.py
GSRN 64d4e405c5
Some checks failed
Docker Build and Push / build-and-push (push) Failing after 36s
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 1m11s
Integration Tests / integration-tests (push) Failing after 29s
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m42s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.1) (push) Failing after 11s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 19s
LabFusion CI/CD Pipeline / frontend (push) Failing after 1m50s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 20s
Service Adapters (Python FastAPI) / test (3.9) (push) Failing after 21s
Service Adapters (Python FastAPI) / build (push) Has been skipped
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 20s
chore: Add test reports directory creation step in CI workflows
### Summary of Changes
- Introduced a step to create a `tests/reports` directory in both CI workflows for Service Adapters and the main CI configuration.
- This ensures that test reports have a designated location for output, improving organization and accessibility.

### Expected Results
- Enhanced structure for test report generation, facilitating easier access to test results and improving overall CI workflow clarity.
2025-09-15 21:03:17 +02:00

45 lines
946 B
Python

#!/usr/bin/env python3
"""
Test runner script for LabFusion Service Adapters
"""
import subprocess
import sys
import os
def run_tests():
"""Run the test suite"""
print("🧪 Running LabFusion Service Adapters Tests")
print("=" * 50)
# Ensure test reports directory exists
os.makedirs("tests/reports", exist_ok=True)
# Run pytest with coverage
cmd = [
"pytest",
"tests/",
"-v",
"--cov=.",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
"--junitxml=tests/reports/junit.xml",
"--tb=short"
]
print(f"Running: {' '.join(cmd)}")
print()
result = subprocess.run(cmd, cwd=os.path.dirname(__file__))
if result.returncode == 0:
print("\n✅ All tests passed!")
else:
print("\n❌ Some tests failed!")
sys.exit(1)
if __name__ == "__main__":
run_tests()