Diff for "Windmill"

Not logged in - Log In / Register

Differences between revisions 1 and 2
Revision 1 as of 2009-02-11 21:44:24
Size: 1748
Editor: flacoste
Comment:
Revision 2 as of 2009-02-12 21:08:52
Size: 2248
Editor: flacoste
Comment:
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
   '''Note that it is not currently possible to run all the tests like that because of a bug/limitation in Windmill.'''
   You need to run each tests starting at the correct vhost. So for bugs tests, you'd use:

   {{{
$ ./lp-windmill.py -t lib/canonical/launchpad/windmill/tests/test_bugs firefox http://bugs.launchpad.dev:8085
}}}

   and for registry, you'd use:

   {{{
$ ./lp-windmill.py -t lib/canonical/launchpad/windmill/tests/test_registry firefox http://launchpad.dev:8085
}}}

Windmill for JS Integration Tests

For integration testing that covers JS workflows, our tool of choice is Windmill.

How is Windmill integrated?

There is a script called lp-windmill.py in the top-level directory. This is a wrapper around the windmill main script which starts a Launchpad server on port 8085 locally with a fresh database (including all of the standard tests sample data).

The windmill process is then fired off with the command line argument.

So if you want to run all the tests you'd typically use:

  • $ ./lp-windmill.py -t lib/canonical/launchpad/windmill/tests firefox http://launchpad.dev:8085

    Note that it is not currently possible to run all the tests like that because of a bug/limitation in Windmill. You need to run each tests starting at the correct vhost. So for bugs tests, you'd use:

    $ ./lp-windmill.py -t lib/canonical/launchpad/windmill/tests/test_bugs firefox http://bugs.launchpad.dev:8085
    and for registry, you'd use:
    $ ./lp-windmill.py -t lib/canonical/launchpad/windmill/tests/test_registry firefox http://launchpad.dev:8085

For interactive test running and development, it's usually more convenient to run the Launchpad server separately:

  • $ ./lp-windmill.py --server-only

And then fire off a windmill session using the normal command:

  • $ ./utilities/windmill.py shell firefox http://launchpad.dev:8085

That way you can restart windmill, without having to wait for the Launchpad restart cycle.

See the help page on the shell environment.

How are the tests organized

Tests written in python are rooted at lib/canonical/launchpad/windmill/tests.

Tests are divided by applications and then subdivided by workflows.

Tests using the JS API are in lib/canonical/launchpad/windmill/jstests.

External resources

Windmill (last edited 2011-09-23 13:49:05 by gary)