-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
devtest
committed
Aug 4, 2016
1 parent
5bc6cff
commit 715371e
Showing
12 changed files
with
232 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
if [ -f "set-vars.sh" ]; then | ||
|
||
source set-vars.sh | ||
|
||
echo =================================================================== | ||
echo "Deploying Jtest Application Coverage Monitor for build.id="$BUILD_ID | ||
echo =================================================================== | ||
|
||
echo **1/2** Cleaning up old coverage data | ||
rm -f $APP_COVERAGE_DIR/monitor/runtime_coverage/runtime_coverage* | ||
|
||
echo **2/2** Copy and unzip monitor package | ||
cp target/jtest/monitor/monitor.zip $APP_COVERAGE_DIR | ||
|
||
pushd $APP_COVERAGE_DIR | ||
unzip -o monitor.zip | ||
popd | ||
|
||
echo =================================================================== | ||
echo "Finished deploying Jtest Application Coverage Monitor for build.id="$BUILD_ID | ||
echo =================================================================== | ||
|
||
else | ||
echo "Incorrect usage ... running script in wrong directory, cannot find setvars.sh" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
if [ -f "set-vars.sh" ]; then | ||
|
||
source set-vars.sh | ||
|
||
echo =================================================================== | ||
echo Calculating Application Coverage against build.id=$BUILD_ID | ||
echo =================================================================== | ||
|
||
echo **1/2** Calculating coverage | ||
jtestcli -config "builtin://Calculate Application Coverage" -staticcoverage $APP_COVERAGE_DIR/monitor/static_coverage.xml -runtimecoverage $APP_COVERAGE_DIR/monitor/runtime_coverage -property build.id=$BUILD_ID -property dtp.project=$DTP_PROJECT -property report.coverage.images="Parabank-FT;Parabank-All" -report jtest-ft-cov -property session.tag="parabank-win32_x86_64" > jtest-ft-cov-$RUN_TIME.log 2>&1 | ||
|
||
echo **2/2** Cleaning up processed coverage data | ||
rm $APP_COVERAGE_DIR/monitor/runtime_coverage/runtime_coverage* | ||
|
||
echo ================================================================= | ||
echo "Finished Calculating Application Coverage for build.id="$BUILD_ID | ||
echo ================================================================= | ||
|
||
else | ||
echo "Incorrect usage ... running script in wrong directory, cannot find setvars.sh" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
if [ -f "set-vars.sh" ]; then | ||
|
||
source set-vars.sh | ||
|
||
if [ -z "$1"]; then | ||
echo "Incorrect usage ... requires build_id (e.g. PARABANK3-<DATE>-<BUILD_NUMBER>)" | ||
echo "Usage: jtest-mt-cov.sh <BUILD_ID> <REPORT XML>" | ||
exit | ||
fi | ||
if [ -z "$2"]; then | ||
echo "Incorrect usage ... requires report.xml file)" | ||
echo "Usage: jtest-mt-cov.sh <BUILD_ID> <REPORT XML>" | ||
exit | ||
fi | ||
if [ ! -f "$2" ]; then | ||
echo "Incorrect usage ... $2 does not exist" | ||
echo "Usage: jtest-mt-cov.sh <BUILD_ID> <REPORT XML>" | ||
exit | ||
fi | ||
|
||
export BUILD_ID=$1 | ||
|
||
echo =================================================================== | ||
echo "Processing Manual test result for build.id="$BUILD_ID | ||
echo =================================================================== | ||
|
||
echo **1/3** Uploading report to DTP | ||
curl -k --user admin:admin -F file=@$2 https://localhost:8082/api/v2/dataCollector | ||
|
||
echo **2/3** Processing Coverage | ||
jtestcli -config "builtin://Calculate Application Coverage" -staticcoverage $APP_COVERAGE_DIR/monitor/static_coverage.xml -runtimecoverage $APP_COVERAGE_DIR/monitor/runtime_coverage -property build.id=$BUILD_ID -property dtp.project=$DTP_PROJECT -property report.coverage.images="Parabank-MT;Parabank-All" -report jtest-mt-cov -property session.tag="manual-win32_x86_64" > jtest-mt-cov-$RUN_TIME.log 2>&1 | ||
|
||
echo **3/3** Cleaning up processed coverage data | ||
rm $APP_COVERAGE_DIR/monitor/runtime_coverage/runtime_coverage* | ||
|
||
echo ================================================================= | ||
echo "Finished processing Manual test results for build.id="$BUILD_ID | ||
echo ================================================================= | ||
|
||
else | ||
echo "Incorrect usage ... running script in wrong directory, cannot find setvars.sh" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
if [ -f "set-vars.sh" ]; then | ||
|
||
source set-vars.sh | ||
|
||
export BUILD_ID=$BUILD_ID"delta" | ||
|
||
echo =================================================================== | ||
echo Running Static Analysis and Unit Tests against build.id=$BUILD_ID | ||
echo =================================================================== | ||
|
||
echo **1/3** Execute Static Analysis: Recommended Rules | ||
mvn jtest:jtest -Djtest.config="jtest.dtp://Recommended Rules" -Dmaven.test.skip=true -Dmaven.test.failure.ignore=true -Dproperty.dtp.project=$DTP_PROJECT -Djtest.showsettings=true -Djtest.report=jtest-sa -Dproperty.console.verbosity.level=high -Dproperty.build.id=$BUILD_ID > jtest-sa-$RUN_TIME.log 2>&1 | ||
|
||
# echo **X/X** (Optional) Execute Static Analysis: All Rules | ||
# mvn jtest:jtest -Djtest.config="jtest.dtp://All Rules" -Dmaven.test.skip=true -Dmaven.test.failure.ignore=true -Dproperty.dtp.project=$DTP_PROJECT -Djtest.showsettings=true -Djtest.report=jtest-sa-all -Dproperty.console.verbosity.level=high -Dproperty.build.id=$BUILD_ID > jtest-sa-all-$RUN_TIME.log 2>&1 | ||
|
||
echo **2/3** Execute Metrics | ||
mvn jtest:jtest -Djtest.config="jtest.dtp://Metrics" -Dmaven.test.skip=true -Dmaven.test.failure.ignore=true -Dproperty.dtp.project=$DTP_PROJECT -Djtest.showsettings=true -Djtest.report=jtest-ma -Dproperty.console.verbosity.level=high -Dproperty.build.id=$BUILD_ID > jtest-ma-$RUN_TIME.log 2>&1 | ||
|
||
echo **3/3** Execute Unit Tests | ||
mvn process-test-classes jtest:agent test jtest:jtest -Djtest.config="builtin://Unit Tests" -Dmaven.test.failure.ignore=true -Dproperty.dtp.project=$DTP_PROJECT -Dproperty.build.id=$BUILD_ID -Dproperty.report.coverage.images="Parabank-UT;Parabank-All" -Dproperty.console.verbosity.level=high -Djtest.showsettings=true -Djtest.report=jtest-ut > jtest-ut-$RUN_TIME.log 2>&1 | ||
|
||
echo ================================================================= | ||
echo Finished Static Analysis and Unit Testing of build.id=$BUILD_ID | ||
echo ================================================================= | ||
|
||
else | ||
echo "Incorrect usage ... running script in wrong directory, cannot find setvars.sh" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
if [ -f "set-vars.sh" ]; then | ||
|
||
source set-vars.sh | ||
|
||
echo =================================================================== | ||
echo Running Static Analysis and Unit Tests against build.id=$BUILD_ID | ||
echo =================================================================== | ||
|
||
echo **1/3** Execute Static Analysis: Recommended Rules | ||
mvn jtest:jtest -Djtest.config="jtest.dtp://Recommended Rules" -Dmaven.test.skip=true -Dmaven.test.failure.ignore=true -Dproperty.dtp.project=$DTP_PROJECT -Djtest.showsettings=true -Djtest.report=jtest-sa -Dproperty.console.verbosity.level=high -Dproperty.build.id=$BUILD_ID > jtest-sa-$RUN_TIME.log 2>&1 | ||
|
||
# echo **X/X** (Optional) Execute Static Analysis: All Rules | ||
# mvn jtest:jtest -Djtest.config="jtest.dtp://All Rules" -Dmaven.test.skip=true -Dmaven.test.failure.ignore=true -Dproperty.dtp.project=$DTP_PROJECT -Djtest.showsettings=true -Djtest.report=jtest-sa-all -Dproperty.console.verbosity.level=high -Dproperty.build.id=$BUILD_ID > jtest-sa-all-$RUN_TIME.log 2>&1 | ||
|
||
echo **2/3** Execute Metrics | ||
mvn jtest:jtest -Djtest.config="jtest.dtp://Metrics" -Dmaven.test.skip=true -Dmaven.test.failure.ignore=true -Dproperty.dtp.project=$DTP_PROJECT -Djtest.showsettings=true -Djtest.report=jtest-ma -Dproperty.console.verbosity.level=high -Dproperty.build.id=$BUILD_ID > jtest-ma-$RUN_TIME.log 2>&1 | ||
|
||
echo **3/3** Execute Unit Tests | ||
mvn process-test-classes jtest:agent test jtest:jtest -Djtest.config="builtin://Unit Tests" -Dmaven.test.failure.ignore=true -Dproperty.dtp.project=$DTP_PROJECT -Dproperty.build.id=$BUILD_ID -Dproperty.report.coverage.images="Parabank-UT;Parabank-All" -Dproperty.console.verbosity.level=high -Djtest.showsettings=true -Djtest.report=jtest-ut > jtest-ut-$RUN_TIME.log 2>&1 | ||
|
||
echo ================================================================= | ||
echo Finished Static Analysis and Unit Testing of build.id=$BUILD_ID | ||
echo ================================================================= | ||
|
||
else | ||
echo "Incorrect usage ... running script in wrong directory, cannot find setvars.sh" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
#**** Setup | ||
export DTP_PROJECT=Parabank-v3 | ||
export RUN_DATE=`date +%Y%m%d` | ||
export BUILD_ID=PARABANK3-$RUN_DATE-$BUILD_NUMBER | ||
export RUN_TIME=`date +%Y%m%d%H%M` | ||
|
||
export APP_COVERAGE_DIR=/tmp | ||
|
||
echo =================================================================== | ||
echo DTP Project:$DTP_PROJECT "("$RUN_TIME")" | ||
echo =================================================================== | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
if [ -f "set-vars.sh" ]; then | ||
|
||
source set-vars.sh | ||
|
||
echo =================================================================== | ||
echo Running Functional Tests against build.id=$BUILD_ID | ||
echo =================================================================== | ||
|
||
pushd soatest | ||
cp templatesettings.properties localsettings.properties | ||
echo build.id=$BUILD_ID >> localsettings.properties | ||
echo general.project=$DTP_PROJECT >> localsettings.properties | ||
echo session.tag=$DTP_PROJECT-${config_name} >> localsettings.properties | ||
|
||
echo ======================Parabank============================== | ||
|
||
echo **1/3** Importing project into SOAtest | ||
soatestcli -data . -import TestAssets | ||
|
||
echo "**2/3** Running SOAtest (Parabank)" | ||
rm report-parabank/*.* | ||
soatestcli -config "user://Example Configuration" -data . -resource TestAssets -report report-parabank -localsettings localsettings.properties > soatest-parabank-$RUN_TIME.log 2>&1 | ||
|
||
echo **3/3** Uploading report to DTP | ||
curl -k --user admin:admin -F file=@report-parabank/report.xml https://localhost:8082/api/v2/dataCollector | ||
popd | ||
|
||
echo ======================Bookstore============================== | ||
pushd soatest | ||
|
||
echo **1/3** Importing project into SOAtest | ||
soatestcli -data . -import Bookstore | ||
|
||
echo "**2/3** Running SOAtest (Bookstore)" | ||
rm report-bookstore/*.* | ||
soatestcli -config "ApplicationCoverage.properties" -data . -resource Bookstore -report report-bookstore -localsettings localsettings.properties > soatest-bookstore-$RUN_TIME.log 2>&1 | ||
|
||
echo **3/3** Uploading report to DTP | ||
curl -k --user admin:admin -F file=@report-bookstore/report.xml https://localhost:8082/api/v2/dataCollector | ||
popd | ||
|
||
echo ================================================================= | ||
echo Finished Functional Tests of build.id=$BUILD_ID | ||
echo ================================================================= | ||
|
||
else | ||
echo "Incorrect usage ... running script in wrong directory, cannot find setvars.sh" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<stubs version="2"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters