def start(self): local_conf = Conf("local") self.log_folder = local_conf.get_string("report.folder") if not self.log_folder: self.log_folder = os.getcwd() + "/log/" if not self.log_folder.endswith("/"): self.log_folder += "/" local_utils.prepare_template(self.log_folder) local_utils.prepare_current_log_folder(self.log_folder)
def __init__(self): conf = Conf("remote") remote_enable = conf.get_string("enable") if remote_enable.lower() == "true": print("Enable remote Reporter") self.reporters.append(difido.RemoteReport()) else: print("remote reporter disabled") self.reporters.append(difido.Console())
def pytest_collection_finish(session): """ called after collection has been performed and modified. :param _pytest.main.Session session: the pytest session object """ print("~~~~~~~~~~~~~~~~~~~~~~~~~`Automation Ver :: "+automation_ver+"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") conf = Conf("remote") description = conf.get_string("description") reporter.start_suite(description, testAttr) reporter.add_execution_properties("automation_version", automation_ver)
def start(self): conf = Conf("remote") self.execution_properties = conf.get_dict("execution.properties") details = ExecutionDetails() details.description = conf.get_string("description") details.execution_properties = self.execution_properties try: self.execution_id = remote_utils.prepare_remote_execution(details) self.enabled = True except: self.enabled = False return machine = self.execution.get_last_machine() try: self.machine_id = remote_utils.add_machine(self.execution_id, machine) except: self.enabled = False return self.retries = 10