mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 11:29:48 +08:00
Merge pull request #805 from httprunner/leo_dev
2.4.6 **Added** - feat: report tests start event and running exception to sentry **Fixed** - fix: ensure initializing sentry_sdk on startup
This commit is contained in:
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: BUG
|
||||
title: ''
|
||||
labels: Pending
|
||||
assignees: debugtalk
|
||||
---
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/bug_report_zh.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report_zh.md
vendored
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: Bug 反馈(中文)
|
||||
about: 提交 bug 反馈
|
||||
title: BUG
|
||||
title: ''
|
||||
labels: Pending
|
||||
assignees: debugtalk
|
||||
---
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: FEATURE
|
||||
title: ''
|
||||
labels: Pending
|
||||
assignees: debugtalk
|
||||
---
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request_zh.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request_zh.md
vendored
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: 需求反馈
|
||||
about: 期望新增或改进实现的需求
|
||||
title: FEATURE
|
||||
title: ''
|
||||
labels: Pending
|
||||
assignees: debugtalk
|
||||
---
|
||||
|
||||
@@ -52,6 +52,12 @@ Thank you to all our sponsors! ✨🍰✨ ([become a sponsor](docs/sponsors.md))
|
||||
|
||||
霍格沃兹测试学院是 HttpRunner 的首家金牌赞助商。
|
||||
|
||||
### 开源服务赞助商(Open Source Sponsor)
|
||||
|
||||
[<img src="docs/assets/sentry-logo-black.svg" alt="Sentry" width="150">](https://sentry.io/_/open-source/)
|
||||
|
||||
HttpRunner is in Sentry Sponsored plan.
|
||||
|
||||
## How to Contribute
|
||||
|
||||
1. Check for [open issues](https://github.com/httprunner/httprunner/issues) or [open a fresh issue](https://github.com/httprunner/httprunner/issues/new/choose) to start a discussion around a feature idea or a bug.
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Release History
|
||||
|
||||
## 2.4.6 (2019-12-23)
|
||||
|
||||
**Added**
|
||||
|
||||
- feat: report tests start event and running exception to sentry
|
||||
|
||||
**Fixed**
|
||||
|
||||
- fix: ensure initializing sentry_sdk on startup
|
||||
|
||||
**Fixed**
|
||||
|
||||
## 2.4.5 (2019-12-20)
|
||||
|
||||
**Added**
|
||||
|
||||
1
docs/assets/sentry-logo-black.svg
Normal file
1
docs/assets/sentry-logo-black.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 717.11 249.68"><title>sentry-logo-black</title><path d="M430.56,143.76,386.07,86.33H375v77h11.22v-59l45.74,59h9.82v-77H430.56Zm-112-14.27H358.4v-10H318.52V96.31h45v-10H307.07v77h57v-10H318.52Zm-46.84-9.78c-15.57-3.72-19.83-6.69-19.83-13.84,0-6.46,5.71-10.81,14.22-10.81,7.09,0,14.07,2.51,21.3,7.67l6.06-8.54c-8-6.13-16.65-9-27.13-9-15.25,0-25.89,9-25.89,21.92,0,13.84,9,18.63,25.5,22.63,14.51,3.35,18.93,6.5,18.93,13.5s-6,11.38-15.35,11.38c-9.07,0-16.81-3-25-9.82l-6.79,8.08a47.82,47.82,0,0,0,31.41,11.6c16.49,0,27.14-8.87,27.14-22.6C296.27,130.23,289.38,124,271.68,119.71Zm373.9-33.37-23.19,36.31-23-36.31H586l30.51,46.54v30.47h11.56V132.53l30.5-46.19ZM450.87,96.76H476.1v66.58h11.57V96.76h25.23V86.33h-62ZM566.4,133.28c11.64-3.21,18-11.37,18-23,0-14.78-10.84-24-28.28-24H522v77h11.45V135.62h19.42l19.54,27.72h13.37l-21.1-29.58Zm-33-7.52V96.53H555c11.27,0,17.74,5.31,17.74,14.56,0,8.91-6.92,14.67-17.62,14.67ZM144.9,65.43a13.75,13.75,0,0,0-23.81,0l-19.6,33.95,5,2.87a96.14,96.14,0,0,1,47.83,77.4H140.56a82.4,82.4,0,0,0-41-65.54l-5-2.86L76.3,143l5,2.87a46.35,46.35,0,0,1,22.46,33.78H72.33a2.27,2.27,0,0,1-2-3.41l8.76-15.17a31.87,31.87,0,0,0-10-5.71L60.42,170.5a13.75,13.75,0,0,0,11.91,20.62h43.25v-5.73A57.16,57.16,0,0,0,91.84,139l6.88-11.92a70.93,70.93,0,0,1,30.56,58.26v5.74h36.65v-5.73A107.62,107.62,0,0,0,117.09,95.3L131,71.17a2.27,2.27,0,0,1,3.93,0l60.66,105.07a2.27,2.27,0,0,1-2,3.41H179.4c.18,3.83.2,7.66,0,11.48h14.24a13.75,13.75,0,0,0,11.91-20.62Z" style="fill:#221f20"/></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -10,9 +10,15 @@
|
||||
|
||||
霍格沃兹测试学院是 HttpRunner 的首家金牌赞助商。
|
||||
|
||||
### 开源服务赞助商(Open Source Sponsor)
|
||||
|
||||
[<img src="./assets/sentry-logo-black.svg" alt="Sentry" width="150">](https://sentry.io/_/open-source/)
|
||||
|
||||
HttpRunner is in Sentry Sponsored plan.
|
||||
|
||||
## 成为赞助商
|
||||
|
||||
如果你所在的公司或个人也想对 HttpRunner 进行赞助,可参考如下方案,具体可联系[项目作者](mailto:mail@debugtalk.com)。
|
||||
如果你所在的公司或个人也想对 HttpRunner 进行赞助,可参考如下方案,具体可联系[项目作者](mailto:debugtalk@gmail.com)。
|
||||
|
||||
| 等级 | 金牌赞助商<br/>(Gold Sponsor) | 银牌赞助商<br/>(Silver Sponsor)| 个人赞赏 |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
__version__ = "2.4.5"
|
||||
__version__ = "2.4.6"
|
||||
__description__ = "One-stop solution for HTTP(S) testing."
|
||||
|
||||
__all__ = ["__version__", "__description__"]
|
||||
|
||||
import sentry_sdk
|
||||
|
||||
sentry_sdk.init(
|
||||
dsn="https://cc6dd86fbe9f4e7fbd95248cfcff114d@sentry.io/1862849",
|
||||
release="httprunner@{}".format(__version__)
|
||||
)
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import sys
|
||||
|
||||
import sentry_sdk
|
||||
|
||||
from httprunner.cli import main
|
||||
|
||||
sentry_sdk.init("https://cc6dd86fbe9f4e7fbd95248cfcff114d@sentry.io/1862849")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from sentry_sdk import capture_message
|
||||
|
||||
from httprunner import (__version__, exceptions, loader, logger, parser,
|
||||
report, runner, utils)
|
||||
|
||||
@@ -183,6 +185,7 @@ class HttpRunner(object):
|
||||
def run_tests(self, tests_mapping):
|
||||
""" run testcase/testsuite data
|
||||
"""
|
||||
capture_message("start to run tests")
|
||||
project_mapping = tests_mapping.get("project_mapping", {})
|
||||
self.project_working_directory = project_mapping.get("PWD", os.getcwd())
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
from sentry_sdk import capture_exception
|
||||
from httprunner import __description__, __version__
|
||||
from httprunner.api import HttpRunner
|
||||
from httprunner.compat import is_py2
|
||||
@@ -101,8 +101,9 @@ def main():
|
||||
report_file=args.report_file
|
||||
)
|
||||
err_code |= (0 if summary and summary["success"] else 1)
|
||||
except Exception:
|
||||
except Exception as ex:
|
||||
color_print("!!!!!!!!!! exception stage: {} !!!!!!!!!!".format(runner.exception_stage), "YELLOW")
|
||||
capture_exception(ex)
|
||||
raise
|
||||
|
||||
return err_code
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "httprunner"
|
||||
version = "2.4.5"
|
||||
version = "2.4.6"
|
||||
description = "One-stop solution for HTTP(S) testing."
|
||||
license = "Apache-2.0"
|
||||
readme = "README.md"
|
||||
|
||||
Reference in New Issue
Block a user