lankasailendra/BMCTESTMAIN
0
1@echo off2setlocal EnableExtensions3cd /d "%~dp0"4 5echo === Helix CoPilot — Network Manager ===6echo.7 8set BMC_BHNM_URL=https://your-network-manager-host9echo Enter Network Manager API key:10for /f "delims=" %%i in ('powershell -NoProfile -Command "$p = Read-Host -AsSecureString; [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($p))"') do set "BMC_BHNM_API_KEY=%%i"11 12if not exist reports mkdir reports13if not exist logs mkdir logs14 15if not defined BMC_PYTEST_TARGET set BMC_PYTEST_TARGET=.16REM set BMC_PYTEST_TARGET=test_api_generated.py::test_tc_foo_00117 18for /f %%i in ('powershell -NoProfile -Command "Get-Date -Format yyyyMMdd_HHmmss"') do set RUN_TS=%%i19set "REPORT_HTML=%CD%\reports\run_%RUN_TS%.html"20set "REPORT_JUNIT=%CD%\reports\run_%RUN_TS%.xml"21 22python -c "import pytest_html" 2>nul23if errorlevel 1 (echo Run Install-HelixCoPilot-Client.bat & pause & exit /b 1)24 25echo Pytest target: %BMC_PYTEST_TARGET%26python -m pytest %BMC_PYTEST_TARGET% -v -s --tb=short -ra --html=%REPORT_HTML% --self-contained-html --junitxml=%REPORT_JUNIT%27set TEST_EXIT=%ERRORLEVEL%28echo Reports: %REPORT_HTML%29pause30exit /b %TEST_EXIT%31 