File size: 2,845 Bytes
76f9cd2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
"""
Main test runner for all integration tests
δΈ»ζ΅θ―θΏθ‘ε¨οΌη¨δΊζ§θ‘ζζιζζ΅θ―
"""
import pytest
import sys
import os
from pathlib import Path
def main():
"""Run all integration tests in sequence"""
print("π Starting Podcast MCP Gradio Integration Tests")
print("=" * 60)
# Get the tests directory
tests_dir = Path(__file__).parent
# Define test files in execution order
test_files = [
"test_01_podcast_download.py",
"test_02_remote_transcription.py",
"test_03_transcription_file_management.py",
"test_04_mp3_file_management.py",
"test_05_real_world_integration.py"
]
# Test results tracking
results = {}
overall_success = True
for test_file in test_files:
test_path = tests_dir / test_file
print(f"\nπ Running: {test_file}")
print("-" * 40)
if not test_path.exists():
print(f"β Test file not found: {test_path}")
results[test_file] = "NOT_FOUND"
overall_success = False
continue
# Run the test file
try:
exit_code = pytest.main([
str(test_path),
"-v", # verbose
"-s", # no capture (show print statements)
"--tb=short", # shorter traceback format
"--disable-warnings" # reduce noise
])
if exit_code == 0:
results[test_file] = "PASSED"
print(f"β
{test_file}: PASSED")
else:
results[test_file] = "FAILED"
overall_success = False
print(f"β {test_file}: FAILED (exit code: {exit_code})")
except Exception as e:
results[test_file] = f"EXCEPTION: {str(e)}"
overall_success = False
print(f"π₯ {test_file}: EXCEPTION - {str(e)}")
# Print summary
print("\n" + "=" * 60)
print("π TEST EXECUTION SUMMARY")
print("=" * 60)
for test_file, result in results.items():
status_icon = "β
" if result == "PASSED" else "β"
print(f"{status_icon} {test_file}: {result}")
print(f"\nπ Overall Result: {'β
SUCCESS' if overall_success else 'β FAILURES DETECTED'}")
if overall_success:
print("π All integration tests completed successfully!")
print("β¨ Your Podcast MCP Gradio application is ready for deployment!")
else:
print("β οΈ Some tests failed. Please review the output above.")
print("π§ Check the specific test failures and fix any issues before deployment.")
return 0 if overall_success else 1
if __name__ == "__main__":
exit_code = main()
sys.exit(exit_code) |