请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

jenkins执行脚本结束后,并没有发送邮件,查看控制台输出提示如下

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

正在回答 回答被采纳积分+3

6回答

慕盖茨5094059 2019-12-24 11:04:44

同样的问题,请问下你解决了没?

0 回复 有任何疑惑可以回复我~
  • selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary   没有设置chromedriver
    回复 有任何疑惑可以回复我~ 2019-12-25 12:56:08
  • 老师,没有报selenium的错误,就是不能发送邮件
    回复 有任何疑惑可以回复我~ 2019-12-26 16:37:58
  • 你的解决了吗
    回复 有任何疑惑可以回复我~ 2019-12-26 16:38:39
提问者 shaohui_Tester 2019-10-29 08:51:30

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

0 回复 有任何疑惑可以回复我~
提问者 shaohui_Tester 2019-10-28 08:26:55

控制台输出

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


0 回复 有任何疑惑可以回复我~
提问者 shaohui_Tester 2019-10-25 19:51:29

https://img1.sycdn.imooc.com//szimg/5db2e1b50908538c16010544.jpg

这是我设置的

0 回复 有任何疑惑可以回复我~
  • 这个人没问题啊,你把你执行后面的所有结果截图发一下,测试邮件能发送吧?
    回复 有任何疑惑可以回复我~ 2019-10-26 16:04:21
  • 提问者 shaohui_Tester 回复 Mushishi #2
    测试邮件可以发送
    回复 有任何疑惑可以回复我~ 2019-10-28 08:26:49
  • Mushishi 回复 提问者 shaohui_Tester #3
    selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
     (Driver info: 你看你启动没启动,直接报错,你把这个解决,先让case跑了,然后再去执行就ok
    回复 有任何疑惑可以回复我~ 2019-10-29 08:05:31
提问者 shaohui_Tester 2019-10-25 16:40:08

https://img1.sycdn.imooc.com//szimg/5db2b4d609a7489214710227.jpg

这是我的邮件发送配置截图

0 回复 有任何疑惑可以回复我~
  • 不是这个,你触发发送邮件的条件是什么,always 还是错误还是通过,高级里面
    回复 有任何疑惑可以回复我~ 2019-10-25 17:17:14
  • 提问者 shaohui_Tester 回复 Mushishi #2
    我选的是always,但是还是如此。搞不清楚为啥
    回复 有任何疑惑可以回复我~ 2019-10-25 19:50:27
Mushishi 2019-10-25 16:27:44

如果你邮件能够发通,你先看一下你发邮件的策略,你执行了7个失败了7个,而且提示没有结果,说明可能你设置的是通过了发

0 回复 有任何疑惑可以回复我~
  • 提问者 shaohui_Tester #1
    我并没有设置通过了发
    截图配置我放回答中了,麻烦帮我看看
    回复 有任何疑惑可以回复我~ 2019-10-25 16:39:45
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信