Unit Tests

admc edited this page Sep 13, 2010 · 3 revisions

Current UnitTests

The windmill unittests are broken up in to a few different sections. Each section requires it’s tests to be a run a little differently.

Local Tests

These tests mount the local_tests directory at /windmill-unittests/ in the windmill proxy. This way any html, javascript and css in this directory will be served up like it’s coming from any chosen remote domain.

Most of the windmill unittests that require the browser to be up are in here. You can run these tests with functest, nose, or windmill.

$ windmill test=. firefox -e
$ nosetests . --wmbrowser=firefox
$ functest browser=firefox

Internet Tests

These tests mount the local_tests directory at /windmill-unittests/ in the windmill proxy. This way any html, javascript and css in this directory will be served up like it’s coming from any chosen remote domain.

This directory is exclusively for tests that require domains outside of tutorial.getwindmill.com.

Test authors should be careful not to rely on sites that are complex or will change often instead tests should focus on verifying that certain domain switching operations are successful.

$ windmill test=. firefox ssl -e
$ nosetests . --wmbrowser=firefox --wmssl

JavaScript Tests

These are Windmill JavaScript tests that are used to test both the JavaScript test authoring API and the windmill internals that cannot be tested easily without useing JavaScript tests.

These tests must be run with the windmill binary

$ windmill jsdir=. firefox -e

Python Tests

These are Python tests that do not require a browser. The entire windmill service is started and stopped in the top level setup and teardown but these tests don’t require a browser to be active. You must run with functest or nose.

$ nosetests .

Framework Tests

These tests make a series of shell calls to test the external command line interfaces of the windmill binary, nose, functest, and django manage.py.

These tests take a long time to run and currently can only be started with functest.

$ functest browser=firefox