Plone测试驱动开发

Plone测试驱动开发

本帖汇集Plone测试驱动开发相关资料,持续更新……
快速指导
Plone测试分为单元测试、功能测试和集成测试三种类型。
TDD即测试驱动开发贯彻一个以测试为中心的开发理念,先写测试、再写代码,再测试,再改代码的一个螺旋上升的过程,该过程保障代码质量,提升开发效率。
单元测试保障每个方法工作正常,功能测试保障一个模块工作正常,集成测试保障一个可独立运行的应用系统工作正常。
Plone的TDD完全继承python的测试框架,并且有很多扩展。因此,我们学习Plone TDD,入手应该从python的TDD开始。

Plone测试最重要的模块:
http://pypi.python.org/pypi/plone.app.testing/4.2-
Latest zopeskel/templer: $ bin/zopeskel plone_basic
测试样例
集成测试
Dexterity:- https://github.com/plone/plone.app.collection/blob/master/plone/app/collection/tests/test_collection.py#L87-
https://github.com/plone/plone.app.contenttypes/blob/master/plone/app/contenttypes/tests/test_document.py
单元测试
-http://plone.org/products/dexterity/documentation/manual/behaviors/testing-behaviorshttp://www.martinaspeli.net/articles/mock-testing-with-mocker-and-plone.mocktestcase
Mock Tests
https://github.com/tisto/collective.mailchimp/blob/master/collective/mailchimp/testing.py
功能测试
Robot Framework / Selenium 2 Examples:- https://github.com/plone/plone.app.toolbar/blob/1.x/plone/app/toolbar/tests/acceptance/toolbar.txt-
https://github.com/plone/plone.app.deco/tree/master/plone/app/deco/tests/acceptance-
https://github.com/plone/plone.app.collection/blob/master/plone/app/collection/tests/acceptance/test_collection.txt
Robot Framework
http://ploneact.readthedocs.org/en/latest/index.html
- http://ploneact.readthedocs.org/en/latest/robotsuite.html
相关资料
Jenkins: http://jenkins-ci.org
https://github.com/plone/buildout.jenkins
https://github.com/collective/collective.recipe.jenkinsjob
https://github.com/plone/jenkins.plone.org
Travis CI: http://travis-ci.org/
Buster.js: http://busterjs.org
The Grinder: http://grinder.sourceforge.net/
Funkload: http://funkload.nuxeo.org/
推荐书籍
Kent Beck: Test-Driven Development: By Example http://www.amazon.com/Test-Driven-Development-By-Example/dp/0321146530
Robert C. Martin: Agile Software Development, Principles, Patterns, and Practices http://www.amazon.com/Software-Development-Principles-Patterns-Practices/dp/0135974445
相关教程:

 

设置