aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrancois.cellier <francois.cellier@orange.com>2018-03-13 11:12:43 +0100
committerThomas Duval <thomas.duval@orange.com>2018-03-14 09:23:35 +0100
commit9f7c9cd25e7b89a208b64b8833b760c2b0d0ea07 (patch)
treee00c3980540a9e5f9dd8204474b0b58fe8c1f6e7
parent7d7a0a56ad4dc58ae24e205187b6129f7288bb46 (diff)
add coverage test report in term, xml (for jenkins use) and html
Change-Id: Icb6ecc7075e0f5ad178c510762596048e3539290
-rw-r--r--moon_pythonunittest/requirements.txt3
-rw-r--r--moon_pythonunittest/run_tests.sh6
-rw-r--r--python_moonclient/Changelog2
-rw-r--r--tests/python_unit/run_tests.sh2
4 files changed, 7 insertions, 6 deletions
diff --git a/moon_pythonunittest/requirements.txt b/moon_pythonunittest/requirements.txt
index b611b008..fe107293 100644
--- a/moon_pythonunittest/requirements.txt
+++ b/moon_pythonunittest/requirements.txt
@@ -7,4 +7,5 @@ werkzeug
flask
requests
pytest
-requests_mock \ No newline at end of file
+pytest-cov
+requests_mock
diff --git a/moon_pythonunittest/run_tests.sh b/moon_pythonunittest/run_tests.sh
index b59a9ec2..688166f0 100644
--- a/moon_pythonunittest/run_tests.sh
+++ b/moon_pythonunittest/run_tests.sh
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
cd /data
-#pip3 install -r tests/python_unit/requirements.txt --upgrade
-#pip3 install .
+pip3 install -r tests/unit_python/requirements.txt --upgrade
+pip3 install .
if [ -f /data/tests/unit_python/run_tests.sh ];
then
@@ -10,4 +10,4 @@ then
fi
cd /data/tests/unit_python
-pytest -s .
+pytest --cov --cov-report term --cov-report html --cov-report xml .
diff --git a/python_moonclient/Changelog b/python_moonclient/Changelog
index 9a2971cb..c58d83c4 100644
--- a/python_moonclient/Changelog
+++ b/python_moonclient/Changelog
@@ -1,4 +1,4 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
+# Copyright 2018 Open Platform for NFV Project, Inc. and its contributors
# This software is distributed under the terms and conditions of the 'Apache-2.0'
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
diff --git a/tests/python_unit/run_tests.sh b/tests/python_unit/run_tests.sh
index 0a9ac1f3..ab30e523 100644
--- a/tests/python_unit/run_tests.sh
+++ b/tests/python_unit/run_tests.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-echo "starting Moon Functional Tests"
+echo "starting Moon Unit Tests"
cd python_moonutilities
docker run --rm --volume $(pwd):/data wukongsun/moon_python_unit_test:latest