├── README.md ├── __init__.py ├── bussinses └── funnicgong.py ├── case ├── __init__.py ├── login_test.py ├── xiugai_test.py ├── zhaohui_test.py └── zhuce_test.py ├── config.py ├── data ├── case.xlsx └── page_data.yaml ├── geckodriver.log ├── logco └── 2018032418.log ├── report └── 2018-03-24_18_43.html ├── resultpang └── login1.png ├── run.py ├── suite ├── __init__.py └── testsuite.py └── util ├── BSTestRunner.py ├── HTMLTestRunner.py ├── gettestdata.py ├── log.py └── selse_feng.py /README.md: -------------------------------------------------------------------------------- 1 | # python+selenium +HTMLTestRunner自动化测试 2 | ## python 3 +selenium3 +HTMLTestRunner(python3版本) 3 | ### 使用的框架是python自带的unittest。使用ddt数据驱动,Excel管理测试用例 4 | ### bussinses 公共的逻辑模块编写 5 | ### data存放测试用例,界面定位元素 6 | ### report存放测试报告 7 | ### case存放测试用例。 8 | ### log 存放测试过程中的测试日志 9 | ### resultpang存放测试过程中的截图 10 | ### suite 测试用例集 11 | ### util 公共模块 12 | ### run.py 执行脚本。 13 | ![Alt text](https://github.com/liwanlei/FXTest/blob/master/image/wx.jpeg) 14 | -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | @author: lileilei 4 | @file: __init__.py 5 | @time: 2018/3/24 18:40 6 | """ -------------------------------------------------------------------------------- /bussinses/funnicgong.py: -------------------------------------------------------------------------------- 1 | import yaml,os 2 | path=os.getcwd() 3 | from util import log 4 | class Login_tes:#登录模块封装 5 | def __init__(self,driver):# 6 | self.driber=driver 7 | self.logs = log.log_message() 8 | self.file=open(path+"\\data\\page_data.yaml", "r",encoding= "utf-8") 9 | self.data=yaml.load(self.file) 10 | self.file.close() 11 | self.lo_url=self.data['login'].get('url') 12 | self.denglu=self.data['login'].get('denglu') 13 | self.username=self.data['login'].get('name') 14 | self.password=self.data['login'].get('password') 15 | self.sub=self.data['login'].get('denglu_btm') 16 | self.lo_err=self.data['login'].get('login_err') 17 | self.lo_suc=self.data['login'].get('login_suc') 18 | self.driber.get(self.lo_url) 19 | def login(self,suc,name,password): 20 | try: 21 | self.driber.find_element_by_link_text(self.denglu).click() 22 | self.driber.find_element_by_id(self.username).clear() 23 | self.driber.find_element_by_id(self.username).send_keys(name) 24 | self.driber.find_element_by_id(self.password).click() 25 | self.driber.find_element_by_id(self.password).send_keys(password) 26 | self.driber.find_element_by_id(self.sub).click() 27 | if suc=='1': 28 | self.login_su = self.driber.find_element_by_xpath(self.lo_suc).text 29 | return self.login_su 30 | if suc=='0': 31 | self.login_err=self.driber.find_element_by_xpath(self.lo_err).text 32 | except Exception as e: 33 | self.logs.error_log('用例执行失败,原因:%s'%e) 34 | finally: 35 | self.driber.quit() 36 | class Zhuce_tes:#注册模块的封装 37 | def __init__(self,driver): 38 | self.deriver=driver 39 | title = '注册模块' 40 | self.logs = log.log_message() 41 | self.file1=open(path+"\\data\\page_data.yaml", "r",encoding= "utf-8") 42 | self.data=yaml.load(self.file1) 43 | self.file1.close() 44 | self.zhu_url=self.data['zhuce'].get('url') 45 | self.zhu=self.data['zhuce'].get('zhuc') 46 | self.zhu_user=self.data['zhuce'].get('username') 47 | self.zhu_pwd=self.data['zhuce'].get('password') 48 | self.zhu_qpwd=self.data['zhuce'].get('querenpass') 49 | self.zhu_shouji=self.data['zhuce'].get('shouji') 50 | self.zhu_email=self.data['zhuce'].get('youxiang') 51 | self.zhu_butn=self.data['zhuce'].get('tijiao_btn') 52 | self.zhu_suc=self.data['zhuce'].get('zhuce_suc') 53 | self.zhu_err=self.data['zhuce'].get('zhuce_err') 54 | self.deriver.get(self.zhu_url) 55 | def zhuce(self,suc,name,password,password1,shouji,email): 56 | try: 57 | self.deriver.find_element_by_link_text(self.zhu).click() 58 | self.deriver.find_element_by_class_name(self.zhu_user).clear() 59 | self.deriver.find_element_by_class_name(self.zhu_user).send_keys(name) 60 | self.deriver.find_element_by_class_name(self.zhu_pwd).clear() 61 | self.deriver.find_element_by_class_name(self.zhu_pwd).send_keys(password) 62 | self.deriver.find_element_by_class_name(self.zhu_qpwd).clear() 63 | self.deriver.find_element_by_class_name(self.zhu_qpwd).send_keys(password1) 64 | self.deriver.find_element_by_class_name(self.zhu_shouji).clear() 65 | self.deriver.find_element_by_class_name(self.zhu_shouji).send_keys(shouji) 66 | self.deriver.find_element_by_class_name(self.zhu_email).clear() 67 | self.deriver.find_element_by_class_name(self.zhu_email).send_keys(email) 68 | self.deriver.find_element_by_class_name(self.zhu_butn).click() 69 | if suc =="1": 70 | self.zhu_su=self.deriver.find_element_by_id(self.zhu_suc).text 71 | return self.zhu_su 72 | if suc=='0': 73 | self.zhu_e=self.deriver.find_element_by_xpath(self.zhu_err).text 74 | return self.zhu_e 75 | except Exception as e: 76 | self.logs.error_log('用例执行失败,原因:%s' % e) 77 | finally: 78 | self.deriver.quit() 79 | class Zaohui_tes: 80 | def __init__(self,driver): 81 | self.driver=driver 82 | self.logs = log.log_message() 83 | self.file1=open(path+"\\data\\page_data.yaml", "r",encoding= "utf-8") 84 | self.data=yaml.load(self.file1) 85 | self.file1.close() 86 | self.zhao_url=self.data['zhaohui'].get('url') 87 | self.zhao_username=self.data['zhaohui'].get('username') 88 | self.zhao_btn=self.data['zhaohui'].get('zhaohui_btn') 89 | self.zhao_err=self.data['zhaohui'].get('zhaohui_err') 90 | self.zhao_suc=self.data['zhaohui'].get('zhaohui_suc') 91 | self.driver.get(self.zhao_url) 92 | def zhaohui(self,suc,name,eamil): 93 | try: 94 | self.driver.find_element_by_css_selector(self.zhao_username).clear() 95 | self.driver.find_element_by_css_selector(self.zhao_username).sned_keys(name) 96 | self.driver.find_element_by_css_selector(self.zhao_eamil).clear() 97 | self.driver.find_element_by_css_selector(self.zhao_eamil).sned_keys(eamil) 98 | self.driver.find_element_by_css_selector(self.zhao_btn).click() 99 | if suc == '1': 100 | self.zhao_su=self.driver.find_element_by_css_selector(self.zhao_suc).text 101 | return self.zhao_su 102 | if suc =="0": 103 | self.zhao_er=self.driver.find_element_by_xpath(self.zhao_err).text 104 | return self.zhao_er 105 | except Exception as e: 106 | self.logs.error_log('用例执行失败,原因:%s' % e) 107 | finally: 108 | self.driver.quit() 109 | class Rest_tes: 110 | def __init__(self,driver): 111 | self.driver=driver 112 | self.logs = log.log_message() 113 | self.file1=open(path+"\\data\\page_data.yaml", "r",encoding= "utf-8") 114 | self.data=yaml.load(self.file1) 115 | self.file1.close() 116 | self.rest_url=self.data['reset_pwd'].get('url') 117 | self.rest_eamil=self.data['reset_pwd'].get('email') 118 | self.reset_yan=self.data['reset_pwd'].get('yanzheng') 119 | self.reset_mima=self.data['reset_pwd'].get('mima') 120 | self.reset_mimaque=self.data['reset_pwd'].get('chongzhimima') 121 | self.reset_btn=self.data['reset_pwd'].get('reset_btn') 122 | self.reset_error=self.data['reset_pwd'].get('reset_error') 123 | self.reset_suc=self.data['reset_pwd'].get('reset_suc') 124 | self.driver.get(self.rest_url) 125 | def rest(self,suc,yan,eamil,mima,chongzhimima): 126 | try: 127 | self.driver.find_element_by_css_selector(self.rest_eamil).clear() 128 | self.driver.find_element_by_css_selector(self.rest_eamil).sned_keys(eamil) 129 | self.driver.find_element_by_css_selector(self.reset_yan).clear() 130 | self.driver.find_element_by_css_selector(self.reset_yan).sned_keys(yan) 131 | self.driver.find_element_by_css_selector(self.reset_mima).clear() 132 | self.driver.find_element_by_css_selector(self.reset_mima).sned_keys(mima) 133 | self.driver.find_element_by_css_selector(self.reset_mimaque).clear() 134 | self.driver.find_element_by_css_selector(self.reset_mimaque).sned_keys(chongzhimima) 135 | self.driver.find_element_by_css_selector(self.reset_btn).click() 136 | if suc =="1": 137 | self.rest_su=self.driver.find_element_by_id(self.reset_suc).text 138 | return self.rest_su 139 | if suc=='0': 140 | self.rest_err=self.driver.find_element_by_xpath(self.reset_error).text 141 | return self.rest_err 142 | except Exception as e: 143 | self.logs.error_log('用例执行失败,原因:%s' % e) 144 | finally: 145 | self.driver.quit() 146 | class Xiugai_tes: 147 | def __init__(self,driver): 148 | title = '修改模块' 149 | self.logs = log.log_message() 150 | self.driver=driver 151 | self.file1=open(path+"\\data\\page_data.yaml", "r",encoding= "utf-8") 152 | self.data=yaml.load(self.file1) 153 | self.file1.close() 154 | self.xiugai_url=self.data['xiugai'].get('url') 155 | self.xiugai_yuan=self.data['xiugai'].get('yuanmi') 156 | self.xiugai_mima=self.data['xiugai'].get('xiugaimi') 157 | self.xiugai_mimaque=self.data['xiugai'].get('xiugaimi1') 158 | self.xiugai_btn=self.data['xiugai'].get('xiugai_but') 159 | self.xiugai_suc=self.data['xiugai'].get('xiu_suc') 160 | self.xiugai_error=self.data['xiugai'].get('xiu_err') 161 | self.driver.get(self.xiugai_url) 162 | def xiugai(self,suc,yuanmima,mima,querenmima): 163 | try: 164 | self.driver.find_element_by_css_selector(self.xiugai_yuan).clear() 165 | self.driver.find_element_by_css_selector(self.xiugai_yuan).sned_keys(yuanmima) 166 | self.driver.find_element_by_css_selector(self.xiugai_mima).clear() 167 | self.driver.find_element_by_css_selector(self.xiugai_mima).sned_keys(mima) 168 | self.driver.find_element_by_css_selector(self.xiugai_mimaque).clear() 169 | self.driver.find_element_by_css_selector(self.xiugai_mimaque).sned_keys(querenmima) 170 | self.driver.find_element_by_link_text(self.xiugai_btn).click() 171 | if suc=='1': 172 | self.xiugai_su = self.driver.find_element_by_id(self.xiugai_suc).text 173 | return self.xiugai_su 174 | if suc=='0': 175 | self.xiugai_erro=self.driver.find_element_by_xpath(self.xiugai_error).text 176 | return self.xiugai_erro 177 | except Exception as e: 178 | self.logs.error_log('用例执行失败,原因:%s' % e) 179 | finally: 180 | self.driver.quit() -------------------------------------------------------------------------------- /case/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwanlei/python-selenium/b141331777dcfc33021dbb2565f9649d83bf78c0/case/__init__.py -------------------------------------------------------------------------------- /case/login_test.py: -------------------------------------------------------------------------------- 1 | from bussinses.funnicgong import Login_tes 2 | import ddt,unittest,os 3 | from util import log 4 | from selenium import webdriver 5 | from util.gettestdata import huoqu_test 6 | path=os.getcwd() 7 | case_path=path+'\\data\\case.xlsx' 8 | casedata=huoqu_test(case_path,3) 9 | @ddt.ddt 10 | class Testlogin(unittest.TestCase): 11 | def setUp(self): 12 | self.logs=log.log_message() 13 | self.derve=webdriver.Firefox() 14 | self.login_fun=Login_tes(self.derve) 15 | @ddt.data(*casedata) 16 | def test_login1(self,casedata): 17 | self.name=casedata['username'] 18 | self.pwd=casedata['pwd'] 19 | self.suc=casedata['suc'] 20 | self.assert_value = casedata['assert'] 21 | self.derve.get_screenshot_as_file(path+'\\resultpang\\%s.png'%casedata) 22 | self.logs.info_log('input data:name:%s,pwd:%s,suc:%s,assert:%s' % (self.name, self.pwd, self.suc, self.assert_value)) 23 | self.re_data = self.login_fun.login( self.suc,self.name, self.pwd) 24 | self.assertEqual(self.re_data, self.assert_value) 25 | def tearDown(self): 26 | self.derve.quit() 27 | -------------------------------------------------------------------------------- /case/xiugai_test.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Author : leizi 3 | from bussinses.funnicgong import Xiugai_tes 4 | from selenium import webdriver 5 | import unittest,time,os,ddt 6 | from util import log 7 | from util.gettestdata import huoqu_test 8 | path=os.getcwd() 9 | case_path=path+'\\data\\case.xlsx' 10 | casedata=huoqu_test(case_path,3) 11 | @ddt.ddt 12 | class Test_xiugai(unittest.TestCase): 13 | def setUp(self): 14 | self.logs = log.log_message() 15 | self.derve=webdriver.Fi() 16 | self.xiugai_fun=Xiugai_tes(self.derve) 17 | @ddt.data(*casedata) 18 | def test_xiugai_1(self,casedata): 19 | self.password=casedata['yuanmi'] 20 | self.xiugaimi=casedata['xiugaimi'] 21 | self.xiugaimi1=casedata['xiugaimi1'] 22 | self.suc=casedata['suc'] 23 | self.assert_vale=casedata['assert_vale'] 24 | self.return_data=self.xiugai_fun.xiugai(self.suc,self.password,self.xiugaimi,self.xiugaimi1) 25 | self.logs.info_log("input: password:%s,xiugaimima:%s,xiugaimima1:%s,assert:%s"%(self.password,self.xiugaimi,self.xiugaimi1,self.assert_vale)) 26 | time.sleep(1) 27 | self.assertAlmostEqual(self.return_data,self.assert_vale) 28 | def tearDown(self): 29 | self.derve.quit() 30 | -------------------------------------------------------------------------------- /case/zhaohui_test.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Author : leizi 3 | from bussinses.funnicgong import Zaohui_tes 4 | import unittest,time,os,ddt 5 | from util import log 6 | from selenium import webdriver 7 | from util.gettestdata import huoqu_test 8 | path=os.getcwd() 9 | case_path=path+'\\data\\case.xlsx' 10 | casedata=huoqu_test(case_path,2) 11 | @ddt.ddt 12 | class Testzhaohui(unittest.TestCase): 13 | def setUp(self): 14 | self.logs = log.log_message() 15 | self.derve=webdriver.Firefox() 16 | self.zhaohui_fun=Zaohui_tes(self.derve) 17 | @ddt.data(*casedata) 18 | def test_zhaohui_1(self,casedata): 19 | self.username=casedata['username'] 20 | self.email=casedata['email'] 21 | self.suc=casedata['suc'] 22 | self.assert_vale=casedata['assert_vale'] 23 | self.retu_data=self.zhaohui_fun.zhaohui(self.username,self.email,self.suc) 24 | self.derve.get_screenshot_as_file(path+'\\resultpang\\%s.png'%casedata['id']) 25 | self.logs.info_log('inptut name:%s,email:%s,assert:%s'%(self.username,self.email,self.assert_vale)) 26 | time.sleep(1) 27 | self.assertEqual(self.retu_data, self.assert_vale) 28 | def tearDown(self): 29 | self.derve.quit() -------------------------------------------------------------------------------- /case/zhuce_test.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Author : leizi 3 | from bussinses.funnicgong import Zhuce_tes 4 | import unittest,time,os,ddt 5 | from util import log 6 | from selenium import webdriver 7 | path=os.getcwd() 8 | from util.gettestdata import huoqu_test 9 | case_path=path+'\\data\\case.xlsx' 10 | casedata=huoqu_test(case_path,1) 11 | @ddt.ddt 12 | class Testzhuce(unittest.TestCase): 13 | def setUp(self): 14 | self.logs = log.log_message() 15 | self.derve=webdriver.Firefox() 16 | self.zhuce_fun=Zhuce_tes(self.derve) 17 | @ddt.data(*casedata) 18 | def test_zhuce_1(self,casedata): 19 | self.name=casedata['username'] 20 | self.password=casedata['mima'] 21 | self.passwordque=casedata['nima2'] 22 | self.shoujihao=casedata['shoujihao'] 23 | self.youxiang=casedata['youxiang'] 24 | self.suc=casedata['suc'] 25 | self.assert_vale=casedata['assert_vale'] 26 | self.re_data=self.zhuce_fun.zhuce(self.name,self.password,self.passwordque,self.shoujihao,self.youxiang,self.suc) 27 | self.derve.get_screenshot_as_file(path+'\\resultpang\\%s.png'%casedata[id]) 28 | self.logs.info_log("input:name:%s password:%s,passwordque:%s,shoujihao:%s,youxiang:%s ,assert:%s"%(self.name,self.password,self.passwordque,self.shoujihao,self.youxiang,self.assert_vale)) 29 | time.sleep(1) 30 | self.assertEqual(self.re_data, self.assert_vale) 31 | def tearDown(self): 32 | self.derve.quit() -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | @author: lileilei 4 | @file: config.py 5 | @time: 2018/3/24 18:39 6 | """ 7 | description='测试结果' #测试报告需要的描述 8 | reporttitle='自动化测试报告' #测试报告需要的title 9 | liulanqi='Firefox'#测试所需要的浏览器 -------------------------------------------------------------------------------- /data/case.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwanlei/python-selenium/b141331777dcfc33021dbb2565f9649d83bf78c0/data/case.xlsx -------------------------------------------------------------------------------- /data/page_data.yaml: -------------------------------------------------------------------------------- 1 | login: 2 | url: "http://127.0.0.1:8000/" 3 | denglu: "请登录" 4 | name: "firstname" 5 | password: "inputPassword" 6 | denglu_btm: "denglu" 7 | login_err: "/html/body/form/div[4]/div/h4[2]" 8 | login_suc: "/html/body/nav/div/div[2]/ul/div/ul/li[3]/a/span" 9 | zhuce: 10 | url: "http://127.0.0.1:8000/" 11 | zhuc: "注册" 12 | username: "username" #class 13 | password: "password" #class 14 | querenpass: "password1" #class 15 | shouji: "shouji" #class 16 | youxiang: "email" #class 17 | tijiao_btn: "submit" #class 18 | zhuce_err: "/html/body/form/div[6]/div/h4" #xpath 19 | zhuce_suc: "denglu" #id 20 | zhaohui: 21 | url: "http://127.0.0.1:8000/reset_pwd" 22 | username: 'input[name=\"firstname\"]' 23 | email: 'input[name=\"email\"]' 24 | zhaohui_btn: 'input[type=\"submit\"]' 25 | zhaohui_err: "/html/body/form/div[3]/div/h4" #xpath 26 | zhaohui_suc: 'input[type=\"submit\"]' #css 27 | reset_pwd: 28 | url: "http://127.0.0.1:8000/ret_passord" 29 | email: 'input[name=\"email\"]' 30 | yanzheng: 'input[name=\"yanzhengma\"]' 31 | mima: 'input[name=\"inputPassword\"]' 32 | chongzhimima: 'input[name=\"inputPassword1\"]' 33 | reset_btn: 'input[type=\"submit\"]' 34 | reset_error: "/html/body/form/div[5]/div/h4" 35 | reset_suc: "denglu" #id 36 | xiugai: 37 | url: "http://127.0.0.1:8000/xiugaimima" 38 | yuanmi: 'input[type=\"pass_yuan\"]' 39 | xiugaimi: 'input[type=\"inputPassword\"]' 40 | xiugaimi1: 'input[type=\"inputPassword1\"]' 41 | xiugai_but: "修改密码" 42 | xiu_err: "/html/body/form/div[4]/div/h4" 43 | xiu_suc: "denglu"#id 44 | xiebo: 45 | url: "http://127.0.0.1:8000/xiebo" 46 | biaoti: 'input[type=\"biaoti1\"]' 47 | neirong: "comment_textarea"#classname 48 | fenlei: "jumpMenu" #id 49 | fenlei1: "/html/body/div/div/div[1]/div/div[2]/form/div[4]/select/option[2]" #git xpath 50 | biaoqian: "biaoqian" #id 51 | bianqian1: 'input[value=\"python\"]' 52 | tuijian: 'input[name=\"tuijian\"]' 53 | xiebo_btn: 'input[type=\"submit\"]' 54 | xiebo_err: "/html/body/div/div/div[1]/div/div[2]/form/h4" 55 | xiebo_suc: "/html/body/div/div/div[1]/div/div[3]/h4" -------------------------------------------------------------------------------- /geckodriver.log: -------------------------------------------------------------------------------- 1 | 2 | 1521884158742 Marionette INFO Listening on port 62213 3 | 1521884159015 Marionette WARN TLS certificate errors will be ignored for this session 4 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 5 | [Child 29508, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 6 | [Child 29508, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 7 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 8 | [Child 29672, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 9 | [Child 29672, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 10 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 11 | [Child 25768, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 12 | [Child 25768, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 13 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 14 | [GPU 30284, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 15 | 16 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 17 | 18 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 19 | a DXGI adapter 20 | [GFX1-]: Could not get a DXGI adapter 21 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 22 | [Child 30096, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 23 | [Child 30096, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 24 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 25 | [Child 30324, ChromUnable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 26 | [Parent 31532, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 27 | [Parent 31532, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 28 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 29 | [Child 30864, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 30 | [Child 30864, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 31 | JavaScript error: resource:///modules/WindowsJumpLists.jsm, line 244: TypeError: this._builder is undefined 32 | [Parent 31532, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 33 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 34 | [Child 28368, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 35 | 36 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 37 | 38 | shutdown()@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Program%20Files/Mozilla%20Firefox/browser/features/activity-stream@mozilla.org.xpi!/bootstrap.js:196 < callBootstrapMethod()@resource://gre/modules/addons/XPIProvider.jsm:4406 < observe()@resource://gre/modules/addons/XPIProvider.jsm:2270 39 | 1521884219186 Marionette WARN TLS certificate errors will be ignored for this session 40 | 1521884220458 geckodriver INFO geckodriver 0.19.1 41 | 1521884220471 geckodriver INFO Listening on 127.0.0.1:62452 42 | 1521884222884 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rust_mozprofile.sdxOFSwC2Eba" 43 | 1521884224371 Marionette INFO Enabled via --marionette 44 | 1521884226657 Marionette INFO Listening on port 62460 45 | 1521884227092 Marionette WARN TLS certificate errors will be ignored for this session 46 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 47 | [Child 30032, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 48 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 49 | [Child 32320, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 50 | [Child 32320, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 51 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 52 | [Child 30436, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 53 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 54 | [GPU 30768, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 55 | 56 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 57 | 58 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 59 | Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 60 | JavaScript error: resource:///modules/WindowsJumpLists.jsm, line 244: TypeError: this._builder is undefined 61 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 62 | [Child 30420, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 63 | [Child 30420, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 64 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 65 | [GPU 30212, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 66 | 67 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 68 | 69 | omium/src/chrome/common/ipc_channel_win.cc, line 346 70 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 71 | [Child 33728, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 72 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 73 | [Child 33436, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 74 | [Child 33436, Chrome_ChildThread] WARNING: pipe error: 109: file[Child 24688, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/sUnable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 75 | JavaScript error: resource:///modules/WindowsJumpLists.jsm, line 244: TypeError: this._builder is undefined 76 | [Parent 32812, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 77 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 78 | [Child 33232, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 79 | [Child 33232, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 80 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 81 | [GPU 33092, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 82 | 83 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 84 | 85 | trator\AppData\Local\openvr\openvrpaths.vrpath 86 | [Parent 6944, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 87 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 88 | [Child 34044, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 89 | [Child 34044, Chrome_ChUnable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 90 | [Child 34768, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 91 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 92 | [Child 34864, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 93 | [Child 34864, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 94 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 95 | [Child 29572, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 96 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 97 | [GPU 34196, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 98 | 99 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 100 | 101 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 102 | ###!!! [Child][MessageChannel] Error: (msgtype=0x42001A,name=PGPU::Msg_InitCrashReporter) Closed channel: cannot send/recv 103 | 104 | 1521884334343 Marionette INFO Listening on port 62752 105 | 1521884334409 Marionette WARN TLS certificate errors will be ignored for this session 106 | [GFX1-]: Could not get a DXGI adapter 107 | [GFX1-]: Could not get a DXGI adapter 108 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 109 | [Parent 35408, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 110 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 111 | [Child 35760, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 112 | [Child 35760, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 113 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 114 | [Child 35736, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 115 | [Child 35736, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 116 | z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 117 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 118 | [Child 36776, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 119 | [Child 36776, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 120 | JavaScript error: resource:///modules/WindowsJumpLists.jsm, line 244: TypeError: this._builder is undefined 121 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 122 | [Child 36192, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 123 | [Child 36192, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 124 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 125 | [GPU 36064, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 126 | 127 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 128 | 129 | line 346 130 | [Child 37244, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 131 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 132 | [Child 37336, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 133 | [Parent 35888, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 134 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 135 | [Child 36636, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 136 | [Child 36636, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 137 | 1521884528434 geckodriver INFO geckodriver 0.19.1 138 | 1521884528449 geckodriver INFO Listening on 127.0.0.1:63199 139 | 1521884531330 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rust_mozprofile.QFgNPUVNk8gn" 140 | 1521884533107 Marionette INFO Enabled via --marionette 141 | 1521884535626 Marionette INFO Listening on port 63209 142 | 1521884536683 Marionette WARN TLS certificate errors will be ignored for this session 143 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 144 | [Child 34732, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 145 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 146 | [Child 33612, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 147 | [Child 33612, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 148 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 149 | [Child 29728, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 150 | *** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping 151 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 152 | [GPU 36220, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 153 | 154 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 155 | 156 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 157 | uild/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 158 | 159 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 160 | 161 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 162 | m/src/chrome/common/ipc_channel_win.cc, line 346 163 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 164 | [Child 35612, Chrome_C1521884575409 Marionette INFO Listening on port 63388 165 | 1521884575705 Marionette WARN TLS certificate errors will be ignored for this session 166 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 167 | [Parent 33232, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 168 | [Parent 33232, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 169 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 170 | [Child 33872, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 171 | [Child 33872, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 172 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 173 | [Child 30108, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 174 | [Child 30108, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 175 | Unable to 1521884583847 Marionette INFO Listening on port 63428 176 | 1521884583963 Marionette WARN TLS certificate errors will be ignored for this session 177 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 178 | [Child 31124, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 179 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 180 | [Child 36384, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 181 | [Child 36384, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 182 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 183 | [Child 29916, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 184 | [Child 29916, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 185 | *** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping 186 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 187 | [GPU 36948, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 188 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 189 | [Parent 32536, Gecko_IOThread] WARNING: pipe error: 232: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 513 190 | 191 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 192 | 193 | jar:file:///C:/Program%20Files/Mozilla%20Firefox/browser/features/activity-stream@mozilla.org.xpi!/bootstrap.js:196 < callBootstrapMethod()@resource://gre/modules/addons/XPIProvider.jsm:4406 < observe()@resource://gre/modules/addons/XPIProvider.jsm:2270 194 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 195 | [Child 34436, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 196 | [Child 34436, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 197 | Promise rejected while context is inactive: Message manager disconnected 198 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 199 | [Child 36500, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 200 | [Child 36500, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 201 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 202 | [Child 30036, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 203 | [Child 30036, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 204 | *** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping 205 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 206 | [GPU 35064, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 207 | 208 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 209 | 210 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 211 | 1521884594979 geckodriver INFO geckodriver 0.19.1 212 | 1521884594995 geckodriver INFO Listening on 127.0.0.1:63494 213 | 1521884598024 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rust_mozprofile.wOAKVKhXXyEi" 214 | 1521884599218 Marionette INFO Enabled via --marionette 215 | 1521884601634 Marionette INFO Listening on port 63504 216 | 1521884601724 Marionette WARN TLS certificate errors will be ignored for this session 217 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 218 | [Child 361521884606322 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rust_mozprofile.NQ63xYZQk80F" 219 | 1521884607526 Marionette INFO Enabled via --marionette 220 | 1521884609640 Marionette INFO Listening on port 63542 221 | 1521884609974 Marionette WARN TLS certificate errors will be ignored for this session 222 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 223 | [Parent 35952, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 224 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 225 | [Child 33980, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 226 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 227 | [Child 29540, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 228 | [Child 29540, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 229 | [Parent 35952, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 230 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 231 | [Child 37404, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 232 | [Child 37404, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 233 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 234 | [GPU 29192, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 235 | 236 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 237 | 238 | ING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 239 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 240 | [Child 36092, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/1521884625900 Marionette WARN TLS certificate errors will be ignored for this session 241 | 1521884626360 addons.xpi WARN Exception running bootstrap method shutdown on activity-stream@mozilla.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://activity-stream/lib/SnippetsFeed.jsm :: uninit :: line 125" data: no] Stack trace: uninit()@resource://activity-stream/lib/SnippetsFeed.jsm:125 < onAction()@resource://ac*** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping 242 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 243 | [GPU 31864, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 244 | 245 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 246 | 247 | esource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Program%20Files/Mozilla%20Firefox/browser/features/activity-stream@mozilla.org.xpi!/bootstrap.js:196 < callBootstrapMethod()@resource://gre/modules/addons/XPIProvider.jsm:4406 < observe()@resource://gre/modules/addons/XPIProvider.jsm:2270 248 | 1521884626537 geckodriver INFO geckodriver 0.19.1 249 | 1521884626550 geckodriver INFO Listening on 127.0.0.1:63648 250 | 1521884629611 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rust_mozprofile.CBrQ0DfHFylH" 251 | 1521884630901 Marionette INFO Enabled via --marionette 252 | 1521884632892 Marionette INFO Listening on port 63657 253 | 1521884633342 Marionette WARN TLS certificate errors will be ignored for this session 254 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 255 | [Parent 30732, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 256 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 257 | [Child 29008, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 258 | [Parent 30732, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 259 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 260 | [Child 32936, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 261 | [Child 32936, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 262 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 263 | [GPU 30112, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 264 | 265 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 266 | 267 | r: Unable to fetch oldest profile entry: Error: OS.File has been shut down. Rejecting request to DirectoryIterator_prototype_next 268 | JavaScript error: resource://gre/modules/ProfileAge.jsm, line 176: Error: Unable to fetch oldest profile entry: Error: OS.File has been shut down. Rejecting request to DirectoryIterator_prototype_next 269 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 270 | [GPU 35560, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 271 | 272 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 273 | 274 | 1521884634688 geckodriver INFO geckodriver 0.19.1 275 | 1521884634700 geckodriver INFO Listening on 127.0.0.1:63687 276 | 1521884637746 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rust_mozprofile.bhtj6ywaKtQz" 277 | 1521884638919 Marionette INFO Enabled via --marionette 278 | 1521884640916 Marionette INFO Listening on port 63697 279 | 1521884641450 Marionette WARN TLS certificate errors will be ignored for this session 280 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 281 | [Child 34116, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 282 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 283 | [Child 35616, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 284 | [Child 35616, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 285 | 286 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 287 | 288 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 289 | ocal\openvr\openvrpaths.vrpath 290 | [Child 31372, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 291 | [Child 31372, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 292 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 293 | [Parent 30868, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 294 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 295 | [Child 28012, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 296 | 297 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 298 | 299 | :/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 300 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 301 | [Child 33032, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 302 | 303 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 304 | 305 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 306 | uild/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 307 | 308 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 309 | 310 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 311 | pc_channel_win.cc, line 346 312 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 313 | [Child 33068, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 314 | [Child 33068, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 315 | [Parent 31516, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 316 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 317 | [Child 33104, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 318 | [Child 33104, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 319 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 320 | [GPU 24092, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 321 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 322 | [Parent 31728, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 323 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 324 | [Child 28292, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 325 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 326 | [Child 38088, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 327 | [Child 38088, Chrom[Parent 38556, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_wiJavaScript error: resource:///modules/WindowsJumpLists.jsm, line 244: TypeError: this._builder is undefined 328 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 329 | [Child 35304, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 330 | [Child 35304, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 331 | 332 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 333 | 334 | src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 335 | [Child 39020, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 336 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 337 | [Child 38848, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_chanJavaScript error: resource:///modules/WindowsJumpLists.jsm, line 244: TypeError: this._builder is undefined 338 | Unable to read VR Path Registry from C:\Users\AdministratoUnable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 339 | [GPU 38728, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 340 | 09: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 341 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 342 | [GPU 39588, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 343 | 344 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 345 | 346 | trator\AppData\Local\openvr\openvrpaths.vrpath 347 | JavaScript error: resource:///modules/WindowsJumpLists.jsm, line 244: TypeError: this.1521885087890 Marionette INFO Enabled via --marionette 348 | [GFX1-]: Failed to connect GPU process 349 | [GFX1-]: [D3D11] failed to get compositor device. 350 | [GFX1-]: [D3D11] Failed to init compositor with reason: FEATURE_FAILURE_D3D11_NO_DEVICE 351 | [GFX1-]: [D3D11] failed to get compositor device. 352 | [GFX1-]: [D3D11] Failed to init compositor with reason: FEATURE_FAILURE_D3D11_NO_DEVICE 353 | [GFX1-]: Could not g[GFX1-]: Could not get a DXGI adapter 354 | et a DXGI adapter 355 | [GFX1-]: Could not get a DXGI adapter 356 | 1521885103271 Marionette INFO Listening on port 64520 357 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 358 | [Child 31284, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 359 | [Child 31284, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 360 | 1521885103328 Marionette WARN TLS certificate errors will be ignored for this session 361 | [GFX1-]: Could not get a DXGI adapter 362 | [GFX1-]: [D3D11] failed to get compositor device. 363 | [GFX1-]: [D3D11] Failed to init compositor with reason: FEATURE_FAILURE_D3D11_NO_DEVICE 364 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 365 | JavaScript error: https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/static/protocol/https/plugins/every_cookie_4644b13.js, line 4: ReferenceError: c is not defined 366 | JavaScript warning: http://www.zzfdc.gov.cn/r/cms/zzfdc/cn/js/jquery-1.9.1.min.js, line 1: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead 367 | JavaScript warning: http://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js, line 1: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead 368 | JavaScript error: http://bdimg.share.baidu.com/static/api/js/trans/logger.js?v=d16ec0e3.js, line 1: TypeError: n.ajax.request is not a function 369 | JavaScript warning: https://zhidao.baidu.com/question/247312896.html, line 1613: SyntaxError: 09 is not a legal ECMA-262 octal constant 370 | JavaScript warning: http://www.zzfdc.gov.cn/r/cms/zzfdc/cn/js/jquery-1.9.1.min.js, line 1: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead 371 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 372 | [Parent 42276, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 373 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 374 | [Child 37092, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 375 | [Child 37092, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 376 | [Child 27480, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 377 | [Child 27480, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 378 | 379 | ###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost 380 | 381 | 382 | ###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost 383 | 384 | 385 | ###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost 386 | 387 | 388 | ###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost 389 | 390 | [Parent 42276, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 391 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 392 | [Child 31404, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 393 | 1521887749782 geckodriver INFO geckodriver 0.19.1 394 | 1521887749800 geckodriver INFO Listening on 127.0.0.1:49485 395 | 1521887752847 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rust_mozprofile.jrFqGa9IwNEq" 396 | 1521887754122 Marionette INFO Enabled via --marionette 397 | 1521887756260 Marionette INFO Listening on port 49499 398 | 1521887756603 Marionette WARN TLS certificate errors will be ignored for this session 399 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 400 | [Parent 36000, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 401 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 402 | [Child 39780, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 403 | [Child 39780, Chrome_CUnable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 404 | [Parent 34428, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 405 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 406 | [Child 35956, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 407 | [Child 35956, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 408 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 409 | [Child 34872, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 410 | [Child 34872, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 411 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 412 | [Child 42068, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 413 | [Child 42068, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 414 | *** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping 415 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 416 | [GPU 41892, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 417 | 418 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 419 | 420 | ser/features/activity-stream@mo*** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping 421 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 422 | [GPU 32696, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 423 | 424 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 425 | 426 | 1521887782921 geckodriver INFO geckodriver 0.19.1 427 | 1521887782934 geckodriver INFO Listening on 127.0.0.1:49662 428 | 1521887785987 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rust_mozprofile.yyKpOogLtgyA" 429 | 1521887787256 Marionette INFO Enabled via --marionette 430 | 1521887789268 Marionette INFO Listening on port 49676 431 | 1521887789631 Marionette WARN TLS certificate errors will be ignored for this session 432 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 433 | [Child 31936, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 434 | [Child 31936, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 435 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 436 | [Child 38084, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 437 | [Child 38084, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 438 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 439 | [Child 29428, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 440 | [Child 29428, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 441 | *** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping 442 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 443 | [GPU 41780, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 444 | 445 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 446 | 447 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 448 | hannel_win.cc, line 346 449 | *** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping 450 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 451 | [GPU 29932, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 452 | 453 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 454 | 455 | c_channel_win.cc, line 346 456 | [Parent 29068, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 457 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 458 | [Child 26208, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 459 | [Child 26208, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 460 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 461 | [Child 31880, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 462 | [Parent 29068, Gecko_IOThread] WARNING: p1521887825859 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rust_mozprofile.EjKTECXZBmnd" 463 | 1521887827280 Marionette INFO Enabled via --marionette 464 | 1521887829152 Marionette INFO Listening on port 49888 465 | 1521887829683 Marionette WARN TLS certificate errors will be ignored for this session 466 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 467 | [Parent 40508, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 468 | [Parent 40508, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 469 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 470 | [Child 36772, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 471 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 472 | [Child 42728, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 473 | [Parent 40508, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 474 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 475 | [Child 34568, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 476 | [Child 34568, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 477 | *** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping 478 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 479 | [GPU 41032, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 480 | 481 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 482 | 483 | 1521888232664 geckodriver INFO geckodriver 0.19.1 484 | 1521888232675 geckodriver INFO Listening on 127.0.0.1:50043 485 | 1521888235731 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rust_mozprofile.pkuS3im2eVQ0" 486 | 1521888236944 Marionette INFO Enabled via --marionette 487 | 1521888239885 Marionette INFO Listening on port 50054 488 | 1521888239933 Marionette WARN TLS certificate errors will be ignored for this session 489 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 490 | [Child 18564, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 491 | [Child 18564, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 492 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 493 | [Child 42916, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 494 | [Child 42916, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 495 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 496 | JavaScript error: resource:///modules/WindowsJumpLists.jsm, line 244: TypeError: this._builder is undefined 497 | [Parent 30860, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 498 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 499 | [Child 42200, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 500 | [Child 42200, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 501 | 502 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 503 | 504 | hrome/common/ipc_channel_win.cc, line 346 505 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 506 | [Child 40728, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 507 | [Child 40728, Chrome_Chil 508 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 509 | 510 | n/ipc_channel_win.cc, line 346 511 | JavaScript error: resource:///modules/WindowsJumpLists.jsm, line 244: TypeError: this._builder is undefined 512 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 513 | [Child 35960, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 514 | [Child 35960, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 515 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 516 | [GPU 33204, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 517 | 518 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 519 | 520 | rc/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 521 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 522 | [GPU 35072, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 523 | 524 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 525 | 526 | el_win.cc, line 346 527 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 528 | [Child 31548, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 529 | [Child 31548, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 530 | [Child 35228, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 531 | [Child 35228, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 532 | Unable to read VR Path Registry from C:\Users\Administrator\AUnable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 533 | [Child 33936, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 534 | [Child 40792, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 535 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 536 | [GPU 31804, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 537 | 538 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 539 | 540 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 541 | Thread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 542 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 543 | [GPU 31500, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 544 | 545 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 546 | 547 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 548 | istry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 549 | [Child 41356, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 550 | [Child 41356, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 551 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 552 | [Child 38744, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 553 | [Child 38744, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 554 | *** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping 555 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 556 | [GPU 26928, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 557 | 558 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 559 | 560 | n for id: telemetry_modules_ping 561 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 562 | [GPU 43052, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 563 | 564 | ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 565 | 566 | or: cannot send/recv 567 | 568 | Unable to read VR Path Registry from C:\Users\Administrator\AppData\Local\openvr\openvrpaths.vrpath 569 | -------------------------------------------------------------------------------- /logco/2018032418.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwanlei/python-selenium/b141331777dcfc33021dbb2565f9649d83bf78c0/logco/2018032418.log -------------------------------------------------------------------------------- /report/2018-03-24_18_43.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 自动化测试报告 9 | 10 | 11 | 12 | 45 | 46 | 47 | 48 | 49 | 53 | 54 | 55 | 149 | 150 |
151 |
152 |

