Generate continuous testing report
Project description
conport
conport is an Python tool for generating continuous regression testing reports. It supports both HTML report and email report. In each report, testing build trend, testing build metrics and test case summary are demonstrated. Both English report and Chinese report are supported. Check the demo as an example.
How to install
Use pip to install:
pip install conport
You can also clone the repo, and inside the directory, run:
python setup.py develop
note: when install conport, all denpendent libs specified in requirements.txt will be automatically installed. Due to the requirement of dependency
matplotlib
, you may need to install Linux librarypython-tk
if necessary. In ubuntu, you can run commandapt install python-tk
to install it.
How to use
After install conport successfully, shell command conport
will be avaiable.
Check version of conport
:
conport --version
Get help of conport
:
comport -h
Available arguments can be found from help command output:
usage: conport [-h] [--job_url JOB_URL] [--report_title REPORT_TITLE]
[--past_hours PAST_HOURS] [--send_email SEND_EMAIL]
[--mail_host MAIL_HOST] [--mail_user MAIL_USER]
[--mail_pwd MAIL_PWD] [--sender SENDER] [--receivers RECEIVERS]
[--receivers_cc RECEIVERS_CC] [--pure_html PURE_HTML]
[--version]
optional arguments:
-h, --help show this help message and exit
--job_url JOB_URL Jenkins job url
--report_title REPORT_TITLE
continuous testing report title
--past_hours PAST_HOURS
number of past hours to be monitored
--send_email SEND_EMAIL
whether to send email or not
--mail_host MAIL_HOST
email host
--mail_user MAIL_USER
email user
--mail_pwd MAIL_PWD email password
--sender SENDER email sender
--receivers RECEIVERS
email receivers, format is receiver1, receiver2, ...
--receivers_cc RECEIVERS_CC
email receivers cc, format is receivercc1,
receivercc2, ...
--pure_html PURE_HTML
pure html or not
--report_lan REPORT_LAN
report langurage, english or chinese, default is
english
--version print version
The arguments, if not speficied, will be fetched from the default configuration file. Anyway, for your specific configuration, these arguments needs to be given.
note: parameter
pure_html
is needed because email cannot support HTML5 figure. In that case,conport
create figure by usingmatplotlib
and then embed that figure into email message withemail.MIMEImage
.
demo
The following demo picture is created from command:
conport --job_url http://test-jenkins:8080/job/demo-job-conport --past_hours 8 --report_title "Here is regression testing report for demo usage of conport" --pure_html false --send_email true
You can obtain some key information from the picture:
- Tetsing build trend
- Testing build metrics
- Test case summary, with a focus on failed cases statistics
English demo
Chinese demo(中文示例)
How to develop
First install tox
with:
pip install tox
Run UT and coverage:
python -m pytest -vv -s --cov=conport --cov-report term --cov-report html
Run tox:
tox -e test
Local install and test:
python setup.py develop
Lisense
MIT
Maintenance
This tool is developed by slxiao. You are welcome to raise any issues about the tool.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.