summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorrohitsakala <rohitsakala@gmail.com>2017-01-21 21:30:33 +0530
committerrohitsakala <rohitsakala@gmail.com>2017-01-23 12:05:02 +0530
commit1bf58ff929b2e06899b29c066bb7aa2815a22d6c (patch)
treecf819109c45a4c8aa22fb4945f46cd3ea0551fa4 /jjb
parent34338a12d9a8dd2ac9ddd2882efca18fc8fb33de (diff)
Add code coverage report in jenkins job
Modified existing bash script to enable code coverage report in jenkins job. Removed test-requirements.txt. JIRA: FUNCTEST-703 Change-Id: I7ea6b5c87ce7d098dcb0c74ed195db0f6c3b9692 Signed-off-by: rohitsakala <rohitsakala@gmail.com>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/releng/testapi-automate.yml21
-rw-r--r--jjb/releng/testapi-run-tests.sh17
2 files changed, 20 insertions, 18 deletions
diff --git a/jjb/releng/testapi-automate.yml b/jjb/releng/testapi-automate.yml
index c03835279..25ee687e2 100644
--- a/jjb/releng/testapi-automate.yml
+++ b/jjb/releng/testapi-automate.yml
@@ -49,6 +49,25 @@
builders:
- run-unit-tests
+ publishers:
+ - junit:
+ results: nosetests.xml
+ - cobertura:
+ report-file: "coverage.xml"
+ only-stable: "true"
+ health-auto-update: "true"
+ stability-auto-update: "true"
+ zoom-coverage-chart: "true"
+ targets:
+ - files:
+ healthy: 10
+ unhealthy: 20
+ failing: 30
+ - method:
+ healthy: 50
+ unhealthy: 40
+ failing: 30
+
- job-template:
name: 'testapi-automate-{stream}'
@@ -98,7 +117,7 @@
name: run-unit-tests
builders:
- shell: |
- bash ./jjb/releng/testapi-run-tests.sh
+ bash ./utils/test/testapi/run_test.sh
- builder:
name: docker-update
diff --git a/jjb/releng/testapi-run-tests.sh b/jjb/releng/testapi-run-tests.sh
deleted file mode 100644
index 47691ed04..000000000
--- a/jjb/releng/testapi-run-tests.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-set -o errexit
-
-echo "Running unit tests..."
-
-# Creating virtual environment
-virtualenv $WORKSPACE/testapi_test_venv
-source $WORKSPACE/testapi_test_venv/bin/activate
-
-cd $WORKSPACE/utils/test/testapi/
-
-# Install requirements
-pip install -r requirements.txt
-pip install -r test-requirements.txt
-
-# Run unit tests
-bash run_test.sh