Setup, execute and teardown the whole suite. Suite execution consists of running all test cases scheduled to be executed. A test cast run consists of setup, execution and teardown of said test case.
(self)
| 281 | return True |
| 282 | |
| 283 | def run(self) -> None: |
| 284 | """ |
| 285 | Setup, execute and teardown the whole suite. |
| 286 | Suite execution consists of running all test cases scheduled to be executed. |
| 287 | A test cast run consists of setup, execution and teardown of said test case. |
| 288 | """ |
| 289 | test_suite_name = self.__class__.__name__ |
| 290 | |
| 291 | try: |
| 292 | self._logger.info(f"Starting test suite setup: {test_suite_name}") |
| 293 | self.set_up_suite() |
| 294 | self._result.update_setup(Result.PASS) |
| 295 | self._logger.info(f"Test suite setup successful: {test_suite_name}") |
| 296 | except Exception as e: |
| 297 | self._logger.exception(f"Test suite setup ERROR: {test_suite_name}") |
| 298 | self._result.update_setup(Result.ERROR, e) |
| 299 | |
| 300 | else: |
| 301 | self._execute_test_suite() |
| 302 | |
| 303 | finally: |
| 304 | try: |
| 305 | self.tear_down_suite() |
| 306 | self.sut_node.kill_cleanup_dpdk_apps() |
| 307 | self._result.update_teardown(Result.PASS) |
| 308 | except Exception as e: |
| 309 | self._logger.exception(f"Test suite teardown ERROR: {test_suite_name}") |
| 310 | self._logger.warning( |
| 311 | f"Test suite '{test_suite_name}' teardown failed, " |
| 312 | f"the next test suite may be affected." |
| 313 | ) |
| 314 | self._result.update_setup(Result.ERROR, e) |
| 315 | if len(self._result.get_errors()) > 0 and self.is_blocking: |
| 316 | raise BlockingTestSuiteError(test_suite_name) |
| 317 | |
| 318 | def _execute_test_suite(self) -> None: |
| 319 | """ |
no test coverage detected