#!/usr/bin/env python3 """ Test runner script for LabFusion Service Adapters """ import os import subprocess import sys 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()