Web Testing/Automation/UnittestZero: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with "=UnittestZero= ==What is it?== UnittestZero, named after the Zero calorie drinks, is just a very basic assertion Framework. It creates a DSL over the standard assert methods bui...")
 
Line 5: Line 5:


==Why We Use it?==
==Why We Use it?==
WebQA Automation Team was using Nose and wanted start running tests in parallel. Nose is very good at running tests in parallel but unfortunately due to issues with Nose architecture it can't report correctly.
This lead to looking into other tools and David Burns suggested Py.Test since he uses that on the Selenium Browser Automation Tool. This was great at running tests in parallel with a Xdist plugin and can still report correctly. This is great for our Jenkins instance.
We also found we can then extend the test runner, which is used in projects, to add command line arguments to run the tests. This has the side affect that we lose the limited support for unittest by Py.Test.
Our tests can not inherit from unittest.TestCase when we are using conftest.py in our tests. This mean we lose the self.assert* methods. To get around this, UnittestZero was created so our tests still have the readability of the old unittest methods.

Revision as of 18:49, 20 May 2011

UnittestZero

What is it?

UnittestZero, named after the Zero calorie drinks, is just a very basic assertion Framework. It creates a DSL over the standard assert methods built into Python to do the asserts and return messages.

Why We Use it?

WebQA Automation Team was using Nose and wanted start running tests in parallel. Nose is very good at running tests in parallel but unfortunately due to issues with Nose architecture it can't report correctly.

This lead to looking into other tools and David Burns suggested Py.Test since he uses that on the Selenium Browser Automation Tool. This was great at running tests in parallel with a Xdist plugin and can still report correctly. This is great for our Jenkins instance.

We also found we can then extend the test runner, which is used in projects, to add command line arguments to run the tests. This has the side affect that we lose the limited support for unittest by Py.Test.

Our tests can not inherit from unittest.TestCase when we are using conftest.py in our tests. This mean we lose the self.assert* methods. To get around this, UnittestZero was created so our tests still have the readability of the old unittest methods.