def begin_report(self): '''开始测试执行 ''' self._data["summary"]["start_time"] = datetime.now().strftime( "%Y-%m-%d %H:%M:%S") self._data["summary"]["hostname"] = socket.gethostname() self._data["summary"]["os"] = get_os_version()
def begin_report(self): """开始测试执行""" self._time_start = datetime.now() xmltpl = "<TestEnv><PC>%s</PC><OS>%s</OS></TestEnv>" hostname = socket.gethostname() os_ver = get_os_version() envxml = dom.parseString(xmltpl % (hostname, os_ver)) self._runrstnode.appendChild(envxml.childNodes[0])
def begin_report(self): '''开始测试执行 ''' self._data["summary"]["start_time"] = datetime.now().strftime( "%Y-%m-%d %H:%M:%S") self._data["summary"]["environment"]["hostname"] = socket.gethostname() self._data["summary"]["environment"]["os"] = get_os_version() self._data["summary"]["environment"]["qtaf_version"] = version python_version = "%s.%s.%s[%s]" % (sys.version_info[0], sys.version_info[1], sys.version_info[2], sys.platform) self._data["summary"]["environment"]["python_version"] = python_version