add coverage test report in term, xml (for jenkins use) and html 61/53661/2
authorfrancois.cellier <francois.cellier@orange.com>
Tue, 13 Mar 2018 10:12:43 +0000 (11:12 +0100)
committerThomas Duval <thomas.duval@orange.com>
Wed, 14 Mar 2018 08:23:35 +0000 (09:23 +0100)
Change-Id: Icb6ecc7075e0f5ad178c510762596048e3539290

moon_pythonunittest/requirements.txt
moon_pythonunittest/run_tests.sh
python_moonclient/Changelog
tests/python_unit/run_tests.sh

index b611b00..fe10729 100644 (file)
@@ -7,4 +7,5 @@ werkzeug
 flask
 requests
 pytest
-requests_mock
\ No newline at end of file
+pytest-cov
+requests_mock
index b59a9ec..688166f 100644 (file)
@@ -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 .
index 9a2971c..c58d83c 100644 (file)
@@ -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'.
index 0a9ac1f..ab30e52 100644 (file)
@@ -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