自动化测试报告

153 |

Start Time: 2018-03-24 18:43:52

154 |

Duration: 0:02:23.875229

155 |

Status: Error 13

156 | 157 |

测试结果

158 |
159 | 160 | 161 | 162 |

163 | Summary 164 | Failed 165 | All 166 |

167 | 168 | 169 | 170 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 224 | 225 | 226 | 227 | 228 | 261 | 262 | 263 | 264 | 265 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 335 | 336 | 337 | 338 | 339 | 363 | 364 | 365 | 366 | 367 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 437 | 438 | 439 | 440 | 441 | 474 | 475 | 476 | 477 | 478 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 557 | 558 | 559 | 560 | 561 | 594 | 595 | 596 | 597 | 598 | 631 | 632 | 633 | 634 | 635 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 |
Test Group/Test case 171 | Count 172 | Pass 173 | Fail 174 | Error 175 | View 176 |
login_test.Testlogin3003Detail
test_login1_1
192 | 193 | 194 | 195 | error 196 | 197 | 221 | 222 | 223 |
test_login1_2
229 | 230 | 231 | 232 | error 233 | 234 | 258 | 259 | 260 |
test_login1_3
266 | 267 | 268 | 269 | error 270 | 271 | 295 | 296 | 297 |
xiugai_test.Test_xiugai3003Detail
test_xiugai_1_1
312 | 313 | 314 | 315 | error 316 | 317 | 332 | 333 | 334 |
test_xiugai_1_2
340 | 341 | 342 | 343 | error 344 | 345 | 360 | 361 | 362 |
test_xiugai_1_3
368 | 369 | 370 | 371 | error 372 | 373 | 388 | 389 | 390 |
zhaohui_test.Testzhaohui3003Detail
test_zhaohui_1_1
405 | 406 | 407 | 408 | error 409 | 410 | 434 | 435 | 436 |
test_zhaohui_1_2
442 | 443 | 444 | 445 | error 446 | 447 | 471 | 472 | 473 |
test_zhaohui_1_3
479 | 480 | 481 | 482 | error 483 | 484 | 508 | 509 | 510 |
zhuce_test.Testzhuce4004Detail
test_zhuce_1_1
525 | 526 | 527 | 528 | error 529 | 530 | 554 | 555 | 556 |
test_zhuce_1_2
562 | 563 | 564 | 565 | error 566 | 567 | 591 | 592 | 593 |
test_zhuce_1_3
599 | 600 | 601 | 602 | error 603 | 604 | 628 | 629 | 630 |
test_zhuce_1_4
636 | 637 | 638 | 639 | error 640 | 641 | 665 | 666 | 667 |
Total130013 
682 | 683 |
 
