为Zope testrunner提供邮件支持、HTML生成和RSS支持的包装器
项目描述
haufe.testrunner (HTR)
haufe.testrunner 是围绕标准 Zope 2 testrunner(通常使用“zopectl test…”启动)的包装器。haufe.testrunner 设计用于运行不同 Zope 配置或沙盒的常规测试。它支持可配置的测试环境,以纯文本或 HTML 格式进行报告,提供邮件通知和 RSS 支持。haufe.testrunner 主要设计为通过 cron 运行,以测试持续进行的项目(持续集成)。
要求
SQLAlchemy>=0.4.6
安装
haufe.testrunner 可直接从 HaufeComponents 仓库获得
svn co svn+ssh://svn.haufe.de/VCS/svnrep/svnep/HaufeComponents/haufe.testrunner/trunk haufe.testrunner python2.4 setup.py install
或通过从仓库 easy_install 直接安装
easy_install svn+ssh://svn.haufe.de/VCS/svnrep/svnep/HaufeComponents/haufe.testrunner/trunk haufe.testrunner
或可以通过使用 easy_install 从现有的 egg 安装
easy_install haufe.runner-x.y.z.egg
确保您的 PYTHONPATH 设置正确,并包含 $SOFTWARE_HOME/lib/python(为了正确导入 zope.component 和其他 Zope 3 相关模块)
使用 haufe.testrunner
haufe.testrunner 将安装一个命令行脚本 htr。 htr 需要一个配置文件,该文件定义了您的测试环境。
示例
[default] # Path to instance home of sandbox sandbox=/home/ajung/sandboxes/Zope-2.8/Zope # unique string for the sandbox (used for mail, reports) ident=Zope-HEAD # comma-seperated list of products or packages to be tested packages = Products.PageTemplates, Products.HaufePortlet, zope.component # comma-seperated list of email addresses to send positive emails email_ok=foo@bar.org # comma-seperated list of email addresses to send negative emails email_failure=foo@bar.org # Base URL of the webserver pointing to your sandbox base_url=http://zopedev2/zopeDominoTesting # run testrunner with coverage option (optional, default: no coverage) coverage = 1 # sender email address sender_address = noreply@foo.org # Database DSN dsn = postgres://user:password@host/dbname # optional support for integration tests: # (the test_suite() method must check the environment variable # $INTEGRATION_TESTS). integration_tests = 1 # optional name for zope start script default ist set to 'zopectl` zope_start=zopectl # optional paramter to set test options #runner_options=-s -a # For Selenium tests (optional) we use a dedicated [selenium] section [selenium] # hostname where the Selenium RC server is running testrunner_host = hostname # port number of the Selenium RC server testrunner_port = 4444 # instance_url - the given URL is exposed to selenium testcases derived # from haufe.selenium.SeleniumTestcase as self.instance_url. This allows # you to run Selenium tests against different remote servers instance_url = http://zopedev2:16180 # For integration tests we can run the tests against an existing ZEO server # instead of using DemoStorage [zeo] host = zopedev2 port = 22222
使用以下命令启动 haufe.testrunner
htr --conf /path/to/yourconfig
可选选项 –mail 和 –rss 控制邮件通知和 RSS 的生成。如果您指定 –update,则 haufe.testrunner 将在运行测试之前更新您的 Products、lib/python 和 Base 目录。
–clean 将删除一周前更旧的包含 testrunner 日志的目录
–db 将将所有结果保存到数据库中(见下文)
数据库集成
所有结果可以可选地存储在关系数据库中(用于外部报告、RSS 订阅、Web 前端等)。
创建数据库
htr_bootstrap -dt
必须使用环境变量 TESTING_DSN 指定数据库,例如
export TESTING_DSN=postgres://username:password@dbhost/TestrunnerDB
要存储数据库中的结果,请将 –db 选项传递给 htr 脚本。
DSN也可以通过配置文件中的“dsn”选项进行指定(见上文)。
您需要首先通过调用htr_bootstrap脚本创建数据库(见上文)。
许可证
haufe.testrunner根据Zope公共许可证2.1授权。
请参阅包含的ZPL.txt文件。
联系方式
变更
0.6.13 (12.05.2011)
‘support_zope213’兼容性选项
0.6.12 (11.01.2011)
修复了setup.py中的语法错误
0.6.10 (15.12.2010)
支持‘sender_address’选项
0.6.9 (03.02.2009)
放宽了对SQLAlchemy版本的锁定
‘support_zope28’兼容性选项
0.6.8.3 (10.11.2008)
‘logdata’现在仅支持ASCII
0.6.8.2 (23.10.2008)
修复了logdata编码与数据库编码不一致的潜在bug
0.6.8.1 (12.09.2008)
将SQLAlchemy锁定为0.4.7p1,原因是数据库连接中的错误
0.6.8 (15.07.2008)
修复了formatter.py中的孤儿处理问题
0.6.7 (10.07.2008)
修复了导致错误邮件警报的‘tests_failed’处理
0.6.6 (04.07.2008)
简化了删除完整testrunner及其所有相关行的代码
0.6.5 (03.07.2008)
更改了孤儿处理方式
0.6.4 (03.07.2008)
修复了数据库清理代码中的问题
0.6.3 (01.07.2008)
修复了依赖问题
0.6.1 (01.07.2008)
导入清理
为htr_bootstrap添加了-x选项,用于删除testrunner及其所有相关运行和结果
0.6.0 (27.06.2008)
第一个公开版本
0.5.6.2 (26.06.2008)
啊,不要pdb
0.5.6.1 (26.06.2008)
一些关于RSS的修复
0.5.6 (26.06.2008)
删除了HTML邮件
报告不再在文件系统中生成(仅数据库!)
对基于Grok的Web前端进行调整
0.5.5 (25.06.2008)
添加级联约束
0.5.4 (25.06.2008)
稍微重构了日志文件解析
修复了与‘tests_ok’标志相关的问题
0.5.3 (24.06.2008)
一些小的正则表达式修复
0.5.2 (24.06.2008)
拼写错误
0.5.1 (24.06.2008)
一些用于使启动代码正常工作的内部修复
0.5.0 (24.06.2008)
与Zope 2.11和zc.buildout的兼容性
删除了z3c.sqlalchemy依赖项
直接使用SQLAlchemy > 0.4.0(声明性层)
0.3.16 (20.06.2008)
修复版本
0.3.15 (19.06.2008)
添加了可选选项runner_options,第一个参数用于指定包,应为–listdir或-s
0.3.14 (19.06.2008)
添加了可选选项zope_start,默认设置为zopectl
添加了选项测试对n的支持
0.3.13 (05.05.2008)
在[selenium]部分添加了对多个instance_urlXXX选项的支持
在[selenium]部分添加了testrunner_https_port选项
0.3.12(未发布)
添加了‘logdata’列
0.3.11 (23.04.2008)
修复了正则表达式中的bug
0.3.10 (21.04.2008)
拼写错误
0.3.9 (18.04.2008)
修复了日志文件解析器代码中的问题
0.3.8 (16.04.2008)
更新了文档
0.3.7 (26.03.2008)
解决了上传冲突
0.3.6 (26.03.2008)
reST修复
0.3.5 (23.01.2008)
与SQLAlchemy 0.4.2的兼容性
Unicode修复
0.3.5 (10.12.2007)
与SQLAlchemy 0.4.1的兼容性
0.3.4 (31.10.2007)
与SQLAlchemy 0.4的兼容性
0.3.3 (01.09.2007)
添加了–restart选项
支持集成测试选项
0.3.2 (21.09.2007)
支持覆盖率
支持Selenium
可选支持对现有ZEO服务器运行testrunner(使用testrunner配置文件中的[zeo]部分)
基于每个目录确定repos_type
0.3.1 (07.09.2007)
添加了run.hostname, run.ipaddress
0.3.0 (06.09.2007)
数据库支持
0.2.1 (29.8.2007)
–mail-with-html选项
从邮件中排除HTML
0.2.0 (29.8.2007)
各种小问题
现在应该可以用于生产了
0.1.7 (29.8.2007)
CSS支持
0.1.6 (29.8.2007)
必须向sendmail()传递要发送的电子邮件地址列表
在RSS描述中包含报告
0.1.4 (27.8.2007)
修复
0.1.3 (27.8.2007)
错误修复
README.txt
更多检查
0.1.2 (26.8.2007)
一些修复
0.1.1 (26.8.2007)
RSS支持
0.1.0 (25.8.2007)
初始发布
项目详情
haufe.testrunner-0.6.13.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 40d01a0ddac96360a350fb668b624015ecd7048df6ee901801ece885b2cfadcf |
|
MD5 | 631339826784c23af75a55ce3cde8bc5 |
|
BLAKE2b-256 | 4b24a17dd67fc63d047933d8e93cd83c9234726a74b79631b84f968fdfc93dde |