1
edit
(Cleaned up! General wordsmithing, including making text more clear & concise, and removing personal pronouns. No actual content was changed.) |
|||
Line 10: | Line 10: | ||
== Running Selenium scripts == | == 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 | 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 [http://bzr.mozilla.org/bugzilla/qa/ 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 <em>config/generate_test_data.pl</em> 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 <em>generate_test_data.pl</em>, make sure the parameters in <em>config/selenium_test.conf</em> 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 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 <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 enter: | |||
Once the DB is populated, | |||
java -jar /path/to/selenium-server.jar | java -jar /path/to/selenium-server.jar | ||
which is exactly what Alien::SeleniumRC | which is exactly what Alien::SeleniumRC does. If Alien::SeleniumRC was not installed, 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 execute the scripts, go into the t/ directory and enter: | ||
prove -v --timer *.t | prove -v --timer *.t | ||
-v will make the output verbose and --timer will display the time it takes to | -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 [http://search.cpan.org/~lukec/Test-WWW-Selenium/ 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 == | == Writing Selenium scripts == |
edit