S1005403_RisCC/run_tests.bat

26 lines
762 B
Batchfile

@echo off
echo Running all tests with coverage...
:: Esegue pytest, calcola la copertura per il pacchetto 'target_simulator'
:: e genera un report HTML nella cartella 'htmlcov'
pytest --cov=target_simulator --cov-report=html
:: Controlla se il comando precedente ha avuto successo
if %errorlevel% neq 0 (
echo.
echo TESTS FAILED! See the output above for details.
exit /b %errorlevel%
)
echo.
echo ================================================
echo TESTS PASSED!
echo Coverage report generated in 'htmlcov' folder.
echo ================================================
echo.
:: (Opzionale) Apri automaticamente il report nel browser predefinito
:: Decommenta la riga seguente se vuoi questo comportamento
start htmlcov/index.html
echo Done.