Update robotframework to latest release 85/72985/4
authorCédric Ollivier <cedric.ollivier@orange.com>
Fri, 22 Oct 2021 14:38:28 +0000 (16:38 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 8 Nov 2021 14:36:31 +0000 (15:36 +0100)
Change-Id: I298320f666e048d42047fd00de74df83142a5186
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 208460e0295ca005237c60e3e3a73357ea46fd0d)

requirements.txt
upper-constraints.txt
xtesting/core/robotframework.py
xtesting/tests/unit/core/test_robotframework.py

index 394c2d7..7159652 100644 (file)
@@ -6,7 +6,7 @@ stevedore!=3.0.0 # Apache-2.0
 PyYAML # MIT
 enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD
 requests!=2.20.0,!=2.24.0 # Apache-2.0
-robotframework>=3.0
+robotframework>=4.0
 behave>=1.2.6
 behave-html-formatter>=0.9.4;python_version>='3.6'
 mock!=4.0.0,!=4.0.1 # BSD
index da4ba99..e3e6b64 100644 (file)
@@ -1,4 +1,4 @@
-robotframework===3.1.1
+robotframework===4.1.2
 bandit===1.1.0
 behave===1.2.6
 behave-html-formatter===0.9.4
index 3e3d9de..3a439ec 100644 (file)
@@ -39,7 +39,6 @@ class ResultVisitor(robot.api.ResultVisitor):
         output['status'] = test.status
         output['starttime'] = test.starttime
         output['endtime'] = test.endtime
-        output['critical'] = test.critical
         output['text'] = test.message
         output['elapsedtime'] = test.elapsedtime
         self._data.append(output)
@@ -65,8 +64,8 @@ class RobotFramework(testcase.TestCase):
         result.visit(visitor)
         try:
             self.result = 100 * (
-                result.suite.statistics.critical.passed /
-                result.suite.statistics.critical.total)
+                result.suite.statistics.passed /
+                result.suite.statistics.total)
         except ZeroDivisionError:
             self.__logger.error("No test has been run")
         self.start_time = timestamp_to_secs(result.suite.starttime)
index c24d33d..bc05f52 100644 (file)
@@ -41,15 +41,12 @@ class ResultVisitorTesting(unittest.TestCase):
                 'starttime': "20161216 16:00:00.000",
                 'endtime': "20161216 16:00:01.000",
                 'elapsedtime': 1000,
-                'text': 'Hello, World!',
-                'critical': True}
+                'text': 'Hello, World!'}
         test = model.TestCase(
             name=data['name'], status=data['status'], message=data['text'],
             starttime=data['starttime'], endtime=data['endtime'])
         test.parent = mock.Mock()
-        config = {'name': data['parent'],
-                  'criticality.test_is_critical.return_value': data[
-                      'critical']}
+        config = {'name': data['parent']}
         test.parent.configure_mock(**config)
         self.visitor.visit_test(test)
         self.assertEqual(self.visitor.get_data(), [data])
@@ -89,23 +86,23 @@ class ParseResultTesting(unittest.TestCase):
                              {'description': config['name'], 'tests': []})
 
     def test_null_passed(self):
-        self._config.update({'statistics.critical.passed': 0,
-                             'statistics.critical.total': 20})
+        self._config.update({'statistics.passed': 0,
+                             'statistics.total': 20})
         self._test_result(self._config, 0)
 
     def test_no_test(self):
-        self._config.update({'statistics.critical.passed': 20,
-                             'statistics.critical.total': 0})
+        self._config.update({'statistics.passed': 20,
+                             'statistics.total': 0})
         self._test_result(self._config, 0)
 
     def test_half_success(self):
-        self._config.update({'statistics.critical.passed': 10,
-                             'statistics.critical.total': 20})
+        self._config.update({'statistics.passed': 10,
+                             'statistics.total': 20})
         self._test_result(self._config, 50)
 
     def test_success(self):
-        self._config.update({'statistics.critical.passed': 20,
-                             'statistics.critical.total': 20})
+        self._config.update({'statistics.passed': 20,
+                             'statistics.total': 20})
         self._test_result(self._config, 100)