"将junit数据发送到influxdb"
项目描述
此库提供了一些工具,用于操作junit文件的测试数据并将其发送到influxdb服务器。
安装
pip install junit2influx
用法
如以下所示,提供了junit2influx二进制文件
$ junit2influx --help
Usage: junit2influx [OPTIONS] JUNIT_FILE
Extract test data from a junit file and send it to influxdb:
junit2influx test.xml --influxdb-url url
Each test is send as a single datapoint with its result and
duration under the "tests" measurement, and overall data
(number of tests, total duration, etc.) is sent under
the "builds" measurement.
You can provide additional tags and fields to be sent with
each datapoint to influxdb by using the --field and --tag
flags:
junit2influx test.xml --influxdb-url url --tag host=myhost --field commit=dh876d0
All additional tags and fields are sent as string by default, but
you can cast them to specific json types (bool, float and int) if needed:
--tag int:stage=1 # add an integer "stage" tag with a value of 1
--tag bool:fake=true # add a boolean "fake" tag with a value of True
--field float:dur=3.5 # add a float "dur" field with a value of 3.5
Multiple --field and --tag flags can be provided.
如果您想将数据发送到influx但没有任何Junit文件可用,您可以使用push2influx包装器
$ push2influx --help
✘
Usage: push2influx [OPTIONS] MEASUREMENT
Push data directly to influxdb:
push2influx measurement_name --influxdb-url url --tag result=success
Tags and fields work the same way the do for junit2influx
Options:
--field TEXT
--tag TEXT
--influxdb-url TEXT [required]
--help Show this message and exit.
项目详情
关闭
junit2influx-0.2.1.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 4a9867847a06905aced4dee5719989a9d77a7a91b7d30bc770fc41da2236da9a |
|
MD5 | f10cb44c7e49d75cb80d97ac2a3eaef0 |
|
BLAKE2b-256 | 49bd6a6852f4ccada94c86fe88285dc7eae5fd3123b6d7315c8432540b65d707 |
关闭
junit2influx-0.2.1-py2.py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 02e1ea16d44d9377db9fd68edd94a5d933404917b0b3eb5f7ffce3c6e42f3cb6 |
|
MD5 | b75fe30174037b491b601ee5377b3e22 |
|
BLAKE2b-256 | 934905cc21ef867058f5c4cc53a1c29ee9b9fb3cf7c42f68b94f2995b466e8f1 |