Bugzilla:QA
QA team
The QA team was created on July 11, 2005, two days after the release of Bugzilla 2.18.3, to improve the quality of future releases. Bugzilla 2.20, which was released two months later, became our most stable version ever released, with many security bugs fixed. This result has been possible partly thanks to the hard work done by the QA team which found several tens of bugs. But all the testing has been done manually, which required both a lot of time and a lot of people (the QA team had less than 10 members) to test the most important features of Bugzilla.
As repeating the same tests manually again and again for each new release quickly became boring, we decided to automate the process as much as possible using Selenium. For Bugzilla 2.20.x, 2.22.x and 3.0.x, we used test installations on landfill, which are using HTML Selenium scripts. Since Bugzilla 3.2 RC1, the QA team uses Perl Selenium scripts, which offer many advantages over their HTML equivalent.
How to contribute?
As Selenium cannot do everything, and because someone has to write these scripts anyway, we are always looking for new testers. If you are interested in helping us making Bugzilla better and more stable, feel free to join us. The best way to start is to join us in the #qa-bugzilla channel on IRC, or to write to qa@bugzilla.org telling us that you are interested in contributing. Of course, you can also report bugs you discover to b.m.o directly. If you want to help with automated tests, you are highly encouraged to read below, and download our existing test scripts.
Since mid-2006, the QA team uses a Testopia installation (basically, Bugzilla with the Testopia extension) to track testing progress and to let us easily manage remaining tests to do. That's a great tool to help us work efficiently, avoiding testing what has already been (automatically) tested. We still run some tests manually, despite more and more of them are converted to Selenium scripts (and to be honest, the number of tests to run manually now is close to zero). If you don't know how to write Selenium scripts, you can still help us either by writing new testcases, or by running existing ones manually. If you prefer to write Selenium scripts, that's even better!
Running Selenium scripts
Prior to Bugzilla 3.2, Selenium tests were all written in HTML and executed from a web browser. As of Bugzilla 3.2 RC1 they have been converted to Perl, allowing more flexibility and control.
A read-only copy of the current Selenium scripts can be downloaded using bzr with:
bzr co bzr://bzr.mozilla.org/bugzilla/qa/3.6
A read/write copy can also be downloaded with:
bzr co bzr+ssh://login@bzr.mozilla.org/bugzilla/qa/3.6
where login is your LDAP account. All available releases are listed here.
Note: The HTML scripts to work as is. They were based on a particular landfill installation which contained specific user accounts, products, components and parameters. Thus, they will not run on a fresh test installation. They are only available to show how the tests worked prior to Bugzilla 3.2.
As of Bugzilla 3.2, a script named config/generate_test_data.pl will automatically populate new installations, allowing the Selenium and WebService tests to be executed.
Note 1: The Bugzilla installation to test must already exist, and must already have its important parameters configured (i.e. urlbase, cookiepath, and mail_delivery_method). It is recommended that mail_delivery_method be set to Test, unless "actual" bug mail is desired.
Note 2: Before executing generate_test_data.pl, make sure the parameters in config/selenium_test.conf are set correctly. This configuration file must match the Bugzilla configuration, especially the urlbase parameter and the path to the browser (Selenium RC 1.0.3 and 2.0 work with Firefox 3.6). If mail_delivery_method is set to Test, fake user accounts can be defined in the config file.
Once the DB is populated, start the Selenium server and execute the scripts in t/. To start the Selenium server, either execute config/selenium_server_start.t (which requires the Alien::SeleniumRC Perl module to be installed) or enter:
java -jar /path/to/selenium-server.jar
which is exactly what Alien::SeleniumRC does. If Alien::SeleniumRC was not installed, extract selenium-server.jar from the Selenium RC ZIP file (generally, the JAR file provided by SeleniumRC is more recent than the one found in Alien::SeleniumRC). To execute the scripts, go into the t/ directory and enter:
prove -v --timer *.t
-v will make the output verbose and --timer will display the time it takes to execute each script. Both options are optional. Note that the Test::WWW::Selenium Perl module must be installed in order for the scripts to execute. It is the interface between Perl and Selenium!
Writing Selenium scripts
The fastest way to write new Selenium scripts is to use the Selenium IDE extension for Firefox. It records all your actions and converts them into a valid Selenium script. You can also write Selenium scripts manually with a text editor, but this is longer and can be pretty painful.
Each command is of the form $sel->command_name_ok('field', 'value', 'description'), where $sel is the test object created by Test::WWW::Selenium. The description is optional, but may give some useful information. All available commands are listed here, and are fully documented.
Selenium scripts being under development/review can be found here. Those shouldn't be considered as "safe" till they are available via bzr. There are also many other bugs which need a test. You can pick one of them and write a test, either by improving one of the existing tests, or by writing a completely new one. If you want to submit a script, please file it here, which is the Bugzilla installation used by the QA team.