aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/tests/unit/core/test_robotframework.py
diff options
context:
space:
mode:
authorBellengé Maxime <maxime.bellenge@orange.com>2022-06-30 11:56:51 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2022-07-07 15:07:09 +0200
commit4970d3bfe0e8e580beaa86ae7c41977e2e93ab3f (patch)
treec70ef205cfa04b1ff674f2726ffd5f38ba5ba7b0 /xtesting/tests/unit/core/test_robotframework.py
parent861f79d46397d8bbc5b55b95bc4ca2ac0fb1f247 (diff)
Add deny_skipping parameter
It takes into account or not skip tests in the global result It also adds unit tests to cover it. It should be noted that if follows the deny skipping model proposed by Functest (tempest). Change-Id: I15fa7a3946c6e3b2ae190e4f8abf3b9361a391a4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/tests/unit/core/test_robotframework.py')
-rw-r--r--xtesting/tests/unit/core/test_robotframework.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/xtesting/tests/unit/core/test_robotframework.py b/xtesting/tests/unit/core/test_robotframework.py
index f36625e6..bbd99f50 100644
--- a/xtesting/tests/unit/core/test_robotframework.py
+++ b/xtesting/tests/unit/core/test_robotframework.py
@@ -86,25 +86,42 @@ class ParseResultTesting(unittest.TestCase):
{'description': config['name'], 'tests': []})
def test_null_passed(self):
- self._config.update({'statistics.passed': 0,
+ self._config.update({'statistics.skipped': 0,
+ 'statistics.passed': 0,
'statistics.total': 20})
self._test_result(self._config, 0)
def test_no_test(self):
- self._config.update({'statistics.passed': 20,
+ self._config.update({'statistics.skipped': 0,
+ 'statistics.passed': 20,
'statistics.total': 0})
self._test_result(self._config, 0)
def test_half_success(self):
- self._config.update({'statistics.passed': 10,
+ self._config.update({'statistics.skipped': 0,
+ 'statistics.passed': 10,
'statistics.total': 20})
self._test_result(self._config, 50)
def test_success(self):
- self._config.update({'statistics.passed': 20,
+ self._config.update({'statistics.skipped': 0,
+ 'statistics.passed': 20,
'statistics.total': 20})
self._test_result(self._config, 100)
+ def test_skip_excluded(self):
+ self.test.deny_skipping = True
+ self._config.update({'statistics.skipped': 1,
+ 'statistics.passed': 4,
+ 'statistics.total': 5})
+ self._test_result(self._config, 80)
+
+ def test_skip_included(self):
+ self._config.update({'statistics.skipped': 1,
+ 'statistics.passed': 4,
+ 'statistics.total': 5})
+ self._test_result(self._config, 100)
+
class GenerateReportTesting(unittest.TestCase):