roadrunner


Nameroadrunner JSON
Version 0.2.3.1 PyPI version JSON
download
home_page
Summarytestrunner for test-driven development
upload_time2009-06-25 19:51:02
maintainer
docs_urlNone
authorJordan Baker
requires_pythonNone
licenseZPL
keywords zope buildout tdd testing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Waiting for stuff sucks.

roadrunner is a looping testrunner with environment preloading for test-driven
development.  It makes integration testing with Plone much faster.

Currently it is focused around preloading a Plone environment but it could
also work for other frameworks as well.

It works by pre-loading Python code, setup of test layers and a default Plone
site. This is called the resident test environment.

Your tests are run in a child process which gets a copy-on-write memory space.

Other than that it pretty much works like the regular Zope testrunner.

How much faster is it?
======================

Here's an example. You are writing integration or functional tests for a Plone
application.

On this fairly current laptop it takes 25s to load Zope, Plone and setup a
sample Plone site.

Add 5 seconds for the application load and test run for a total of 30 seconds.

If you are iterating on a functional test and want to quickly check your
changes that is too long to wait.

Using roadrunner you load the environment the first time.  Subsequent times
you run your test your total time will be only 5 seconds.

Yes, you can save 25 seconds every time you run your test.

How to use it?
==============

Roadrunner only currently works as part of a zc.buildout environment.

The easiest way to try it is to add it to an existing Plone 3 buildout.

Now for a sample part.

This will create a new directory in parts named by the part containing a copy
of your Zope instance environment but with the packages-under-test excluded
from being loaded via ZCML by default.

::

  [roadrunner]
  recipe = roadrunner:plone
  packages-under-test = my.package
  
You can also match several packages using simple globbing, eg: my.packages.*

The parameter 'zope2-instance' allows you to specify the name of the part
which corresponds to the zope instance roadrunner will work against.  The
default is 'instance'.

By default resident Plone site will be created. This should work in most
situations where you are installing add-on products that use install methods
or GenericSetup profiles.

setup-plone=0 allows you to disable the Plone site setup optimization. You
might need to do this in certain situations where you are using the profile_id
parameter.

Then you can run roadrunner::

  $ bin/roadrunner -s my.package
  
It will preload Zope & Plone, then fork off the first testrunner. Once the
first testrunner is complete you will receive the roadrunner prompt where
you launch additional tests.

Recipe Options
==============

zope2-instance:

The zope2 instance to use for basing the installation on. Defaults 
to 'instance'.

Gotchas
=======

- roadrunner is still a bit experimental. If in doubt, check it with the
  regular testrunner. If you find a difference please send some details
  including traceback, product versions, buildout.cfg and your tests.

- It may require you to change your test setup slightly if you haven't yet
  already.

  You'll be fine as long as you follow the standard sequence of importing your
  product, loading its ZCML and then calling ztc.installProduct within an
  @onsetup deferred method.
  
   This allows the loading of your product to occur in the child testrunner
  process which critical that roadrunner does what its supposed to do.

  For more details see an example here:

    http://plone.org/documentation/tutorial/testing/writing-a-plonetestcase-unit-integration-test
  
- Because it preloads the Plone environment you won't be able to see changes
  to the Core Plone components.  However, it should see all changes in your
  application code which is what you will most likely be changing anyways.

Other options to speed up Plone testing
=======================================

plone.reload is excellent to do exploratory testing and development.

Known Issues
============

- ZCML registrations lost.  This can occur if you run unit tests which employ
PlacelessSetup.  A simple workaround is to avoid running unit tests and
integration tests together with roadrunner.  You can run them separately
without issue.

Source & Bug Tracker
====================

Source Code:

  http://github.com/hexsprite/roadrunner

Tracker:

  http://hexsprite.lighthouseapp.com/projects/21973-roadrunner

Tested With
===========

Plone 3.1.x Let me know if you get it working on anything else.

Have also had reports of success with Plone 2.5.x

Also there are reports of success with Zope 2.9.8 and Plone 2.5.5.

Windows is untested and probably does not work currently. Feedback and patches
accepted.

Author
======

Send questions, comments & bug reports to:

Jordan Baker <jbb@no_spam_plz_scryent.com>

License
=======

Licensed under ZPL 2.1
see doc/LICENSE.txt

Changelog
---------

0.2.3.1 (Jun 25, 2009)
======================

- Added a MANIFEST so this can be built by pythons without git support installed.

0.2.3 (Jun 16, 2009)
====================

- Bug #4: OSX Core errors due to no exec after fork.

- Bug #2: the roadrunner script was not being updated properly.  now when you
  re-run buildout it will pickup new dependencies.

0.2.2 (Jun 1, 2008)
===================

Bugs Fixed:

- zope2/lib/python was being placed at the very start of the path which didn't
  allow newer eggs to be seen. Now placed at the end of sys.path.

New Features:

- hack to reset terminal after you kill PDB. May need work for Windows.

0.2.1 (May 26, 2008)
====================