684 |
685 | 686 | 687 | 688 | -------------------------------------------------------------------------------- /resultpang/login1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/liwanlei/python-selenium/b141331777dcfc33021dbb2565f9649d83bf78c0/resultpang/login1.png -------------------------------------------------------------------------------- /run.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Date : 2017-08-11 15:34:37 3 | # @Author : lileilei 4 | from suite.testsuite import create_report 5 | if __name__ == '__main__': 6 | create_report() -------------------------------------------------------------------------------- /suite/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | """ 3 | @author: lileilei 4 | @file: __init__.py.py 5 | @time: 2018/1/21 11:49 6 | """ -------------------------------------------------------------------------------- /suite/testsuite.py: -------------------------------------------------------------------------------- 1 | import unittest,time,os 2 | from util import BSTestRunner 3 | from config import description,reporttitle 4 | path=os.getcwd() 5 | case_path=path+'\\case' 6 | def create_report(): 7 | test_suit = unittest.TestSuite() 8 | discover = unittest.defaultTestLoader.discover(case_path, pattern='*test.py', top_level_dir=None) 9 | for test in discover: 10 | for test_case in test: 11 | test_suit.addTest(test_case) 12 | now=time.strftime('%Y-%m-%d_%H_%M',time.localtime(time.time())) 13 | report_dir=path+'\\report\\%s.html'%now 14 | re_open= open(report_dir,'wb') 15 | runner=BSTestRunner.BSTestRunner(stream=re_open,title=reporttitle,description=description) 16 | runner.run(test_suit) 17 | -------------------------------------------------------------------------------- /util/BSTestRunner.py: -------------------------------------------------------------------------------- 1 | """ 2 | A TestRunner for use with the Python unit testing framework. It generates a HTML report to show the result at a glance. 3 | The simplest way to use this is to invoke its main method. E.g. 4 | 5 | import unittest 6 | import BSTestRunner 7 | 8 | ... define your tests ... 9 | 10 | if __name__ == '__main__': 11 | BSTestRunner.main() 12 | 13 | 14 | For more customization options, instantiates a BSTestRunner object. 15 | BSTestRunner is a counterpart to unittest's TextTestRunner. E.g. 16 | 17 | # output to a file 18 | fp = file('my_report.html', 'wb') 19 | runner = BSTestRunner.BSTestRunner( 20 | stream=fp, 21 | title='My unit test', 22 | description='This demonstrates the report output by BSTestRunner.' 23 | ) 24 | 25 | # Use an external stylesheet. 26 | # See the Template_mixin class for more customizable options 27 | runner.STYLESHEET_TMPL = '' 28 | 29 | # run the test 30 | runner.run(my_test_suite) 31 | 32 | 33 | ------------------------------------------------------------------------ 34 | Copyright (c) 2004-2007, Wai Yip Tung 35 | Copyright (c) 2016, Eason Han 36 | All rights reserved. 37 | 38 | Redistribution and use in source and binary forms, with or without 39 | modification, are permitted provided that the following conditions are 40 | met: 41 | 42 | * Redistributions of source code must retain the above copyright notice, 43 | this list of conditions and the following disclaimer. 44 | * Redistributions in binary form must reproduce the above copyright 45 | notice, this list of conditions and the following disclaimer in the 46 | documentation and/or other materials provided with the distribution. 47 | * Neither the name Wai Yip Tung nor the names of its contributors may be 48 | used to endorse or promote products derived from this software without 49 | specific prior written permission. 50 | 51 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 52 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 53 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 54 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 55 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 56 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 57 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 58 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 59 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 60 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 61 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 62 | """ 63 | 64 | 65 | __author__ = "Wai Yip Tung && Eason Han" 66 | __version__ = "0.8.4" 67 | 68 | 69 | """ 70 | Change History 71 | 72 | Version 0.8.3 73 | * Modify html style using bootstrap3. 74 | 75 | Version 0.8.3 76 | * Prevent crash on class or module-level exceptions (Darren Wurf). 77 | 78 | Version 0.8.2 79 | * Show output inline instead of popup window (Viorel Lupu). 80 | 81 | Version in 0.8.1 82 | * Validated XHTML (Wolfgang Borgert). 83 | * Added description of test classes and test cases. 84 | 85 | Version in 0.8.0 86 | * Define Template_mixin class for customization. 87 | * Workaround a IE 6 bug that it does not treat 313 | 314 |
315 | %(heading)s 316 | %(report)s 317 | %(ending)s 318 |
319 | 320 | 321 | 322 | """ 323 | # variables: (title, generator, stylesheet, heading, report, ending) 324 | 325 | 326 | # ------------------------------------------------------------------------ 327 | # Stylesheet 328 | # 329 | # alternatively use a for external style sheet, e.g. 330 | # 331 | 332 | STYLESHEET_TMPL = """ 333 | 366 | """ 367 | 368 | 369 | 370 | # ------------------------------------------------------------------------ 371 | # Heading 372 | # 373 | 374 | HEADING_TMPL = """
375 |

