diff --git a/pytest_plugins/logging_hooks.py b/pytest_plugins/logging_hooks.py index f7bcaf43620..1cf24d89ee1 100644 --- a/pytest_plugins/logging_hooks.py +++ b/pytest_plugins/logging_hooks.py @@ -73,5 +73,7 @@ def pytest_runtest_logstart(nodeid, location): logger.info(f'Started Test: {nodeid}') -def pytest_runtest_logfinish(nodeid, location): - logger.info(f'Finished Test: {nodeid}') +def pytest_runtest_logreport(report): + """Process the TestReport produced for each of the setup, + call and teardown runtest phases of an item.""" + logger.info('Finished %s for test: %s, result: %s', report.when, report.nodeid, report.outcome) diff --git a/robottelo/hosts.py b/robottelo/hosts.py index f2d9b50269b..b0c2c765fc4 100644 --- a/robottelo/hosts.py +++ b/robottelo/hosts.py @@ -326,15 +326,21 @@ def clean_cached_properties(self): del self.__dict__[name] def setup(self): + logger.debug('START: setting up host %s', self) if not self.blank: self.remove_katello_ca() + logger.debug('END: setting up host %s', self) + def teardown(self): + logger.debug('START: tearing down host %s', self) if not self.blank and not getattr(self, '_skip_context_checkin', False): self.unregister() if type(self) is not Satellite and self.nailgun_host: self.nailgun_host.delete() + logger.debug('END: tearing down host %s', self) + def power_control(self, state=VmState.RUNNING, ensure=True): """Lookup the host workflow for power on and execute