采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
Ran 7 tests in 18.779s
FAILED (errors=7)
D:\lishaohui\Spread\venv\cases>exit 0
No mail will be sent out, as ‘推广后台登录 #21’ does not have a result yet. Please make sure you set a proper result in case of pipeline/build scripts.
Finished: SUCCESS
Started by user 李少辉Running as SYSTEM
Building in workspace D:\lishaohui\5itest_learn\venv
[venv] $ cmd /c call C:\Windows\TEMP\jenkins2109866875139510593.bat
D:\lishaohui\5itest_learn\venv>python D:\lishaohui\5itest_learn\venv\cases\ddt_case.py
info
用例开始执行
POST http://127.0.0.1:3162/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "platformName": "any", "goog:chromeOptions": {"extensions": [], "args": []}}}, "desiredCapabilities": {"browserName": "chrome", "version": "", "platform": "ANY", "goog:chromeOptions": {"extensions": [], "args": []}}}
Starting new HTTP connection (1): 127.0.0.1:3162http://127.0.0.1:3162 "POST /session HTTP/1.1" 200 866
Finished Request
POST http://127.0.0.1:3162/session/98f13af578a0c9e6f3009d43b4046913/url {"url": "http://www.5itest.cn/register", "sessionId":
Finished Request
.用例开始执行
POST http://127.0.0.1:3301/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "platformName": "any", "goog:chromeOptions": {"extensions": [], "args": []}}}, "desiredCapabilities": {"browserName": "chrome", "version": "", "platform": "ANY", "goog:chromeOptions": {"extensions": [], "args": []}}}
Starting new HTTP connection (1): 127.0.0.1:3301http://127.0.0.1:3301 "POST /session HTTP/1.1" 200 864
Finished Request
POST http://127.0.0.1:3301/session/bf50f0c4f82fa5ada18b3203429bdb65/url {"url": "http://www.5itest.cn/register", "sessionId": "bf50f0c4f82fa5ada18b3203429bdb65"}http://127.0.0.1:3301 "POST /session/bf50f0c4f82fa5ada18b3203429bdb65/url HTTP/1.1" 200 72
Finished Request
POST http://127.0.0.1:3301/session/bf50f0c4f82fa5ada18b3203429bdb65/element {"using": "id", "value": "register_email", "sessionId": "bf50f0c4f82fa5ada18b3203429bdb65"}http://127.0.0.1:3301 "POST /session/bf50f0c4f82fa5ada18b3203429bdb65/element HTTP/1.1" 200 102
Finished Request
Finished Request
.
======================================================================
ERROR: test_register_email_1___756142_qq_com____李少辉1____111111____code____email____0__ (__main__.Register_test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\lishaohui\5itest_learn\venv\cases\ddt_case.py", line 39, in tearDown
cls.driver.save_screenshot(filepath)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1055, in save_screenshot
return self.get_screenshot_as_file(filename)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1032, in get_screenshot_as_file
png = self.get_screenshot_as_png()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1064, in get_screenshot_as_png
return base64.b64decode(self.get_screenshot_as_base64().encode('ascii'))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 1074, in get_screenshot_as_base64
return self.execute(Command.SCREENSHOT)['value']
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: invalid session id
(Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 6.1.7601 SP1 x86_64)
======================================================================
FAIL: test_register_email_1___756142_qq_com____李少辉1____111111____code____email____0__ (__main__.Register_test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\ddt.py", line 145, in wrapper
return func(self, *args, **kwargs)
File "D:\lishaohui\5itest_learn\venv\cases\ddt_case.py", line 61, in test_register_email
cls.ra.register_email_test(email, username, password, code, error_element,row)
File "D:\lishaohui\5itest_learn\venv\business\register_action.py", line 59, in register_email_test
self.assertFalse(emailerror, "用例执行成功")
AssertionError: True is not false : 用例执行成功
----------------------------------------------------------------------
Ran 6 tests in 117.233s
FAILED (failures=1, errors=1)
756142@qq.com 李少辉1 111111 code email 0
com 李少辉2 111112 code email 1
请输入有效的电子邮件地址
用例执行完毕
756144 李少辉3 111113 code email 2
请输入有效的电子邮件地址
用例执行完毕
李少辉4 111114 code email 3
请输入邮箱
用例执行完毕
@……%¥……%@……# 李少辉5 111115 code email 4
请输入有效的电子邮件地址
用例执行完毕
李少辉6 111116 code email 5
请输入邮箱
用例执行完毕
D:\lishaohui\5itest_learn\venv>exit 0
No mail will be sent out, as 'register_5itest #16' does not have a result yet. Please make sure you set a proper result in case of pipeline/build scripts.
Finished: SUCCESS
Started by user 李少辉Running as SYSTEM
Building in workspace D:\lishaohui\5itest_learn\venv
[venv] $ cmd /c call C:\Windows\TEMP\jenkins595971178605987659.bat
D:\lishaohui\5itest_learn\venv>python D:\lishaohui\5itest_learn\venv\cases\ddt_case.py
info
用例开始执行
POST http://127.0.0.1:2548/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "platformName": "any", "goog:chromeOptions": {"extensions": [], "args": []}}}, "desiredCapabilities": {"browserName": "chrome", "version": "", "platform": "ANY", "goog:chromeOptions": {"extensions": [], "args": []}}}
Starting new HTTP connection (1): 127.0.0.1:2548http://127.0.0.1:2548 "POST /session HTTP/1.1" 200 249
Finished Request
E用例开始执行
POST http://127.0.0.1:2559/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "platformName": "any", "goog:chromeOptions": {"extensions": [], "args": []}}}, "desiredCapabilities": {"browserName": "chrome", "version": "", "platform": "ANY", "goog:chromeOptions": {"extensions": [], "args": []}}}
Starting new HTTP connection (1): 127.0.0.1:2559http://127.0.0.1:2559 "POST /session HTTP/1.1" 200 249
Finished Request
E用例开始执行
POST http://127.0.0.1:2570/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "platformName": "any", "goog:chromeOptions": {"extensions": [], "args": []}}}, "desiredCapabilities": {"browserName": "chrome", "version": "", "platform": "ANY", "goog:chromeOptions": {"extensions": [], "args": []}}}
Starting new HTTP connection (1): 127.0.0.1:2570http://127.0.0.1:2570 "POST /session HTTP/1.1" 200 249
Finished Request
E用例开始执行
POST http://127.0.0.1:2579/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "platformName": "any", "goog:chromeOptions": {"extensions": [], "args": []}}}, "desiredCapabilities": {"browserName": "chrome", "version": "", "platform": "ANY", "goog:chromeOptions": {"extensions": [], "args": []}}}
Starting new HTTP connection (1): 127.0.0.1:2579http://127.0.0.1:2579 "POST /session HTTP/1.1" 200 249
Finished Request
E用例开始执行
POST http://127.0.0.1:2588/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "platformName": "any", "goog:chromeOptions": {"extensions": [], "args": []}}}, "desiredCapabilities": {"browserName": "chrome", "version": "", "platform": "ANY", "goog:chromeOptions": {"extensions": [], "args": []}}}
Starting new HTTP connection (1): 127.0.0.1:2588http://127.0.0.1:2588 "POST /session HTTP/1.1" 200 249
Finished Request
E用例开始执行
POST http://127.0.0.1:2598/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "platformName": "any", "goog:chromeOptions": {"extensions": [], "args": []}}}, "desiredCapabilities": {"browserName": "chrome", "version": "", "platform": "ANY", "goog:chromeOptions": {"extensions": [], "args": []}}}
Starting new HTTP connection (1): 127.0.0.1:2598http://127.0.0.1:2598 "POST /session HTTP/1.1" 200 249
Finished Request
E
======================================================================
ERROR: test_register_email_1___756142_qq_com____李少辉1____111111____code____email____0__ (__main__.Register_test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\lishaohui\5itest_learn\venv\cases\ddt_case.py", line 29, in setUp
driver=webdriver.Chrome()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 6.1.7601 SP1 x86_64)
======================================================================
ERROR: test_register_email_2___com____李少辉2____111112____code____email____1__ (__main__.Register_test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\lishaohui\5itest_learn\venv\cases\ddt_case.py", line 29, in setUp
driver=webdriver.Chrome()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 6.1.7601 SP1 x86_64)
======================================================================
ERROR: test_register_email_3___756144____李少辉3____111113____code____email____2__ (__main__.Register_test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\lishaohui\5itest_learn\venv\cases\ddt_case.py", line 29, in setUp
driver=webdriver.Chrome()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 6.1.7601 SP1 x86_64)
======================================================================
ERROR: test_register_email_4______________________李少辉4____111114____code____email____3__ (__main__.Register_test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\lishaohui\5itest_learn\venv\cases\ddt_case.py", line 29, in setUp
driver=webdriver.Chrome()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 6.1.7601 SP1 x86_64)
======================================================================
ERROR: test_register_email_5___________________李少辉5____111115____code____email____4__ (__main__.Register_test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\lishaohui\5itest_learn\venv\cases\ddt_case.py", line 29, in setUp
driver=webdriver.Chrome()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 6.1.7601 SP1 x86_64)
======================================================================
ERROR: test_register_email_6_______李少辉6____111116____code____email____5__ (__main__.Register_test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\lishaohui\5itest_learn\venv\cases\ddt_case.py", line 29, in setUp
driver=webdriver.Chrome()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 6.1.7601 SP1 x86_64)
----------------------------------------------------------------------
Ran 6 tests in 15.723s
FAILED (errors=6)
D:\lishaohui\5itest_learn\venv\config\2019-10-28.log
D:\lishaohui\5itest_learn\venv>exit 0
No mail will be sent out, as '5iTest_register #45' does not have a result yet. Please make sure you set a proper result in case of pipeline/build scripts.
Finished: SUCCESS
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary (Driver info: 你看你启动没启动,直接报错,你把这个解决,先让case跑了,然后再去执行就ok
登录后可查看更多问答,登录/注册