%(title)s

376 | %(parameters)s 377 |

%(description)s

378 |
379 | 380 | """ # variables: (title, parameters, description) 381 | 382 | HEADING_ATTRIBUTE_TMPL = """

%(name)s: %(value)s

383 | """ # variables: (name, value) 384 | 385 | 386 | 387 | # ------------------------------------------------------------------------ 388 | # Report 389 | # 390 | 391 | REPORT_TMPL = """ 392 |

393 | Summary 394 | Failed 395 | All 396 |

397 | 398 | 399 | 400 | 407 | 408 | 409 | %(test_list)s 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 |
Test Group/Test case 401 | Count 402 | Pass 403 | Fail 404 | Error 405 | View 406 |
Total%(count)s%(Pass)s%(fail)s%(error)s 
422 | """ # variables: (test_list, count, Pass, fail, error) 423 | 424 | REPORT_CLASS_TMPL = r""" 425 | 426 | %(desc)s 427 | %(count)s 428 | %(Pass)s 429 | %(fail)s 430 | %(error)s 431 | Detail 432 | 433 | """ # variables: (style, desc, count, Pass, fail, error, cid) 434 | 435 | 436 | REPORT_TEST_WITH_OUTPUT_TMPL = r""" 437 | 438 |
%(desc)s
439 | 440 | 441 | 442 | 443 | %(status)s 444 | 445 | 454 | 455 | 456 | 457 | 458 | """ # variables: (tid, Class, style, desc, status) 459 | 460 | 461 | REPORT_TEST_NO_OUTPUT_TMPL = r""" 462 | 463 |
%(desc)s
464 | %(status)s 465 | 466 | """ # variables: (tid, Class, style, desc, status) 467 | 468 | 469 | REPORT_TEST_OUTPUT_TMPL = r""" 470 | %(id)s: %(output)s 471 | """ # variables: (id, output) 472 | 473 | 474 | 475 | # ------------------------------------------------------------------------ 476 | # ENDING 477 | # 478 | 479 | ENDING_TMPL = """
 
