-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.bat
More file actions
158 lines (136 loc) · 3.2 KB
/
run_tests.bat
File metadata and controls
158 lines (136 loc) · 3.2 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
@echo off
REM Testing Commands for Code Review Agent
REM Run these commands from project root: E:\PycharmProjects\code-review-agent
setlocal enabledelayedexpansion
REM ============================================================
REM MENU
REM ============================================================
:menu
cls
echo.
echo ============================================================
echo Code Review Agent - Testing Commands
echo ============================================================
echo.
echo QUICK COMMANDS:
echo 1. Run all tests
echo 2. Run all tests (verbose)
echo 3. Run all tests (with output)
echo 4. Run specific test file
echo.
echo COMPONENT TESTS:
echo 5. Test static checks
echo 6. Test compression
echo 7. Test LLM client
echo 8. Test ScaleDown
echo 9. Test API endpoint
echo 10. Test issue ranking
echo.
echo ADVANCED:
echo 11. Stop on first failure
echo 12. Show slowest tests
echo 13. Generate coverage report
echo 14. Run with debugging
echo.
echo 15. Exit
echo.
echo ============================================================
echo.
set /p choice="Enter your choice (1-15): "
if "%choice%"=="1" goto test_all
if "%choice%"=="2" goto test_verbose
if "%choice%"=="3" goto test_output
if "%choice%"=="4" goto test_file
if "%choice%"=="5" goto test_static
if "%choice%"=="6" goto test_compress
if "%choice%"=="7" goto test_llm
if "%choice%"=="8" goto test_scaledown
if "%choice%"=="9" goto test_api
if "%choice%"=="10" goto test_ranking
if "%choice%"=="11" goto test_fail_fast
if "%choice%"=="12" goto test_slowest
if "%choice%"=="13" goto test_coverage
if "%choice%"=="14" goto test_debug
if "%choice%"=="15" goto end
goto menu
REM ============================================================
REM COMMANDS
REM ============================================================
:test_all
echo Running all tests...
pytest
pause
goto menu
:test_verbose
echo Running all tests (verbose)...
pytest -v
pause
goto menu
:test_output
echo Running all tests (with output)...
pytest -v -s
pause
goto menu
:test_file
set /p file="Enter test file (e.g., test_compressor.py): "
echo Running tests from !file!...
pytest tests/!file! -v
pause
goto menu
:test_static
echo Testing static checks...
pytest tests/test_static_checks.py -v
pause
goto menu
:test_compress
echo Testing compression...
pytest tests/test_compressor.py -v
pause
goto menu
:test_llm
echo Testing LLM client...
pytest tests/test_llm_client.py -v
pause
goto menu
:test_scaledown
echo Testing ScaleDown...
pytest tests/test_scaledown_compression.py -v
pause
goto menu
:test_api
echo Testing API endpoint...
pytest tests/test_api_review_endpoint.py -v
pause
goto menu
:test_ranking
echo Testing issue ranking...
pytest tests/test_ranking.py -v
pause
goto menu
:test_fail_fast
echo Running tests (stop on first failure)...
pytest -x -v
pause
goto menu
:test_slowest
echo Running tests (show slowest 5)...
pytest --durations=5 -v
pause
goto menu
:test_coverage
echo Generating coverage report...
pytest --cov=app --cov-report=html -v
echo.
echo Coverage report saved to: htmlcov\index.html
pause
goto menu
:test_debug
echo Running tests with debugging (drops into debugger on failure)...
pytest -v -s --pdb
pause
goto menu
:end
echo.
echo Thank you for testing!
echo.
exit /b 0