Changes

Jump to: navigation, search

Bugzilla:QA

222 bytes removed, 22:20, 11 March 2010
Cleaned up! General wordsmithing, including making text more clear & concise, and removing personal pronouns. No actual content was changed.
== Running Selenium scripts ==
Till Prior to Bugzilla 3.0.x2, Selenium tests were all written in HTML, which were the and executed from a web browser. It has been decided for As of Bugzilla 3.2 RC1 and newer to convert them they have been converted to Perl, giving us allowing more flexibility and control. We no longer write test scripts in HTML.
All our A read-only copy of the current Selenium scripts can be downloaded using bzr. For instance, to download Perl scripts for Bugzilla 3.6, typewith:
bzr co bzr://bzr.mozilla.org/bugzilla/qa/3.6
Other A read/write copy can also be downloaded with: bzr co bzr+ssh://''login''@bzr.mozilla.org/bugzilla/qa/3.6where ''login'' is your LDAP account. All available branches releases are listed [http://bzr.mozilla.org/bugzilla/qa/ here].
Users having write access '''Note:''' The HTML scripts to our bzr repository must use this command:work as is. They were based on a particular landfill installation which contained specific user accounts, products, components and parameters. bzr co bzr+ssh://your_login@bzrThus, they will not run on a fresh test installation.mozilla.org/bugzilla/qa/They are only available to show how the tests worked prior to Bugzilla 3.6where your_login is your LDAP account2.
'''Note:''' Do not expect the HTML scripts to work as isAs of Bugzilla 3. They were based on 2, a given test installation on landfill having some given user accountsscript named <em>config/generate_test_data.pl</em> will automatically populate new installations, products, components allowing the Selenium and parameters, and so they won't run on a fresh test installation. They are only available so that you can see what we did till Bugzilla 3.0WebService 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.
Bugzilla 3'''Note 2:''' Before executing <em>generate_test_data.2 and newer have a script named pl</em>, make sure the parameters in <em>config/generate_test_dataselenium_test.plconf</em> which populates your fresh new installation automatically so that you are set correctly. This configuration file must match the Bugzilla configuration, especially the ''urlbase'' parameter and the path to the browser ([http://seleniumhq.org/download/ Selenium RC 1.0.1] works with Firefox 3.5, but not with Firefox 3.6). If ''mail_delivery_method'' is set to '''Test''', fake user accounts can run our Selenium and WebService tests yourself on your own installationbe defined in the config file.
'''Note 1:''' your Bugzilla installation must already exists, and you must already have configured most important parameters (such as the urlbase, cookiepath, and mail_delivery_method* parameters (* set it to 'Test' ideally, unless you really want to get bugmail)). '''Note 2:''' Before running <em>generate_test_data.pl</em>, make sure that you set parameters in <em>config/selenium_test.conf</em> correctly. This configuration file must match your local configuration, especially the url to your installation (urlbase), as well as the path to your browser ([http://seleniumhq.org/download/ Selenium RC 1.0.1] works with Firefox 3.5, but not with Firefox 3.6). If you set mail_delivery_method to 'Test', you can define fake user accounts in the config file. Once the DB is populated, you can start the Selenium server and run our execute the scripts located in t/. To start the Selenium server, you can either run execute <em>config/selenium_server_start.t</em> (which requires the [http://search.cpan.org/~hisso/Alien-SeleniumRC/ Alien::SeleniumRC] Perl module to be installed) or you can typeenter:
java -jar /path/to/selenium-server.jar
which is exactly what Alien::SeleniumRC is doingdoes. If you didn't install Alien::SeleniumRCwas not installed, then you must extract <em>selenium-server.jar</em> from the [http://seleniumhq.org/download/ Selenium RC] ZIP file (generally, the JAR file provided by SeleniumRC is more recent than the one found in Alien::SeleniumRC). To run execute the scripts, go into the t/ directory and typeenter:
prove -v --timer *.t
-v will make the output verbose and --timer will display the time it takes to run execute each script. Both options are optional. Note that you must have the [http://search.cpan.org/~lukec/Test-WWW-Selenium/ Test::WWW::Selenium] Perl module must be installed in order to have for the scripts to run as it will be execute. It is the interface between Perl and Selenium!
== Writing Selenium scripts ==
1
edit

Navigation menu