""" 480 | 481 | # -------------------- The end of the Template class ------------------- 482 | 483 | 484 | TestResult = unittest.TestResult 485 | 486 | class _TestResult(TestResult): 487 | # note: _TestResult is a pure representation of results. 488 | # It lacks the output and reporting ability compares to unittest._TextTestResult. 489 | 490 | def __init__(self, verbosity=1): 491 | TestResult.__init__(self) 492 | self.outputBuffer = StringIO() 493 | self.stdout0 = None 494 | self.stderr0 = None 495 | self.success_count = 0 496 | self.failure_count = 0 497 | self.error_count = 0 498 | self.verbosity = verbosity 499 | 500 | # result is a list of result in 4 tuple 501 | # ( 502 | # result code (0: success; 1: fail; 2: error), 503 | # TestCase object, 504 | # Test output (byte string), 505 | # stack trace, 506 | # ) 507 | self.result = [] 508 | 509 | 510 | def startTest(self, test): 511 | TestResult.startTest(self, test) 512 | # just one buffer for both stdout and stderr 更改 513 | self.outputBuffer = StringIO() 514 | stdout_redirector.fp = self.outputBuffer 515 | stderr_redirector.fp = self.outputBuffer 516 | self.stdout0 = sys.stdout 517 | self.stderr0 = sys.stderr 518 | sys.stdout = stdout_redirector 519 | sys.stderr = stderr_redirector 520 | 521 | 522 | def complete_output(self): 523 | """ 524 | Disconnect output redirection and return buffer. 525 | Safe to call multiple times. 526 | """ 527 | if self.stdout0: 528 | sys.stdout = self.stdout0 529 | sys.stderr = self.stderr0 530 | self.stdout0 = None 531 | self.stderr0 = None 532 | return self.outputBuffer.getvalue() 533 | 534 | 535 | def stopTest(self, test): 536 | # Usually one of addSuccess, addError or addFailure would have been called. 537 | # But there are some path in unittest that would bypass this. 538 | # We must disconnect stdout in stopTest(), which is guaranteed to be called. 539 | self.complete_output() 540 | 541 | 542 | def addSuccess(self, test): 543 | self.success_count += 1 544 | TestResult.addSuccess(self, test) 545 | output = self.complete_output() 546 | self.result.append((0, test, output, '')) 547 | if self.verbosity > 1: 548 | sys.stderr.write('ok ') 549 | sys.stderr.write(str(test)) 550 | sys.stderr.write('\n') 551 | else: 552 | sys.stderr.write('.') 553 | 554 | def addError(self, test, err): 555 | self.error_count += 1 556 | TestResult.addError(self, test, err) 557 | _, _exc_str = self.errors[-1] 558 | output = self.complete_output() 559 | self.result.append((2, test, output, _exc_str)) 560 | if self.verbosity > 1: 561 | sys.stderr.write('E ') 562 | sys.stderr.write(str(test)) 563 | sys.stderr.write('\n') 564 | else: 565 | sys.stderr.write('E') 566 | 567 | def addFailure(self, test, err): 568 | self.failure_count += 1 569 | TestResult.addFailure(self, test, err) 570 | _, _exc_str = self.failures[-1] 571 | output = self.complete_output() 572 | self.result.append((1, test, output, _exc_str)) 573 | if self.verbosity > 1: 574 | sys.stderr.write('F ') 575 | sys.stderr.write(str(test)) 576 | sys.stderr.write('\n') 577 | else: 578 | sys.stderr.write('F') 579 | 580 | 581 | class BSTestRunner(Template_mixin): 582 | """ 583 | """ 584 | def __init__(self, stream=sys.stdout, verbosity=1, title=None, description=None): 585 | self.stream = stream 586 | self.verbosity = verbosity 587 | if title is None: 588 | self.title = self.DEFAULT_TITLE 589 | else: 590 | self.title = title 591 | if description is None: 592 | self.description = self.DEFAULT_DESCRIPTION 593 | else: 594 | self.description = description 595 | 596 | self.startTime = datetime.datetime.now() 597 | 598 | 599 | def run(self, test): 600 | "Run the given test case or test suite." 601 | result = _TestResult(self.verbosity) 602 | try: 603 | test(result) 604 | except TypeError: 605 | pass 606 | self.stopTime = datetime.datetime.now() 607 | self.generateReport(test, result) 608 | print('\n测试耗时: %s' % (self.stopTime-self.startTime)) 609 | return result 610 | 611 | 612 | def sortResult(self, result_list): 613 | # unittest does not seems to run in any particular order. 614 | # Here at least we want to group them together by class. 615 | rmap = {} 616 | classes = [] 617 | for n,t,o,e in result_list: 618 | cls = t.__class__ 619 | if not cls in rmap: 620 | rmap[cls] = [] 621 | classes.append(cls) 622 | rmap[cls].append((n,t,o,e)) 623 | r = [(cls, rmap[cls]) for cls in classes] 624 | return r 625 | 626 | 627 | def getReportAttributes(self, result): 628 | """ 629 | Return report attributes as a list of (name, value). 630 | Override this to add custom attributes. 631 | """ 632 | startTime = str(self.startTime)[:19] 633 | duration = str(self.stopTime - self.startTime) 634 | status = [] 635 | if result.success_count: status.append('Pass %s' % result.success_count) 636 | if result.failure_count: status.append('Failure %s' % result.failure_count) 637 | if result.error_count: status.append('Error %s' % result.error_count ) 638 | if status: 639 | status = ' '.join(status) 640 | else: 641 | status = 'none' 642 | return [ 643 | ('Start Time', startTime), 644 | ('Duration', duration), 645 | ('Status', status), 646 | ] 647 | 648 | 649 | def generateReport(self, test, result): 650 | report_attrs = self.getReportAttributes(result) 651 | generator = 'BSTestRunner %s' % __version__ 652 | stylesheet = self._generate_stylesheet() 653 | heading = self._generate_heading(report_attrs) 654 | report = self._generate_report(result) 655 | ending = self._generate_ending() 656 | output = self.HTML_TMPL % dict( 657 | title = saxutils.escape(self.title), 658 | generator = generator, 659 | stylesheet = stylesheet, 660 | heading = heading, 661 | report = report, 662 | ending = ending, 663 | ) 664 | self.stream.write(output.encode('utf-8')) 665 | 666 | 667 | def _generate_stylesheet(self): 668 | return self.STYLESHEET_TMPL 669 | 670 | 671 | def _generate_heading(self, report_attrs): 672 | a_lines = [] 673 | for name, value in report_attrs: 674 | line = self.HEADING_ATTRIBUTE_TMPL % dict( 675 | name = saxutils.escape(name),####更改 676 | # value = saxutils.escape(value), 677 | 678 | value = value, 679 | ) 680 | a_lines.append(line) 681 | heading = self.HEADING_TMPL % dict( 682 | title = saxutils.escape(self.title), 683 | parameters = ''.join(a_lines), 684 | description = saxutils.escape(self.description), 685 | ) 686 | return heading 687 | 688 | 689 | def _generate_report(self, result): 690 | rows = [] 691 | sortedResult = self.sortResult(result.result) 692 | for cid, (cls, cls_results) in enumerate(sortedResult): 693 | # subtotal for a class 694 | np = nf = ne = 0 695 | for n,t,o,e in cls_results: 696 | if n == 0: np += 1 697 | elif n == 1: nf += 1 698 | else: ne += 1 699 | 700 | # format class description 701 | if cls.__module__ == "__main__": 702 | name = cls.__name__ 703 | else: 704 | name = "%s.%s" % (cls.__module__, cls.__name__) 705 | doc = cls.__doc__ and cls.__doc__.split("\n")[0] or "" 706 | desc = doc and '%s: %s' % (name, doc) or name 707 | 708 | row = self.REPORT_CLASS_TMPL % dict( 709 | style = ne > 0 and 'text text-warning' or nf > 0 and 'text text-danger' or 'text text-success', 710 | desc = desc, 711 | count = np+nf+ne, 712 | Pass = np, 713 | fail = nf, 714 | error = ne, 715 | cid = 'c%s' % (cid+1), 716 | ) 717 | rows.append(row) 718 | 719 | for tid, (n,t,o,e) in enumerate(cls_results): 720 | self._generate_report_test(rows, cid, tid, n, t, o, e) 721 | 722 | report = self.REPORT_TMPL % dict( 723 | test_list = ''.join(rows), 724 | count = str(result.success_count+result.failure_count+result.error_count), 725 | Pass = str(result.success_count), 726 | fail = str(result.failure_count), 727 | error = str(result.error_count), 728 | ) 729 | return report 730 | 731 | 732 | def _generate_report_test(self, rows, cid, tid, n, t, o, e): 733 | # e.g. 'pt1.1', 'ft1.1', etc 734 | has_output = bool(o or e) 735 | tid = (n == 0 and 'p' or 'f') + 't%s.%s' % (cid+1,tid+1) 736 | name = t.id().split('.')[-1] 737 | doc = t.shortDescription() or "" 738 | desc = doc and ('%s: %s' % (name, doc)) or name 739 | tmpl = has_output and self.REPORT_TEST_WITH_OUTPUT_TMPL or self.REPORT_TEST_NO_OUTPUT_TMPL 740 | 741 | # o and e should be byte string because they are collected from stdout and stderr? 742 | if isinstance(o,str): 743 | # TODO: some problem with 'string_escape': it escape \n and mess up formating 744 | # uo = unicode(o.encode('string_escape')) 745 | uo = o 746 | else: 747 | uo = o 748 | if isinstance(e,str): 749 | # TODO: some problem with 'string_escape': it escape \n and mess up formating 750 | # ue = unicode(e.encode('string_escape')) 751 | ue = e 752 | else: 753 | ue = e 754 | 755 | script = self.REPORT_TEST_OUTPUT_TMPL % dict( 756 | id = tid, 757 | output = saxutils.escape(uo+ue), 758 | ) 759 | 760 | row = tmpl % dict( 761 | tid = tid, 762 | Class = (n == 0 and 'hiddenRow' or 'none'), 763 | # Class = (n == 0 and 'hiddenRow' or 'text text-success'), 764 | # style = n == 2 and 'errorCase' or (n == 1 and 'failCase' or 'none'), 765 | style = n == 2 and 'text text-warning' or (n == 1 and 'text text-danger' or 'text text-success'), 766 | desc = desc, 767 | script = script, 768 | status = self.STATUS[n], 769 | ) 770 | rows.append(row) 771 | if not has_output: 772 | return 773 | 774 | def _generate_ending(self): 775 | return self.ENDING_TMPL 776 | 777 | 778 | ############################################################################## 779 | # Facilities for running tests from the command line 780 | ############################################################################## 781 | 782 | # Note: Reuse unittest.TestProgram to launch test. In the future we may 783 | # build our own launcher to support more specific command line 784 | # parameters like test title, CSS, etc. 785 | class TestProgram(unittest.TestProgram): 786 | """ 787 | A variation of the unittest.TestProgram. Please refer to the base 788 | class for command line parameters. 789 | """ 790 | def runTests(self): 791 | # Pick BSTestRunner as the default test runner. 792 | # base class's testRunner parameter is not useful because it means 793 | # we have to instantiate BSTestRunner before we know self.verbosity. 794 | if self.testRunner is None: 795 | self.testRunner = BSTestRunner(verbosity=self.verbosity) 796 | unittest.TestProgram.runTests(self) 797 | 798 | main = TestProgram 799 | 800 | ############################################################################## 801 | # Executing this module from the command line 802 | ############################################################################## 803 | 804 | if __name__ == "__main__": 805 | main(module=None) 806 | -------------------------------------------------------------------------------- /util/HTMLTestRunner.py: -------------------------------------------------------------------------------- 1 | """ 2 | A TestRunner for use with the Python unit testing framework. It 3 | generates a HTML report to show the result at a glance. 4 | 5 | The simplest way to use this is to invoke its main method. E.g. 6 | 7 | import unittest 8 | import HTMLTestRunner 9 | 10 | ... define your tests ... 11 | 12 | if __name__ == '__main__': 13 | HTMLTestRunner.main() 14 | 15 | 16 | For more customization options, instantiates a HTMLTestRunner object. 17 | HTMLTestRunner is a counterpart to unittest's TextTestRunner. E.g. 18 | 19 | # output to a file 20 | fp = file('my_report.html', 'wb') 21 | runner = HTMLTestRunner.HTMLTestRunner( 22 | stream=fp, 23 | title='My unit test', 24 | description='This demonstrates the report output by HTMLTestRunner.' 25 | ) 26 | 27 | # Use an external stylesheet. 28 | # See the Template_mixin class for more customizable options 29 | runner.STYLESHEET_TMPL = '' 30 | 31 | # run the test 32 | runner.run(my_test_suite) 33 | 34 | 35 | ------------------------------------------------------------------------ 36 | Copyright (c) 2004-2007, Wai Yip Tung 37 | All rights reserved. 38 | 39 | Redistribution and use in source and binary forms, with or without 40 | modification, are permitted provided that the following conditions are 41 | met: 42 | 43 | * Redistributions of source code must retain the above copyright notice, 44 | this list of conditions and the following disclaimer. 45 | * Redistributions in binary form must reproduce the above copyright 46 | notice, this list of conditions and the following disclaimer in the 47 | documentation and/or other materials provided with the distribution. 48 | * Neither the name Wai Yip Tung nor the names of its contributors may be 49 | used to endorse or promote products derived from this software without 50 | specific prior written permission. 51 | 52 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 53 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 54 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 55 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 56 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 57 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 58 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 59 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 60 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 61 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 62 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 63 | """ 64 | 65 | # URL: http://tungwaiyip.info/software/HTMLTestRunner.html 66 | 67 | __author__ = "Wai Yip Tung" 68 | __version__ = "0.8.2" 69 | 70 | 71 | """ 72 | Change History 73 | 74 | Version 0.8.2 75 | * Show output inline instead of popup window (Viorel Lupu). 76 | 77 | Version in 0.8.1 78 | * Validated XHTML (Wolfgang Borgert). 79 | * Added description of test classes and test cases. 80 | 81 | Version in 0.8.0 82 | * Define Template_mixin class for customization. 83 | * Workaround a IE 6 bug that it does not treat 290 | 291 | %(heading)s 292 | %(report)s 293 | %(ending)s 294 | 295 | 296 | 297 | """ 298 | # variables: (title, generator, stylesheet, heading, report, ending) 299 | 300 | 301 | # ------------------------------------------------------------------------ 302 | # Stylesheet 303 | # 304 | # alternatively use a for external style sheet, e.g. 305 | # 306 | 307 | STYLESHEET_TMPL = """ 308 | 391 | """ 392 | 393 | 394 | 395 | # ------------------------------------------------------------------------ 396 | # Heading 397 | # 398 | 399 | HEADING_TMPL = """
400 |

