parent
73bf288a67
commit
097722162c
|
@ -0,0 +1,18 @@
|
||||||
|
[32m2020-08-26 16:56:08 [INFO] 当前操作系统:Mac OS[0m
|
||||||
|
[32m2020-08-26 16:56:10 [INFO]
|
||||||
|
_ _
|
||||||
|
| | | |
|
||||||
|
___ ___ | | __| | ___ _ __ ___
|
||||||
|
/ __| / _ \| | / _` | / _ \ | '_ ` _ \
|
||||||
|
\__ \| __/| || (_| || (_) || | | | | |
|
||||||
|
|___/ \___||_| \__,_| \___/ |_| |_| |_|
|
||||||
|
-----------------------------------------
|
||||||
|
@itest.info
|
||||||
|
[0m
|
||||||
|
[32m2020-08-26 16:56:16 [INFO] 👀 assertText: 百度一下.[0m
|
||||||
|
[32m2020-08-26 16:56:20 [INFO] 👀 assertText: 百度一下.[0m
|
||||||
|
[32m2020-08-26 16:56:25 [INFO] 👀 assertText: 百度一下.[0m
|
||||||
|
[32m2020-08-26 16:56:30 [INFO] 👀 assertText: 百度一下.[0m
|
||||||
|
[32m2020-08-26 16:56:34 [INFO] 👀 assertText: 百度一下.[0m
|
||||||
|
[32m2020-08-26 16:56:34 [INFO] generated html file: file:////Users/yuanbaolei/work/GitHub/UIautoDemo/reports/2020_08_26_16_56_10_result.html[0m
|
||||||
|
[31m2020-08-26 16:56:38 [ERROR] ❌ Email failed to send!!(535, b'Error: authentication failed')[0m
|
|
@ -10,11 +10,9 @@ import time
|
||||||
|
|
||||||
|
|
||||||
def sendMail(user, password, host, to, subject=None):
|
def sendMail(user, password, host, to, subject=None):
|
||||||
smtp = SMTP(user=user, password=password, host=host)
|
|
||||||
time.sleep(3)
|
|
||||||
try:
|
try:
|
||||||
|
smtp = SMTP(user=user, password=password, host=host)
|
||||||
|
time.sleep(3)
|
||||||
smtp.sender(to=to, subject=subject)
|
smtp.sender(to=to, subject=subject)
|
||||||
smtp.sender(to=to)
|
|
||||||
return print('📮 Email sent successfull!')
|
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
return error, print('❌ Email failed to send!\n', error)
|
return error
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import platform
|
import platform
|
||||||
|
from seldom.logging import log
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# 判断当前操作系统环境;以此来自动选择不同浏览器环境的驱动
|
# 判断当前操作系统环境;以此来自动选择不同浏览器环境的驱动
|
||||||
|
@ -8,13 +9,21 @@ import platform
|
||||||
def osSystem(path=''):
|
def osSystem(path=''):
|
||||||
os_system = platform.system()
|
os_system = platform.system()
|
||||||
if os_system == 'Windows':
|
if os_system == 'Windows':
|
||||||
print('当前操作系统:Windows')
|
log.info('当前操作系统:Windows')
|
||||||
pathWin = path + r'Browser_Driver/chromedriver84(win32).exe'
|
pathWin = path + r'Browser_Driver/chromedriver84(win32).exe'
|
||||||
return pathWin
|
return pathWin
|
||||||
if os_system == 'Darwin' or 'darwin' or 'Mac' or 'mac' or 'OS X':
|
elif os_system == 'Darwin' or \
|
||||||
print('当前操作系统:Mac OS')
|
os_system == 'darwin' or \
|
||||||
|
os_system == 'Mac' or \
|
||||||
|
os_system == 'mac' or \
|
||||||
|
os_system == 'OS X':
|
||||||
|
log.info('当前操作系统:Mac OS')
|
||||||
pathMac = path + r'Browser_Driver/chromedriver84(Mac64)'
|
pathMac = path + r'Browser_Driver/chromedriver84(Mac64)'
|
||||||
return pathMac
|
return pathMac
|
||||||
|
else:
|
||||||
|
log.error("当前操作系统 " + os_system)
|
||||||
|
raise SystemExit(log.error(' ❌ The current operating system environment is not Windows or Mac, '
|
||||||
|
'please confirm the current environment!!'))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite errors="0" failures="0" file="test01_login.py" name="test01_login.test01_login-20200826164952" skipped="0" tests="5" time="22.925" timestamp="2020-08-26T16:50:16">
|
||||||
|
<testcase classname="test01_login.test01_login" file="test_case/test01_login.py" line="34" name="test01" time="4.667" timestamp="2020-08-26T16:49:58">
|
||||||
|
<!--测试示例1-->
|
||||||
|
<system-out>
|
||||||
|
<![CDATA[用例说明:test01
|
||||||
|
]]> </system-out>
|
||||||
|
</testcase>
|
||||||
|
<testcase classname="test01_login.test01_login" file="test_case/test01_login.py" line="41" name="test02" time="4.547" timestamp="2020-08-26T16:50:02">
|
||||||
|
<!--测试示例2-->
|
||||||
|
<system-out>
|
||||||
|
<![CDATA[用例说明:test02
|
||||||
|
]]> </system-out>
|
||||||
|
</testcase>
|
||||||
|
<testcase classname="test01_login.test01_login" file="test_case/test01_login.py" line="49" name="test03" time="4.538" timestamp="2020-08-26T16:50:07">
|
||||||
|
<!--测试示例3-->
|
||||||
|
<system-out>
|
||||||
|
<![CDATA[用例说明:test03
|
||||||
|
]]> </system-out>
|
||||||
|
</testcase>
|
||||||
|
<testcase classname="test01_login.test01_login" file="test_case/test01_login.py" line="56" name="test04" time="4.600" timestamp="2020-08-26T16:50:11">
|
||||||
|
<!--测试示例4-->
|
||||||
|
<system-out>
|
||||||
|
<![CDATA[用例说明:test04
|
||||||
|
]]> </system-out>
|
||||||
|
</testcase>
|
||||||
|
<testcase classname="test01_login.test01_login" file="test_case/test01_login.py" line="63" name="test05" time="4.573" timestamp="2020-08-26T16:50:16">
|
||||||
|
<!--测试示例5-->
|
||||||
|
<system-out>
|
||||||
|
<![CDATA[用例说明:test05
|
||||||
|
]]> </system-out>
|
||||||
|
</testcase>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
Loading…
Reference in New Issue