-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate-reports.bat
More file actions
63 lines (53 loc) · 1.78 KB
/
Copy pathgenerate-reports.bat
File metadata and controls
63 lines (53 loc) · 1.78 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
@echo off
echo ========================================
echo GENERATE AND OPEN ALL TEST REPORTS
echo ========================================
cd /d "C:\Users\KANNAN\IdeaProjects\DemoProject-Amazon Q"
echo [1/4] Running TestNG tests...
call mvn clean test -DsuiteXmlFile=testng.xml
echo.
echo [2/4] Generating Allure HTML report...
call mvn allure:report
echo.
echo [3/4] Opening all reports...
REM Open Cucumber HTML report
if exist "target\cucumber-html-reports\report.html" (
start target\cucumber-html-reports\report.html
echo 🌐 Cucumber HTML report opened
) else (
echo ⚠️ Cucumber HTML report not found
)
REM Open TestNG report
if exist "target\surefire-reports\index.html" (
timeout /t 1 /nobreak >nul
start target\surefire-reports\index.html
echo 📊 TestNG report opened
) else (
echo ⚠️ TestNG report not found
)
REM Wait and open Allure report
timeout /t 2 /nobreak >nul
if exist "target\site\allure-maven-plugin\index.html" (
start target\site\allure-maven-plugin\index.html
echo 📈 Allure HTML report opened
) else (
echo ⚠️ Allure HTML report not found, trying allure:serve...
start cmd /c "mvn allure:serve"
)
REM Open screenshots folder
timeout /t 1 /nobreak >nul
if exist "test-screenshots" (
start explorer test-screenshots
echo 📸 Screenshots folder opened
)
echo.
echo [4/4] Report generation completed!
echo ========================================
echo AVAILABLE REPORTS:
echo 📊 TestNG HTML: target\surefire-reports\index.html
echo 📈 Allure HTML: target\site\allure-maven-plugin\index.html
echo 📊 Cucumber JSON: target\cucumber-json-reports\Cucumber.json
echo 📄 TestNG XML: target\testng-xml-reports\TestNG.xml
echo 📸 Screenshots: test-screenshots\
echo ========================================
pause