{ "info": { "author": "Niteoweb d.o.o.", "author_email": "info@niteoweb.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Framework :: Zope2", "Framework :: Zope3", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "About\r\n=====\r\n\r\nniteoweb.windmill extends Plone's FunctionalTestCase to provide support for\r\nrunning Windmill tests. This is achieved by adding an additional test layer,\r\nwhich starts a single-threaded ZServer instance alongside the Windmill server.\r\n\r\nWindmill supports most of modern browser. The controller API can be\r\nfound at http://trac.getwindmill.com/wiki/ControllerApi.\r\n\r\nFor more details, see http://getwindmill.com\r\n\r\nRemember to read source code, it's very lightweight!\r\n\r\nAccessing the Windmill client\r\n=============================\r\n\r\nWindmill tests should derive from ``WindmillTestCase``. This provides an\r\ninstance of ``WindmillClient`` as ``self.wm``. In addition to supporting the\r\nstandard ``WindMillClient`` API, this client has an extra method\r\n``open_site()``, which automatically prepends the Plone site URL when opening\r\na URL. It is otherwise identical to the ``open()`` method.\r\n\r\nFAQ\r\n===\r\n\r\n1. How do I synchronize data manipulated by actions in browser and unittests:\r\n\r\n* In Windmill TestCase, self.site_open() always calls `transaction.commit()`\r\n which writes data to ZODB.\r\n* In unittests, just do `import transaction;transaction.commit()` and data\r\n will be seen in browser.\r\n\r\nInstallation\r\n============\r\n\r\nAdd ``niteoweb.windmill`` as a dependency of the package that uses it in \r\n``setup.py``. One way to do that is via a ``[tests]`` extra, e.g.::\r\n\r\n extras_require = {\r\n 'tests': ['niteoweb.windmill'],\r\n },\r\n\r\nYou then add this to your buildout, e.g.::\r\n\r\n [tests]\r\n recipe = zc.recipe.testrunner\r\n eggs = \r\n my.package [tests]\r\n\r\nUsage\r\n=====\r\n\r\nBasic usage::\r\n\r\n from Products.PloneTestCase import PloneTestCase as ptc\r\n from niteoweb.windmill import WindmillTestCase\r\n\r\n ptc.setupPloneSite()\r\n\r\n class TestSample(WindmillTestCase):\r\n \r\n def afterSetUp(self):\r\n self.setRoles(['Manager'])\r\n self.login_user()\r\n\r\n def test_foo(self):\r\n self.wm.open_site(url=\"/about\")\r\n self.wm.waits.forPageLoad(timeout=30000)\r\n\r\n\r\n def test_suite():\r\n from unittest import TestSuite, makeSuite\r\n suite = TestSuite()\r\n suite.addTest(makeSuite(TestSample))\r\n return suite\r\n\r\nAdvanced usage::\r\n\r\n from Products.PloneTestCase import PloneTestCase as ptc\r\n\r\n from niteoweb.windmill import WindmillTestCase, WindmillLayer\r\n\r\n class CustomWindmillLayer(WindmillLayer):\r\n site = 'plone2'\r\n windmill_settings = WindmillLayer.windmill_settings.copy()\r\n windmill_settings['START_FIREFOX'] = False\r\n WindmillLayer.windmill_settings['START_CHROME'] = True\r\n\r\n ptc.setupPloneSite()\r\n\r\n class TestWM(WindmillTestCase):\r\n \r\n layer = CustomWindmillLayer\r\n\r\n def afterSetUp(self):\r\n self.setRoles(['Manager'])\r\n self.login_user()\r\n\r\n def test_foo(self):\r\n self.wm.open_site('/login_form', site='plone2')\r\n self.wm.waits.forPageLoad(timeout=30000)\r\n\r\n def test_suite():\r\n from unittest import TestSuite, makeSuite\r\n suite = TestSuite()\r\n suite.addTest(makeSuite(TestWM))\r\n return suite\r\n\r\nand run tests with debug mode to stop on error/failure::\r\n\r\n bin/instance test -s package.module -t test_foo -D \r\n\r\nKnown issues\r\n============\r\n\r\n* On teardown, you sometimes will get `AttributeError: 'NoneType' object has\r\n no attribute 'exc_info'`. Ignore it\r\n\r\n* Windmill is very poorly tested on Python2.4, submit bugs if you stumble upon\r\n any;)\r\n\r\nTODO\r\n====\r\n\r\n* Some simple integration to load existing ZODB storages\r\n\r\nCHANGELOG\r\n=========\r\n\r\n\r\n0.3.2 (2011-09-15)\r\n******************\r\n\r\n- Changed the way, the test setup waits for the zserver to finish.\r\n This helps with timing issues that manifest in quite weird and\r\n misleading error messages.\r\n [do3cc]\r\n\r\n0.3.1 (09.05.2010)\r\n******************\r\n\r\n- use `portal_owner` instead of `default_user` for better compatibility with\r\n loginAsPortalOwner() [Domen Kozar]\r\n\r\n0.3 (12.12.2009)\r\n****************\r\n\r\n- Refactor to start ZServer in a separate layer rather than use startZServer()\r\n from ZopeTestCase. This is more reliable in case of other tests in the same\r\n test run that may require a running ZServer, because startZServer() is not\r\n layer aware and cannot be reliably torn down.\r\n [Martin Aspeli]\r\n\r\n0.2 (23.11.2009)\r\n****************\r\n\r\n- added self.add_user function to testcase (be able to add users with custom\r\n roles) [Domen Kozar]\r\n- fixed first request failing (due to windmill/plone racecodintions) [Martin Aspeli]\r\n- fixed windmill dependency pulling [Martin Aspeli]", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.niteoweb.com/", "keywords": "zope plone windmill", "license": "GNU GPL", "maintainer": "", "maintainer_email": "", "name": "niteoweb.windmill", "package_url": "https://pypi.org/project/niteoweb.windmill/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/niteoweb.windmill/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.niteoweb.com/" }, "release_url": "https://pypi.org/project/niteoweb.windmill/0.3.2/", "requires_dist": null, "requires_python": null, "summary": "Plone TestCase integration with Windmill testing", "version": "0.3.2" }, "last_serial": 795446, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2513c92d355ec3aaf8a06f60647d26d7", "sha256": "29fee42ae764d5ea3335236f1db6001dbee2bc8bbca88a6d67eb01312f1a0e83" }, "downloads": -1, "filename": "niteoweb.windmill-0.1-py2.4.egg", "has_sig": false, "md5_digest": "2513c92d355ec3aaf8a06f60647d26d7", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 9491, "upload_time": "2009-10-08T16:05:23", "url": "https://files.pythonhosted.org/packages/1e/dd/af52a1844b3f970b41a78e9f3e52a5ecddbc30cf887f47d7ca70c81b49bc/niteoweb.windmill-0.1-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "a22e03c4953b089e01e21cae999a4044", "sha256": "b0e3e35d48cf101c49fd8fcd9b74eedfb6c4ef2ec88febfc7a9f9ef995117428" }, "downloads": -1, "filename": "niteoweb.windmill-0.1.tar.gz", "has_sig": false, "md5_digest": "a22e03c4953b089e01e21cae999a4044", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3751, "upload_time": "2009-10-08T16:05:23", "url": "https://files.pythonhosted.org/packages/92/8f/703a801a6e9501fd0b327cb72fba6329b8d4968fe86d2852ee786e8deecc/niteoweb.windmill-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "8fbabbd32fa27e26403a690c7058bdd6", "sha256": "4e61adbfaf3b22bcbcb9aaa12f41060444cb76107314f5458f51bf7405428341" }, "downloads": -1, "filename": "niteoweb.windmill-0.2-py2.6.egg", "has_sig": false, "md5_digest": "8fbabbd32fa27e26403a690c7058bdd6", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 8176, "upload_time": "2009-11-23T17:13:50", "url": "https://files.pythonhosted.org/packages/e8/1b/c52743ca34c91bdb4a79e3ae0d839cfef03569da49986817342775526ac5/niteoweb.windmill-0.2-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "956d6ec82050fef38c194979533e86f1", "sha256": "c7b7963bd1256457df6cb2669df61ffde4c048ebca3aec9da942e304013fa0c6" }, "downloads": -1, "filename": "niteoweb.windmill-0.2.tar.gz", "has_sig": false, "md5_digest": "956d6ec82050fef38c194979533e86f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4300, "upload_time": "2009-11-23T17:13:50", "url": "https://files.pythonhosted.org/packages/79/c0/1997c0d3b085fbe466443086c0cc26f29bd8fdaf14449de38a259cf806c4/niteoweb.windmill-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "af0889af80a04e51473e678063ad7c58", "sha256": "8cb2197051f0a4ce6077da134785115704c571220d0653a30db12d3eaa2bf91a" }, "downloads": -1, "filename": "niteoweb.windmill-0.3.tar.gz", "has_sig": false, "md5_digest": "af0889af80a04e51473e678063ad7c58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5467, "upload_time": "2009-12-13T11:26:31", "url": "https://files.pythonhosted.org/packages/d6/77/0ef50a9437d7bcfdc0f61ede43252823911c71f0cf6395fa2c543a070103/niteoweb.windmill-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "d69d0d5065d440e5baadf4aee6cb0ec6", "sha256": "9fc4b11b44250a50e85ab5413f5199bfc90e0efa673fefdabd1da67fef0b4fd1" }, "downloads": -1, "filename": "niteoweb.windmill-0.3.1-py2.6.egg", "has_sig": false, "md5_digest": "d69d0d5065d440e5baadf4aee6cb0ec6", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 13344, "upload_time": "2010-05-09T21:00:41", "url": "https://files.pythonhosted.org/packages/5a/8f/ec1a8a89c1542fefbc1771907f01a1a30628209f1bbf016e1b5282adae72/niteoweb.windmill-0.3.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "7ff057be63da6c92f6e9deac7e04fa6a", "sha256": "5d883c28e5024b749eb959617f6e186c73d1b2e195fb3b5bea725b6f41f18f8e" }, "downloads": -1, "filename": "niteoweb.windmill-0.3.1.tar.gz", "has_sig": false, "md5_digest": "7ff057be63da6c92f6e9deac7e04fa6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5577, "upload_time": "2010-05-09T21:00:40", "url": "https://files.pythonhosted.org/packages/08/09/e7dee9deee9884843838524f4e45cae2a4d03e3a6d0d6731badc58e001b8/niteoweb.windmill-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "9fbf851c40d930bbd86e1bf0ab4093b4", "sha256": "e9875ee6c13213a02a2402b74248b94f65aacf57f4020201b337e94b586faa61" }, "downloads": -1, "filename": "niteoweb.windmill-0.3.2.tar.gz", "has_sig": false, "md5_digest": "9fbf851c40d930bbd86e1bf0ab4093b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6044, "upload_time": "2011-09-15T00:10:57", "url": "https://files.pythonhosted.org/packages/f3/67/3575c6bd8d804f44b0adffc6e8291ab559d7aeb45dabb12f764f2f61ce75/niteoweb.windmill-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9fbf851c40d930bbd86e1bf0ab4093b4", "sha256": "e9875ee6c13213a02a2402b74248b94f65aacf57f4020201b337e94b586faa61" }, "downloads": -1, "filename": "niteoweb.windmill-0.3.2.tar.gz", "has_sig": false, "md5_digest": "9fbf851c40d930bbd86e1bf0ab4093b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6044, "upload_time": "2011-09-15T00:10:57", "url": "https://files.pythonhosted.org/packages/f3/67/3575c6bd8d804f44b0adffc6e8291ab559d7aeb45dabb12f764f2f61ce75/niteoweb.windmill-0.3.2.tar.gz" } ] }