%(title)s

401 | %(parameters)s 402 |

%(description)s

403 |
404 | 405 | """ # variables: (title, parameters, description) 406 | 407 | HEADING_ATTRIBUTE_TMPL = """

%(name)s: %(value)s

408 | """ # variables: (name, value) 409 | 410 | 411 | 412 | # ------------------------------------------------------------------------ 413 | # Report 414 | # 415 | 416 | REPORT_TMPL = """ 417 |

Show 418 | Summary 419 | Failed 420 | All 421 |

422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | %(test_list)s 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 |
Test Group/Test caseCountPassFailErrorView
Total%(count)s%(Pass)s%(fail)s%(error)s 
449 | """ # variables: (test_list, count, Pass, fail, error) 450 | 451 | REPORT_CLASS_TMPL = r""" 452 | 453 | %(desc)s 454 | %(count)s 455 | %(Pass)s 456 | %(fail)s 457 | %(error)s 458 | Detail 459 | 460 | """ # variables: (style, desc, count, Pass, fail, error, cid) 461 | 462 | 463 | REPORT_TEST_WITH_OUTPUT_TMPL = r""" 464 | 465 |
%(desc)s
466 | 467 | 468 | 469 | 470 | %(status)s 471 | 472 | 481 | 482 | 483 | 484 | 485 | """ # variables: (tid, Class, style, desc, status) 486 | 487 | 488 | REPORT_TEST_NO_OUTPUT_TMPL = r""" 489 | 490 |
%(desc)s
491 | %(status)s 492 | 493 | """ # variables: (tid, Class, style, desc, status) 494 | 495 | 496 | REPORT_TEST_OUTPUT_TMPL = r""" 497 | %(id)s: %(output)s 498 | """ # variables: (id, output) 499 | 500 | 501 | 502 | # ------------------------------------------------------------------------ 503 | # ENDING 504 | # 505 | 506 | ENDING_TMPL = """
 
