forked from parasoft/parabank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jtest-mt-cov.bat
53 lines (43 loc) · 2.06 KB
/
jtest-mt-cov.bat
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
@echo off
IF %1.==. GOTO IncorrectUsage
IF %2.==. GOTO IncorrectUsage
call set-vars
IF %1.==. (
echo "Incorrect usage ... requires build_id (e.g. PARABANK3-%date:~10,4%%date:~4,2%%date:~7,2%-<BUILD_NUMBER>)"
echo "Usage: jtest-mt-cov.bat <BUILD_ID> <REPORT XML>"
GOTO End
)
IF %2.==. (
echo "Incorrect usage ... requires report.xml file)"
echo "Usage: jtest-mt-cov.bat <BUILD_ID> <REPORT XML>"
GOTO End
)
IF NOT EXIST %2 (
echo "Incorrect usage ... %2 does not exist"
echo "Usage: jtest-mt-cov.bat <BUILD_ID> <REPORT XML>"
GOTO End
)
IF NOT EXIST set-vars.bat (
echo "Incorrect usage ... running script in wrong directory, cannot find setvars.bat"
GOTO End
)
call set-vars
set BUILD_ID=%1
echo ===================================================================
echo Processing Manual test result for build.id=%BUILD_ID%
echo ===================================================================
echo **1/3** Uploading report to DTP
REM curl.exe -k --user admin:admin -F file=@%2 https://localhost:8082/api/v2/dataCollector
echo **2/3** Processing Coverage
call jtestcli -config "builtin://Calculate Application Coverage" -staticcoverage %APP_COVERAGE_DIR%\monitor\static_coverage.xml -runtimecoverage %APP_COVERAGE_DIR%\monitor\runtime_coverage\__default__ -property build.id=%BUILD_ID% -property dtp.project=%DTP_PROJECT% -property report.coverage.images="Parabank-MT;Parabank-All" -report %REPORT_DIR%\jtest-mt-cov -property session.tag="manual-win32_x86_64" > %LOG_DIR%\jtest-mt-cov-%RUN_TIME%.log 2>&1
echo **3/3** Cleaning up processed coverage data
call erase /Q %APP_COVERAGE_DIR%\monitor\runtime_coverage\__default__\runtime_coverage*
echo =================================================================
echo Finished processing Manual test results for build.id=%BUILD_ID%
echo =================================================================
GOTO End
:IncorrectUsage
echo "Incorrect usage ... requires build_id and location of report.xml and runtime_coverage directory for coverage data"
echo "Usage: jtest-mt-cov.bat <BUILD_ID> <DATA DIRECTORY>"
GOTO End
:End