- fixed bug in the buildout recipe that excluded Zope from the sys.path. Bug
  crept in because of "dirty" python install. virtualenv --no-site-packages is
  your friend.

- removed an annoying child process message.

0.2 (May 25, 2008)
==================

-  added a zc.buildout recipe to setup roadrunner with Plone

-  fixed globbing for packages under test

-  fixed child signal handling so you can reliably interrupt running tests
   without killing the parent 

0.1  (May 18, 2008)
===================

Initial public version
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "roadrunner",
    "maintainer": "",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "",
    "keywords": "zope buildout TDD testing",
    "author": "Jordan Baker",
    "author_email": "jbb@scryent.com",
    "download_url": "https://files.pythonhosted.org/packages/77/af/7974c51701ffce7b26328701f473f14e1d84915ff21eadc1f27d9807a28d/roadrunner-0.2.3.1.tar.gz",
    "platform": "",
    "description": "Waiting for stuff sucks.\r\n\r\nroadrunner is a looping testrunner with environment preloading for test-driven\r\ndevelopment.  It makes integration testing with Plone much faster.\r\n\r\nCurrently it is focused around preloading a Plone environment but it could\r\nalso work for other frameworks as well.\r\n\r\nIt works by pre-loading Python code, setup of test layers and a default Plone\r\nsite. This is called the resident test environment.\r\n\r\nYour tests are run in a child process which gets a copy-on-write memory space.\r\n\r\nOther than that it pretty much works like the regular Zope testrunner.\r\n\r\nHow much faster is it?\r\n======================\r\n\r\nHere's an example. You are writing integration or functional tests for a Plone\r\napplication.\r\n\r\nOn this fairly current laptop it takes 25s to load Zope, Plone and setup a\r\nsample Plone site.\r\n\r\nAdd 5 seconds for the application load and test run for a total of 30 seconds.\r\n\r\nIf you are iterating on a functional test and want to quickly check your\r\nchanges that is too long to wait.\r\n\r\nUsing roadrunner you load the environment the first time.  Subsequent times\r\nyou run your test your total time will be only 5 seconds.\r\n\r\nYes, you can save 25 seconds every time you run your test.\r\n\r\nHow to use it?\r\n==============\r\n\r\nRoadrunner only currently works as part of a zc.buildout environment.\r\n\r\nThe easiest way to try it is to add it to an existing Plone 3 buildout.\r\n\r\nNow for a sample part.\r\n\r\nThis will create a new directory in parts named by the part containing a copy\r\nof your Zope instance environment but with the packages-under-test excluded\r\nfrom being loaded via ZCML by default.\r\n\r\n::\r\n\r\n  [roadrunner]\r\n  recipe = roadrunner:plone\r\n  packages-under-test = my.package\r\n  \r\nYou can also match several packages using simple globbing, eg: my.packages.*\r\n\r\nThe parameter 'zope2-instance' allows you to specify the name of the part\r\nwhich corresponds to the zope instance roadrunner will work against.  The\r\ndefault is 'instance'.\r\n\r\nBy default resident Plone site will be created. This should work in most\r\nsituations where you are installing add-on products that use install methods\r\nor GenericSetup profiles.\r\n\r\nsetup-plone=0 allows you to disable the Plone site setup optimization. You\r\nmight need to do this in certain situations where you are using the profile_id\r\nparameter.\r\n\r\nThen you can run roadrunner::\r\n\r\n  $ bin/roadrunner -s my.package\r\n  \r\nIt will preload Zope & Plone, then fork off the first testrunner. Once the\r\nfirst testrunner is complete you will receive the roadrunner prompt where\r\nyou launch additional tests.\r\n\r\nRecipe Options\r\n==============\r\n\r\nzope2-instance:\r\n\r\nThe zope2 instance to use for basing the installation on. Defaults \r\nto 'instance'.\r\n\r\nGotchas\r\n=======\r\n\r\n- roadrunner is still a bit experimental. If in doubt, check it with the\r\n  regular testrunner. If you find a difference please send some details\r\n  including traceback, product versions, buildout.cfg and your tests.\r\n\r\n- It may require you to change your test setup slightly if you haven't yet\r\n  already.\r\n\r\n  You'll be fine as long as you follow the standard sequence of importing your\r\n  product, loading its ZCML and then calling ztc.installProduct within an\r\n  @onsetup deferred method.\r\n  \r\n   This allows the loading of your product to occur in the child testrunner\r\n  process which critical that roadrunner does what its supposed to do.\r\n\r\n  For more details see an example here:\r\n\r\n    http://plone.org/documentation/tutorial/testing/writing-a-plonetestcase-unit-integration-test\r\n  \r\n- Because it preloads the Plone environment you won't be able to see changes\r\n  to the Core Plone components.  However, it should see all changes in your\r\n  application code which is what you will most likely be changing anyways.\r\n\r\nOther options to speed up Plone testing\r\n=======================================\r\n\r\nplone.reload is excellent to do exploratory testing and development.\r\n\r\nKnown Issues\r\n============\r\n\r\n- ZCML registrations lost.  This can occur if you run unit tests which employ\r\nPlacelessSetup.  A simple workaround is to avoid running unit tests and\r\nintegration tests together with roadrunner.  You can run them separately\r\nwithout issue.\r\n\r\nSource & Bug Tracker\r\n====================\r\n\r\nSource Code:\r\n\r\n  http://github.com/hexsprite/roadrunner\r\n\r\nTracker:\r\n\r\n  http://hexsprite.lighthouseapp.com/projects/21973-roadrunner\r\n\r\nTested With\r\n===========\r\n\r\nPlone 3.1.x Let me know if you get it working on anything else.\r\n\r\nHave also had reports of success with Plone 2.5.x\r\n\r\nAlso there are reports of success with Zope 2.9.8 and Plone 2.5.5.\r\n\r\nWindows is untested and probably does not work currently. Feedback and patches\r\naccepted.\r\n\r\nAuthor\r\n======\r\n\r\nSend questions, comments & bug reports to:\r\n\r\nJordan Baker <jbb@no_spam_plz_scryent.com>\r\n\r\nLicense\r\n=======\r\n\r\nLicensed under ZPL 2.1\r\nsee doc/LICENSE.txt\r\n\r\nChangelog\r\n---------\r\n\r\n0.2.3.1 (Jun 25, 2009)\r\n======================\r\n\r\n- Added a MANIFEST so this can be built by pythons without git support installed.\r\n\r\n0.2.3 (Jun 16, 2009)\r\n====================\r\n\r\n- Bug #4: OSX Core errors due to no exec after fork.\r\n\r\n- Bug #2: the roadrunner script was not being updated properly.  now when you\r\n  re-run buildout it will pickup new dependencies.\r\n\r\n0.2.2 (Jun 1, 2008)\r\n===================\r\n\r\nBugs Fixed:\r\n\r\n- zope2/lib/python was being placed at the very start of the path which didn't\r\n  allow newer eggs to be seen. Now placed at the end of sys.path.\r\n\r\nNew Features:\r\n\r\n- hack to reset terminal after you kill PDB. May need work for Windows.\r\n\r\n0.2.1 (May 26, 2008)\r\n====================\r\n\r\n- fixed bug in the buildout recipe that excluded Zope from the sys.path. Bug\r\n  crept in because of \"dirty\" python install. virtualenv --no-site-packages is\r\n  your friend.\r\n\r\n- removed an annoying child process message.\r\n\r\n0.2 (May 25, 2008)\r\n==================\r\n\r\n-  added a zc.buildout recipe to setup roadrunner with Plone\r\n\r\n-  fixed globbing for packages under test\r\n\r\n-  fixed child signal handling so you can reliably interrupt running tests\r\n   without killing the parent \r\n\r\n0.1  (May 18, 2008)\r\n===================\r\n\r\nInitial public version",
    "bugtrack_url": null,
    "license": "ZPL",
    "summary": "testrunner for test-driven development",
    "version": "0.2.3.1",
    "project_urls": null,
    "split_keywords": [
        "zope",
        "buildout",
        "tdd",
        "testing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b07237d9e8486edd39ae5d78439f9d49717ec01ec43c415d3658d9c8af1e648f",
                "md5": "a900a34dbad6dcd1a6e1deb8c29fc701",
                "sha256": "c52ee6160446e38a15c91407a8442a43b3b2b1b2a55b3d590812b1e5817d63ea"
            },
            "downloads": -1,
            "filename": "roadrunner-0.2.3.1-py2.4.egg",
            "has_sig": false,
            "md5_digest": "a900a34dbad6dcd1a6e1deb8c29fc701",
            "packagetype": "bdist_egg",
            "python_version": "2.4",
            "requires_python": null,
            "size": 62070,
            "upload_time": "2009-06-25T19:51:03",
            "upload_time_iso_8601": "2009-06-25T19:51:03.587873Z",
            "url": "https://files.pythonhosted.org/packages/b0/72/37d9e8486edd39ae5d78439f9d49717ec01ec43c415d3658d9c8af1e648f/roadrunner-0.2.3.1-py2.4.egg",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77af7974c51701ffce7b26328701f473f14e1d84915ff21eadc1f27d9807a28d",
                "md5": "90889b0084ffeeb71f06b9689e7deaab",
                "sha256": "8dcaa21db609f5b28fb7d16e21c28cf5d39c5508c0f804c4a729061af35f2de6"
            },
            "downloads": -1,
            "filename": "roadrunner-0.2.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "90889b0084ffeeb71f06b9689e7deaab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 31801,
            "upload_time": "2009-06-25T19:51:02",
            "upload_time_iso_8601": "2009-06-25T19:51:02.380373Z",
            "url": "https://files.pythonhosted.org/packages/77/af/7974c51701ffce7b26328701f473f14e1d84915ff21eadc1f27d9807a28d/roadrunner-0.2.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2009-06-25 19:51:02",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "roadrunner"
}
        
Elapsed time: 0.13029s