""" 507 | 508 | # -------------------- The end of the Template class ------------------- 509 | 510 | 511 | TestResult = unittest.TestResult 512 | 513 | class _TestResult(TestResult): 514 | # note: _TestResult is a pure representation of results. 515 | # It lacks the output and reporting ability compares to unittest._TextTestResult. 516 | 517 | def __init__(self, verbosity=1): 518 | TestResult.__init__(self) 519 | self.stdout0 = None 520 | self.stderr0 = None 521 | self.success_count = 0 522 | self.failure_count = 0 523 | self.error_count = 0 524 | self.verbosity = verbosity 525 | 526 | # result is a list of result in 4 tuple 527 | # ( 528 | # result code (0: success; 1: fail; 2: error), 529 | # TestCase object, 530 | # Test output (byte string), 531 | # stack trace, 532 | # ) 533 | self.result = [] 534 | 535 | 536 | def startTest(self, test): 537 | TestResult.startTest(self, test) 538 | # just one buffer for both stdout and stderr 539 | self.outputBuffer = io.StringIO() 540 | stdout_redirector.fp = self.outputBuffer 541 | stderr_redirector.fp = self.outputBuffer 542 | self.stdout0 = sys.stdout 543 | self.stderr0 = sys.stderr 544 | sys.stdout = stdout_redirector 545 | sys.stderr = stderr_redirector 546 | 547 | 548 | def complete_output(self): 549 | """ 550 | Disconnect output redirection and return buffer. 551 | Safe to call multiple times. 552 | """ 553 | if self.stdout0: 554 | sys.stdout = self.stdout0 555 | sys.stderr = self.stderr0 556 | self.stdout0 = None 557 | self.stderr0 = None 558 | return self.outputBuffer.getvalue() 559 | 560 | 561 | def stopTest(self, test): 562 | # Usually one of addSuccess, addError or addFailure would have been called. 563 | # But there are some path in unittest that would bypass this. 564 | # We must disconnect stdout in stopTest(), which is guaranteed to be called. 565 | self.complete_output() 566 | 567 | 568 | def addSuccess(self, test): 569 | self.success_count += 1 570 | TestResult.addSuccess(self, test) 571 | output = self.complete_output() 572 | self.result.append((0, test, output, '')) 573 | if self.verbosity > 1: 574 | sys.stderr.write('ok ') 575 | sys.stderr.write(str(test)) 576 | sys.stderr.write('\n') 577 | else: 578 | sys.stderr.write('.') 579 | 580 | def addError(self, test, err): 581 | self.error_count += 1 582 | TestResult.addError(self, test, err) 583 | _, _exc_str = self.errors[-1] 584 | output = self.complete_output() 585 | self.result.append((2, test, output, _exc_str)) 586 | if self.verbosity > 1: 587 | sys.stderr.write('E ') 588 | sys.stderr.write(str(test)) 589 | sys.stderr.write('\n') 590 | else: 591 | sys.stderr.write('E') 592 | 593 | def addFailure(self, test, err): 594 | self.failure_count += 1 595 | TestResult.addFailure(self, test, err) 596 | _, _exc_str = self.failures[-1] 597 | output = self.complete_output() 598 | self.result.append((1, test, output, _exc_str)) 599 | if self.verbosity > 1: 600 | sys.stderr.write('F ') 601 | sys.stderr.write(str(test)) 602 | sys.stderr.write('\n') 603 | else: 604 | sys.stderr.write('F') 605 | 606 | 607 | class HTMLTestRunner(Template_mixin): 608 | """ 609 | """ 610 | def __init__(self, stream=sys.stdout, verbosity=1, title=None, description=None): 611 | self.stream = stream 612 | self.verbosity = verbosity 613 | if title is None: 614 | self.title = self.DEFAULT_TITLE 615 | else: 616 | self.title = title 617 | if description is None: 618 | self.description = self.DEFAULT_DESCRIPTION 619 | else: 620 | self.description = description 621 | 622 | self.startTime = datetime.datetime.now() 623 | 624 | 625 | def run(self, test): 626 | "Run the given test case or test suite." 627 | result = _TestResult(self.verbosity) 628 | test(result) 629 | self.stopTime = datetime.datetime.now() 630 | self.generateReport(test, result) 631 | # print >> sys.stderr, '\nTime Elapsed: %s' % (self.stopTime-self.startTime) 632 | print(sys.stderr, '\nTime Elapsed: %s' % (self.stopTime-self.startTime)) 633 | return result 634 | 635 | 636 | def sortResult(self, result_list): 637 | # unittest does not seems to run in any particular order. 638 | # Here at least we want to group them together by class. 639 | rmap = {} 640 | classes = [] 641 | for n,t,o,e in result_list: 642 | cls = t.__class__ 643 | if not cls in rmap: 644 | rmap[cls] = [] 645 | classes.append(cls) 646 | rmap[cls].append((n,t,o,e)) 647 | r = [(cls, rmap[cls]) for cls in classes] 648 | return r 649 | 650 | 651 | def getReportAttributes(self, result): 652 | """ 653 | Return report attributes as a list of (name, value). 654 | Override this to add custom attributes. 655 | """ 656 | startTime = str(self.startTime)[:19] 657 | duration = str(self.stopTime - self.startTime) 658 | status = [] 659 | if result.success_count: status.append('Pass %s' % result.success_count) 660 | if result.failure_count: status.append('Failure %s' % result.failure_count) 661 | if result.error_count: status.append('Error %s' % result.error_count ) 662 | if status: 663 | status = ' '.join(status) 664 | else: 665 | status = 'none' 666 | return [ 667 | ('Start Time', startTime), 668 | ('Duration', duration), 669 | ('Status', status), 670 | ] 671 | 672 | 673 | def generateReport(self, test, result): 674 | report_attrs = self.getReportAttributes(result) 675 | generator = 'HTMLTestRunner %s' % __version__ 676 | stylesheet = self._generate_stylesheet() 677 | heading = self._generate_heading(report_attrs) 678 | report = self._generate_report(result) 679 | ending = self._generate_ending() 680 | output = self.HTML_TMPL % dict( 681 | title = saxutils.escape(self.title), 682 | generator = generator, 683 | stylesheet = stylesheet, 684 | heading = heading, 685 | report = report, 686 | ending = ending, 687 | ) 688 | self.stream.write(output.encode('utf8')) 689 | 690 | 691 | def _generate_stylesheet(self): 692 | return self.STYLESHEET_TMPL 693 | 694 | 695 | def _generate_heading(self, report_attrs): 696 | a_lines = [] 697 | for name, value in report_attrs: 698 | line = self.HEADING_ATTRIBUTE_TMPL % dict( 699 | name = saxutils.escape(name), 700 | value = saxutils.escape(value), 701 | ) 702 | a_lines.append(line) 703 | heading = self.HEADING_TMPL % dict( 704 | title = saxutils.escape(self.title), 705 | parameters = ''.join(a_lines), 706 | description = saxutils.escape(self.description), 707 | ) 708 | return heading 709 | 710 | 711 | def _generate_report(self, result): 712 | rows = [] 713 | sortedResult = self.sortResult(result.result) 714 | for cid, (cls, cls_results) in enumerate(sortedResult): 715 | # subtotal for a class 716 | np = nf = ne = 0 717 | for n,t,o,e in cls_results: 718 | if n == 0: np += 1 719 | elif n == 1: nf += 1 720 | else: ne += 1 721 | 722 | # format class description 723 | if cls.__module__ == "__main__": 724 | name = cls.__name__ 725 | else: 726 | name = "%s.%s" % (cls.__module__, cls.__name__) 727 | doc = cls.__doc__ and cls.__doc__.split("\n")[0] or "" 728 | desc = doc and '%s: %s' % (name, doc) or name 729 | 730 | row = self.REPORT_CLASS_TMPL % dict( 731 | style = ne > 0 and 'errorClass' or nf > 0 and 'failClass' or 'passClass', 732 | desc = desc, 733 | count = np+nf+ne, 734 | Pass = np, 735 | fail = nf, 736 | error = ne, 737 | cid = 'c%s' % (cid+1), 738 | ) 739 | rows.append(row) 740 | 741 | for tid, (n,t,o,e) in enumerate(cls_results): 742 | self._generate_report_test(rows, cid, tid, n, t, o, e) 743 | 744 | report = self.REPORT_TMPL % dict( 745 | test_list = ''.join(rows), 746 | count = str(result.success_count+result.failure_count+result.error_count), 747 | Pass = str(result.success_count), 748 | fail = str(result.failure_count), 749 | error = str(result.error_count), 750 | ) 751 | return report 752 | 753 | 754 | def _generate_report_test(self, rows, cid, tid, n, t, o, e): 755 | # e.g. 'pt1.1', 'ft1.1', etc 756 | has_output = bool(o or e) 757 | tid = (n == 0 and 'p' or 'f') + 't%s.%s' % (cid+1,tid+1) 758 | name = t.id().split('.')[-1] 759 | doc = t.shortDescription() or "" 760 | desc = doc and ('%s: %s' % (name, doc)) or name 761 | tmpl = has_output and self.REPORT_TEST_WITH_OUTPUT_TMPL or self.REPORT_TEST_NO_OUTPUT_TMPL 762 | 763 | # o and e should be byte string because they are collected from stdout and stderr? 764 | if isinstance(o,str): 765 | # TODO: some problem with 'string_escape': it escape \n and mess up formating 766 | # uo = unicode(o.encode('string_escape')) 767 | # uo = o.decode('latin-1') 768 | uo = e 769 | else: 770 | uo = o 771 | if isinstance(e,str): 772 | # TODO: some problem with 'string_escape': it escape \n and mess up formating 773 | # ue = unicode(e.encode('string_escape')) 774 | # ue = e.decode('latin-1') 775 | ue = e 776 | else: 777 | ue = e 778 | 779 | script = self.REPORT_TEST_OUTPUT_TMPL % dict( 780 | id = tid, 781 | output = saxutils.escape(str(uo)+ue), 782 | ) 783 | 784 | row = tmpl % dict( 785 | tid = tid, 786 | Class = (n == 0 and 'hiddenRow' or 'none'), 787 | style = n == 2 and 'errorCase' or (n == 1 and 'failCase' or 'none'), 788 | desc = desc, 789 | script = script, 790 | status = self.STATUS[n], 791 | ) 792 | rows.append(row) 793 | if not has_output: 794 | return 795 | 796 | def _generate_ending(self): 797 | return self.ENDING_TMPL 798 | 799 | 800 | ############################################################################## 801 | # Facilities for running tests from the command line 802 | ############################################################################## 803 | 804 | # Note: Reuse unittest.TestProgram to launch test. In the future we may 805 | # build our own launcher to support more specific command line 806 | # parameters like test title, CSS, etc. 807 | class TestProgram(unittest.TestProgram): 808 | """ 809 | A variation of the unittest.TestProgram. Please refer to the bussinses 810 | class for command line parameters. 811 | """ 812 | def runTests(self): 813 | # Pick HTMLTestRunner as the default test runner. 814 | # bussinses class's testRunner parameter is not useful because it means 815 | # we have to instantiate HTMLTestRunner before we know self.verbosity. 816 | if self.testRunner is None: 817 | self.testRunner = HTMLTestRunner(verbosity=self.verbosity) 818 | unittest.TestProgram.runTests(self) 819 | 820 | main = TestProgram 821 | 822 | ############################################################################## 823 | # Executing this module from the command line 824 | ############################################################################## 825 | 826 | if __name__ == "__main__": 827 | main(module=None) 828 | -------------------------------------------------------------------------------- /util/gettestdata.py: -------------------------------------------------------------------------------- 1 | """ 2 | @author: lileilei 3 | @file: ddd.py 4 | @time: 2018/1/19 11:43 5 | """ 6 | import xlrd 7 | from util import log 8 | logs=log.log_message() 9 | def huoqu_test(filepath,index): 10 | try: 11 | file = xlrd.open_workbook(filepath) 12 | me = file.sheets()[index] 13 | nrows = me.nrows 14 | listdata = [] 15 | for i in range(1, nrows): 16 | dict_canshu = {} 17 | dict_canshu['id']=me.cell(i,0).value 18 | dict_canshu.update(eval(me.cell(i,2).value)) 19 | dict_canshu.update(eval(me.cell(i,3).value)) 20 | listdata.append(dict_canshu) 21 | return listdata 22 | except Exception as e: 23 | logs.error_log('获取测试用例数据失败,原因:%s'%e) -------------------------------------------------------------------------------- /util/log.py: -------------------------------------------------------------------------------- 1 | import os,time,logging 2 | path=os.getcwd() 3 | class log_message(): 4 | def __init__(self): 5 | title = u'注册测试' 6 | day = time.strftime("%Y%m%d%H", time.localtime(time.time())) 7 | pad = os.getcwd() 8 | file_dir = pad + '\\logco' 9 | file = os.path.join(file_dir, (day + '.log')) 10 | self.logger = logging.Logger(title) 11 | self.logger.setLevel(logging.INFO) 12 | self.logfile = logging.FileHandler(file) 13 | self.logfile.setLevel(logging.INFO) 14 | self.control = logging.StreamHandler() 15 | self.control.setLevel(logging.INFO) 16 | self.formater = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') 17 | self.logfile.setFormatter(self.formater) 18 | self.control.setFormatter(self.formater) 19 | self.logger.addHandler(self.logfile) 20 | self.logger.addHandler(self.control) 21 | def debugInfo(self, message): 22 | self.logger.debug(message) 23 | def info_log(self, message): 24 | self.logger.info(message) 25 | def ware_log(self, message): 26 | self.logger.warn(message) 27 | def error_log(self, message): 28 | self.logger.error(message) -------------------------------------------------------------------------------- /util/selse_feng.py: -------------------------------------------------------------------------------- 1 | from selenium import webdriver 2 | from selenium.webdriver.support.ui import WebDriverWait 3 | from selenium.webdriver.common.by import By 4 | from selenium.webdriver.support import expected_conditions as EC 5 | from selenium.webdriver.common.action_chains import ActionChains 6 | class PySele(): 7 | def __init__(self,brower):#初始化浏览器 8 | if brower =='firefox' or brower =='Firefox' or brower =='f' or brower =='F': 9 | deriver=webdriver.Firefox() 10 | elif brower =='Ie' or brower =='ie' or brower =='i' or brower=='I': 11 | deriver=webdriver.Ie() 12 | elif brower =='Chrome' or brower =='chrome' or brower =='Ch' or brower=='ch': 13 | deriver=webdriver.Chrome() 14 | elif brower =='PhantomJS' or brower =='phantomjs' or brower =='ph' or brower=='phjs': 15 | deriver=webdriver.PhantomJS() 16 | elif brower =='Edge' or brower =='edge' or brower =='Ed' or brower=='ed': 17 | deriver=webdriver.Edge() 18 | elif brower =='Opera' or brower =='opera' or brower =='op' or brower=='OP': 19 | deriver=webdriver.Opera() 20 | elif brower =='Safari' or brower =='safari' or brower =='sa' or brower=='saf': 21 | deriver=webdriver.Safari() 22 | else: 23 | raise NameError('只能输入firefox,Ie,Chrome,PhantomJS,Edge,Opera,Safari') 24 | self.driver=deriver 25 | def element(self,fangfa,dingwei):#定位 26 | if fangfa=='id': 27 | element=self.driver.find_element_by_id(dingwei) 28 | elif fangfa == "name": 29 | element = self.driver.find_element_by_name(dingwei) 30 | elif fangfa == "class": 31 | element = self.driver.find_element_by_class_name(dingwei) 32 | elif fangfa == "link_text": 33 | element = self.driver.find_element_by_link_text(dingwei) 34 | elif fangfa == "xpath": 35 | element = self.driver.find_element_by_xpath(dingwei) 36 | elif fangfa == "tag": 37 | element = self.driver.find_element_by_tag_name(dingwei) 38 | elif fangfa == "css": 39 | element = self.driver.find_element_by_css_selector(dingwei) 40 | else: 41 | raise NameError("Please enter the elements,'id','name','class','link_text','xpath','css','tag'.") 42 | return element 43 | def elements(self,fangfa,dingwei):#组定位 44 | if fangfa=='id': 45 | element=self.driver.find_elements_by_id(dingwei) 46 | elif fangfa == "name": 47 | element = self.driver.find_elements_by_name(dingwei) 48 | elif fangfa == "class": 49 | element = self.driver.find_elements_by_class_name(dingwei) 50 | elif fangfa == "link_text": 51 | element = self.driver.find_elements_by_link_text(dingwei) 52 | elif fangfa == "xpath": 53 | element = self.driver.find_elements_by_xpath(dingwei) 54 | elif fangfa == "tag": 55 | element = self.driver.find_elements_by_tag_name(dingwei) 56 | elif fangfa == "css": 57 | element = self.driver.find_elements_by_css_selector(dingwei) 58 | else: 59 | raise NameError("Please enter the elements,'id','name','class','link_text','xpath','css','tag'.") 60 | return element 61 | def element_wait(self,fangfa,dingwei,wati=6):#等待 62 | if fangfa == "id": 63 | WebDriverWait(self.driver,wati,1).until(EC.presence_of_element_located((By.ID, dingwei))) 64 | elif fangfa == "name": 65 | WebDriverWait(self.driver,wati,1).until(EC.presence_of_element_located((By.NAME, dingwei))) 66 | elif fangfa == "class": 67 | WebDriverWait(self.driver,wati,1).until(EC.presence_of_element_located((By.CLASS_NAME, dingwei))) 68 | elif fangfa == "link_text": 69 | WebDriverWait(self.driver,wati,1).until(EC.presence_of_element_located((By.LINK_TEXT, dingwei))) 70 | elif fangfa == "xpath": 71 | WebDriverWait(self.driver,wati,1).until(EC.presence_of_element_located((By.XPATH, dingwei))) 72 | elif fangfa == "css": 73 | WebDriverWait(self.driver,wati,1).until(EC.presence_of_element_located((By.CSS_SELECTOR, dingwei))) 74 | else: 75 | raise NameError("Please enter the elements,'id','name','class','link_text','xpath','css'.") 76 | def open(self,url):#打开网页 77 | self.driver.get(url) 78 | def make_maxwindow(self):#最大化浏览器 79 | self.driver.maximize_window() 80 | def set_winsize(self,wide,hight):#设置窗口 81 | self.driver.set_window_size(wide,hight) 82 | def send_key(self,fangfa,dingwei,text):#发送内容 83 | self.element(fangfa,dingwei) 84 | e1=self.element(fangfa,dingwei) 85 | e1.clear() 86 | e1.send_keys(text) 87 | def clear(self,fangfa,dingwei):#清空 88 | self.element_wait(fangfa,dingwei) 89 | e1=self.element(fangfa,dingwei) 90 | e1.clear() 91 | def clic(self,fangfa,dingwei):#单击 92 | self.element_wait(fangfa,dingwei) 93 | e1=self.element(fangfa,dingwei) 94 | e1.click() 95 | def right_click(self,fangfa,dingwei):#右击 96 | self.element_wait(fangfa,dingwei) 97 | e1=self.element(fangfa,dingwei) 98 | ActionChains(self.driver).context_click(e1).perform() 99 | def move_element(self,fangfa,dingwei):#移动到 100 | self.element_wait(fangfa,dingwei) 101 | e1=self.element(fangfa,dingwei) 102 | ActionChains(self.driver).move_to_element(e1).perform() 103 | def double_click(self,dingwei,fangfa):#双击 104 | self.element_wait(fangfa,dingwei) 105 | e1=self.element(fangfa,dingwei) 106 | ActionChains(self.driver).double_click(e1).perform() 107 | def drag_and_drop(self,fangfa1,e1,fangfa2,e2):#从e1到e2 108 | self.element_wait(fangfa1,e1) 109 | eme1=self.element(fangfa1,e1) 110 | self.element_wait(fangfa2,e2) 111 | eme2=self.element(fangfa2,e2) 112 | ActionChains(self.driver).drag_and_drop(eme1,eme2).perform() 113 | def click_text(self,text):#点击文字 114 | self.driver.find_element_by_link_text(text).click() 115 | def close(self):#关闭 116 | self.driver.close() 117 | def kill(self):#退出 118 | self.driver.quit() 119 | def sublimit(self,fangfa,dingwei):#提交 120 | self.element_wait(fangfa,dingwei) 121 | e1=self.element(fangfa,dingwei) 122 | e1.sublimit() 123 | def f5(self):#刷新 124 | self.driver.refresh() 125 | def js(self,sprit):#执行js 126 | self.driver.execute_script(sprit) 127 | def get_attribute(self, fangfa,dingwei, attribute): 128 | e1=self.element(fangfa,dingwei) 129 | return e1.get_attribute(attribute) 130 | def get_text(self,fangfa,dingwei): 131 | self.element_wait(fangfa,dingwei) 132 | e1=self.element(fangfa,dingwei) 133 | return e1.text 134 | def get_is_dis(self,fangfa,dingwei): 135 | self.element_wait(fangfa,dingwei) 136 | e1=self.element(fangfa,dingwei) 137 | return e1.is_displayed() 138 | def get_title(self,fangfa,dingwei):#获取title 139 | return self.driver.title 140 | def get_screen(self,file_path):#截屏 141 | self.driver.get_screenshot_as_file(file_path) 142 | def wait(self,fangfa,dingwei):#等待 143 | self.driver.implicitly_wait((fangfa,dingwei)) 144 | def accpet(self):#允许 145 | self.driver.switch_to.alert.accept() 146 | def dismiss_alert(self): 147 | self.driver.switch_to.alert.dismiss() 148 | def switch_to_frame(self, fangfa,dingwei):#切换 149 | self.element_wait(fangfa,dingwei) 150 | if1=self.element(fangfa,dingwei) 151 | self.driver.switch_to.frame(if1) --------------------------------------------------------------------------------