Plone TestSwarm集成包
项目描述
在TestSwarm实例上运行JavaScript测试任务的测试层
此功能使用plone.app.testing.layers.PLONE_ZSERVER作为基础以启动Plone实例。测试作业可以从buildout配置,也可以用shell环境变量覆盖。作业调度后,Plone实例将运行直到超时。结果尚未从TestSwarm实例收集。
如何配置您的项目以使用collective.testswarm
首先您需要设置一个testswarm实例: https://github.com/jquery/testswarm
添加一个用户(例如tsuser)并找出该用户的认证密钥(mysql: select auth from users where name = “tsuser”;)。这是一个测试作业可以使用来添加的用户账户。在下面的buildout部分使用这些详情或作为环境变量(大写)传递给测试运行器
$ TS_USER=myuser ./bin/test
your.product/setup.py
extras_require={ 'test': 'collective.testswarm' }
buildout.cfg
[test] recipe = zc.recipe.testrunner eggs = your.product [test] environment = testswarm-instance [testswarm-instance] ts_url = http://testswarm ts_user = tsuser ts_auth = asdf1234asdf #select auth from users where name = "tsuser"; ts_job_name = Test collective.testswarm ts_urls = http://localhost:55555/plone/example-qunit-suite ts_suites = QUnit example ts_browsers = popularbeta ts_max_jobs = 1 ZSERVER_HOST = 55555 ZSERVER_PORT = localhost
如何使用collective.testswarm层
your.product/your/product/tests/layers.py
from plone.app.testing import PloneSandboxLayer from collective.testswarm.layers import TESTSWARM_LAYER class YourProductLayer(PloneSandboxLayer): defaultBases = (TESTSWARM_LAYER, ) def setUpPloneSite(self, portal): self.applyProfile(portal, 'your.product:testswarm') YOURPRODUCT_LAYER = YourProductLayer()
your.product/your/product/tests/test_swarm.py
import unittest2 as unittest from layers import YOURPRODUCT_LAYER class TestSwarmTestCase(unittest.TestCase): layer = YOURPRODUCT_LAYER def test_your_product_swarm(self): """ You need one test for the testrunner to sniff out """
collective.testswarm 变更日志
0.3 (2011-07-24)
在setup.py中从我的名字中去除重音符号 [cillian]
0.2 (2011-07-24)
没有变化,只是尝试推送另一个版本以避免作者字段上的UnicodeEncodeError [cillian]
0.1 (2011-07-24)
初始发布,仅用于运行其自己的测试 [cillian]
贡献者
Cillian de Roiste (Syslab.com GmbH)
项目详情
关闭
collective.testswarm-0.3.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 48ebe0a1b4e3c72144b323143d00d95848d7d466f0a122a5552a76a2b7b4e6cc |
|
MD5 | b2369a016ab9c3cc83c97eafa133e580 |
|
BLAKE2b-256 | 45065108f937899c7e30c98b75bb3dae09ebd9c8c7c6f3e727efb7263c674394 |