{ "info": { "author": "LAZR Developers", "author_email": "lazr-developers@lists.launchpad.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "..\n This file is part of lazr.testing.\n\n lazr.testing is free software: you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, version 3 of the License.\n\n lazr.testing is distributed in the hope that it will be useful, but\n WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public\n License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with lazr.testing. If not, see .\n\nLAZR testing\n************\n\nPlease see https://dev.launchpad.net/LazrStyleGuide and\nhttps://dev.launchpad.net/Hacking for how to develop in this\npackage.\n\n\nJavascript tests with JsTestDriver\n==================================\n\n``lazr.testing`` includes support for running Javascript tests with\nthe help of JsTestDriver_, and failures and errors are reported back\nto your unittest-based test runner as if they were failures and errors\nof a unittest TestCase.\n\nTo actually run the tests, a browser must be started (if not running)\nand captured by the JsTestDriver server. Since we generally want to do\nthis only once, the JsTestDriver server is started and stopped as a\nsubprocess using ``zope.testing`` support for layers.\n\nJsTestDriver supports outputing test results in an XML-based format,\nwhich we parse and feed into a ``TestResult`` instance from unittest.\n\n.. _JsTestDriver: http://code.google.com/p/js-test-driver/\n\nWriting tests\n-------------\n\nPlease refer to the `JsTestDriver TestCase`_ documentation on how to\nwrite tests that are supported by JsTestDriver.\n\nAdditionally, the ``lazr-js`` project has some examples of running\n``YUI Test``-based tests under JsTestDriver.\n\n.. _JsTestDriver TestCase: http://code.google.com/p/js-test-driver/wiki/TestCase\n\nGetting your Javascript tests to be run as part of your test suite is\nsomewhat trivial, provided that you are already using ``zope.testing``\nas your test runner (see also `Future Plans`_). All you have to do is\nto define a ``JsTestDriverTestCase`` subclass with a\n``config_filename`` attribute that points to a ``JsTestDriver``\nconfiguration file. For example::\n\n from lazr.testing.jstestdriver import JsTestDriverTestCase\n\n class JsTestDriverSelfTest(JsTestDriverTestCase):\n config_filename = os.path.abspath(os.path.join(os.path.dirname(__file__),\n \"js\", \"tests.conf\"))\n\nRunning tests\n-------------\n\nIn order to actually run the tests you need to specify the location\nwhere JsTestDriver can be found. This can be done by exporting an\nenvironment variable::\n\n JSTESTDRIVER=\"java -jar /path/to/JsTestDriver.jar\" ./bin/test\n\nBy default, as said above, the test layer will fire up a JsTestDriver\nserver and connect your default browser to it. Then the actual test\nrun will execute the JsTestDriver as a client connecting back to that\nserver to drive the Javascript tests. This variable **must** always be\npresent, regardless of the other variables described below.\n\nYou can control the port used by the server with another environment\nvariable. The default is to start the server on port 4224::\n\n JSTESTDRIVER_PORT=\"10001\"\n\nIt is also possible (and very handy!) to have a long-running\nJsTestDriver server and connect one or more browser to it manually. If\nyou want to do that, you have to export another variable telling where\nyour JsTestDriver server is running (hint: this could even be a remote\nserver)::\n\n JSTESTDRIVER_SERVER=\"http://localhost:10001\"\n\nControlling the browser that will be started can also be done by\nsetting the ``BROWSER`` environment variable to the full path of your\nbrowser's executable.\n\nIf your default browser is Firefox, it can be annoying that every time\nyou run the tests in the background a new tab opens and Firefox\nswitches to it automatically, disrupting your browsing. You can\ndisable that by Preferences -> Tabs and disabling the option named\n\"When I open a link in a new tab, switch to it immediately\". It might\nbe also interesting to enable the option \"Open new windows in a new\ntab instead\" if it's not enabled yet.\n\nFinally, if you're just too annoyed that every test run opens new\ntabs, you have the option of having a long-running JsTestDriver server\nas described above and manually connect to it. That way, only a single\ntab of your browser will be used and every test run will re-use that\ntab.\n\nFuture Plans\n------------\n\nIn the future, the test layer might be replaced by\ntestresources_ and the custom XML parsing might be replaced by\nusing a subunit_ stream filter.\n\n.. _testresources: https://launchpad.net/testresources\n.. _subunit: https://launchpad.net/subunit\n\n=====================\nNEWS for lazr.testing\n=====================\n\n0.1.2 (2010-09-06)\n==================\n\n- Add compatibility with JsTestDriver 1.2.2. Not compatible with earlier\n versions of JsTestDriver anymore.\n\n- Don't wait for a browser, if JsTestDriverLayer doesn't start the\n browser. (LP: #627413)\n\n0.1.1 (2009-10-16)\n==================\n\n- Brown bag, botched NEWS release.\n\n0.1.0 (2009-10-16)\n==================\n\n- Initial release", "description_content_type": null, "docs_url": null, "download_url": "https://launchpad.net/lazr.testing/+download", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://launchpad.net/lazr.testing", "keywords": null, "license": "LGPL v3", "maintainer": null, "maintainer_email": null, "name": "lazr.testing", "package_url": "https://pypi.org/project/lazr.testing/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/lazr.testing/", "project_urls": { "Download": "https://launchpad.net/lazr.testing/+download", "Homepage": "https://launchpad.net/lazr.testing" }, "release_url": "https://pypi.org/project/lazr.testing/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "A collection of testing helpers.", "version": "0.1.2" }, "last_serial": 1740389, "releases": { "0.1.0": [], "0.1.1": [], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b4db0be34e8bde1fa795764c1534a25c", "sha256": "e31303b9936e98ef9f3bcfbd092bd1aad29baf42af4c47fbf45927c99297b07a" }, "downloads": -1, "filename": "lazr.testing-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b4db0be34e8bde1fa795764c1534a25c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23884, "upload_time": "2010-09-06T18:32:05", "url": "https://files.pythonhosted.org/packages/5e/68/12a4b302fce5b3b4007afd8bbc4b69965e6acc3722003f866362c56f8a52/lazr.testing-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4db0be34e8bde1fa795764c1534a25c", "sha256": "e31303b9936e98ef9f3bcfbd092bd1aad29baf42af4c47fbf45927c99297b07a" }, "downloads": -1, "filename": "lazr.testing-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b4db0be34e8bde1fa795764c1534a25c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23884, "upload_time": "2010-09-06T18:32:05", "url": "https://files.pythonhosted.org/packages/5e/68/12a4b302fce5b3b4007afd8bbc4b69965e6acc3722003f866362c56f8a52/lazr.testing-0.1.2.tar.gz" } ] }