3

Currently there has been movement to start continuous integration of Plone addons on Travis CI service. I have seen a lot of packages doing their own this and that testing, from running unit tests to do source code linting of merge requests. I see this healthy development as it takes the pain of setting up your own test runner and makes it easier for less Python-sawy community members to have tests run for their patches.

However, I have not found a definite guide of best practices how one should test his/her addon on Travis CI. At least in my case this has resulted to cargo cult programming and copy-pasting code from other random addons, because I don't know what's available and how one should do it.

Could authors, who have insight how Travis CI and Plone testing works clarify

  • What kind of tests you should run on Travis CI

  • How you should run these tests, in particulary in the context of collective package

  • What are the best examples you should look into

  • Where these practices are or should be documented*

  • How one should test against multiple Plone versions, or is it possbile

  • Where to pipe the result? Personal email?

*) Traditional Finnish carrot provided for those who open their text editor and spend five minutes to dump the contents of their brain

4

2 回答 2

3

你应该在 Travis CI 上运行什么样的测试

所有不在 Plone 核心中且尚未在 jenkins.plone.org 上测试的集合或其他包。

你应该如何运行这些测试,特别是在集体包的情况下

http://datakurre.pandala.org/2012/09/speed-up-your-plone-add-on-tests-on.html

另见 Nejc 的演讲:

http://de.slideshare.net/zupo/travis-ci-fun-and-easy-ci-for-your-plone-packages

您应该研究的最佳示例是什么

这些包都使用 Asko 的博文中描述的方法:

https://github.com/collective/collective.mailchimp https://github.com/plone/plone.act https://github.com/plone/plone.app.collection

这些做法在哪里或应该记录在案*

测试团队目前正在编写包含 travis ci 最佳实践的测试文档。

应该如何针对多个 Plone 版本进行测试,或者是否可能

这应该是可能的。我不确定是否有人尝试过。也许其他人能够回答这个问题。

在哪里管道传输结果?个人电邮?

我想这取决于包装。我目前将我的个人电子邮件地址用于我正在处理的集体包裹。

于 2013-03-19T06:48:49.430 回答
3

应该如何针对多个 Plone 版本进行测试,或者是否可能

plone.api 针对不同的 Python (2.6 & 2.7) 和 Plone (4.2 & 4.3) 版本进行测试:https ://github.com/plone/plone.api/blob/master/.travis.yml

在哪里管道传输结果?个人电邮?如果您将电子邮件通知留空,它将向触发构建的人(也就是最后一个提交者)发送电子邮件。我发现这是一个合理的默认设置。

除此之外,我总是向 IRC 频道发布消息:#niteoweb 用于我们维护的包,# client用于我们所做的客户端工作,#sprint 用于 plone.api(这个需要更改,Plone 需要一个 CI 频道,我们可以在其中发布此类通知)。

于 2013-03-19T07:51:35.173 回答