File size: 1,012 Bytes
3eae4cc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
param(
    [string]$PythonPath = "C:\Users\siddh\OPENENV_RL\.venv313\Scripts\python.exe",
    [switch]$Full
)

$ErrorActionPreference = "Stop"

$repoRoot = Split-Path -Parent $PSScriptRoot
Set-Location $repoRoot

if (-not (Test-Path $PythonPath)) {
    throw "Python not found at: $PythonPath"
}

Write-Host "Repo root: $repoRoot"
Write-Host "Python:    $PythonPath"

Write-Host ""
Write-Host "Step 1/3: Syntax check"
& $PythonPath -m py_compile app\main.py tests\test_api_end_to_end_suite.py
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

Write-Host ""
Write-Host "Step 2/3: Run E2E API suite"
& $PythonPath -m pytest tests\test_api_end_to_end_suite.py -v --tb=short
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

if ($Full) {
    Write-Host ""
    Write-Host "Step 3/3: Run full API regression suite"
    & $PythonPath -m pytest tests\test_api.py tests\test_api_end_to_end_suite.py -v --tb=short
    if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}

Write-Host ""
Write-Host "API E2E test run completed."