User Manual

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Setting up a webserver ready for bromine

1. Bromine is a web application written in PHP/MySQL.

2. To run it, you will need a web server with PHP, and a MySQL database server
running. If you're new to this we recommend xampp 1.7.1 (newer versions may
result in warnings).

3. Once you have installed the above prerequisites, you need to edit the php.ini. If
using xampp, php.ini is located at xampp\php

4. As you might know, Selenium tests can run for a long time, so we need to make PHP
allow long running times.

5. Find the line that starts with max_execution_time, and set it too a number higher
than 60000, like: max_execution_time = 60001

6. Find the line that starts with max_input_time, and set it too a number higher than
60000, like: max_input_time = 60001

7. You'll also need to turn off magic_quotes_gpc in the same file: magic_quotes_gpc =
Off

8. You also need to have mod_rewrite enabled. Find your apache configuration file (if
using xampp this is xampp\apache\conf\httpd.conf) and uncomment the line

LoadModule rewrite_module modules/mod_rewrite.so

9. You will also need to Allowoveride to All for the webroot, see below example:

<Directory /var/www/>

Options Indexes FollowSymLinks MultiViews

AllowOverride All

Order allow,deny

allow from all


</Directory>

10. If you want to run PHP tests you'll need to have the php executable (on Windows,
php.exe) in your path environment variable.

11. If you want to run Java tests you'll need to have the Java executable in your path
environment variable.

12. For MySQL you need to have a user with privileges to create and modify tables.

Installing Bromine

1. Unpack and copy all files to your webroot. Bromine must be served directly from the
webroot!
2. If you are using XAMPP this is the C:\xammp\htdocs directory.
3. the file structure should be:

htdocs/

 cake
 app
 IDE-Formats
 vendors
 .htaccess
 index.php

4. If you don't want to pollute your webroot you need to setup a virtual host

5. Now open <yourservername> (eg. http://localhost) in a browser.

6. Fill in the form:

 Username: Name of mysql user ('root' if using unmodified xampp)

 Database: Name of database to hold the Bromine tables

 Password: Password for the mysql user (empty if using unmodified xampp)

 Host: Usually 'localhost'

 Bromine Username
 Password

7. And submit through the installer

8. You should get a message saying 'Install complete'

9. Now go to <yourservername> (eg. http://localhost)

10. You should see a login form. Login with Bromine username and password.

Setting up Bromine for running tests

1. Download and extract Selenium RC


2. Start the selenium RC server by executing “java -jar selenium-server.jar” in the
directory containing selenium-server.jar
3. Login to Bromine
4. Go to the control panel
5. Go to Nodes
6. Click New node
7. Fill in the IP and port in Nodepath, with the IP being the IP the selenium RC server is
running on, and the port being the port the server is running on (eg. 127.0.0.1:4444
if it's running on the default port on your own machine)
8. Select the operating system and browsers that are installed on the machine the
server is running on (hold down ctrl to select multiple)
9. Press submit
10. Verify that there is a green checkmark to the left of the node, meaning that Bromine
found the RC server. If it's red apply your normal network debugging routines (e.g.
make sure the IP is correct, and that no firewall is blocking that port etc.)
11. Done. Bromine will now use this RC server to run tests on if it has the right
OS/browser combinations

Creating a test script

Preparing selenium IDE

1. Install selenium IDE.


2. Goto <webroot>/IDE-formats and open BR3-java.txt or BR3-php.txt in a text-editor. Copy
everything (ctrl-a, ctrl-c).
3. Open selenium IDE.
4. Select options → options
5. Select Formats → Add
6. Type in a name, eg. BR3 java or BR3 php
7. Overwrite everything (ctrl-a, ctrl-v)
8. Click OK
Record and export

1. Record a test, just as you would normally


2. Select file \→ export test case as \→ BR3 java or BR3 php
3. Save the file somewhere

If Java: Compile

If you've just exported as java you need to compile the test into an executable .jar file before
uploading.

Basically you need to

1. Add the 4 jars found under <webroot>/app/webroot/testscripts/Google sample/jar/lib as


libraries
2. Create a class with your code and set it as the main class
3. Compile

Upload in Bromine

1. Login to Bromine
2. Go to planning
3. Click a testcase
4. Click edit
5. Click upload testscript
6. Select the file
7. Click submit

Planning

Planning is where you plan all your testing activities, meaning you setup your requirements
and testcases.
Projects Everything belongs to a project. Projects have multiple users attached to them.
Projects have multiple sites attached to them. Sites are the various URLs that the project uses
eg. developement/production URLs. Add/edit the sites by editing the project.
Requirements work as containers for testcases as well as other sub-requirements. You can
add requirements from the Planning menu. You can manage requirements structure by
clicking 'Manage requirements' which will enable you to drag 'n drop them on to each other,
making them sub-requirements of each other. Requirements contain the OS/browser
combinations that contained testcases will be run in.
Testcases should be the humanly readable test of some functionality. A testcase can have a
single testscript attached to it. Attach the testscript by using the upload testscript
functionality. Testcases can have steps attached to them. Steps are a step by step description
of the test, eg. open google.com, google.com opens. Add/edit steps when editing the testcase.
Testcases must be linked to a requirement. A single testcase can be linked to multiple
requirements. Use the 'Manage testcases' link to drag 'n drop testcases to the requirements
they should be linked to.

Testlabs

Testlabs is where you review results and run your testscripts.

Results are always based on the newest run, and a 'parent' will inherit the worst results from
it's children, meaning that if a subrequirement has any failed testcases the parent requirement
will be marked as failed.

Entire requirements can be run. This will run all it's linked testcases in all available
OS/browser combinations. This will not run any sub-requirements. eg. A requirement has 3
defined OS/browser combinations: Vista/FF3, XP/FF2 and Vista/IE7 and 3 linked testcases.
There are however no nodes online running XP, so the 3 testcases will each be run in
Vista/FF3 and Vista/IE7; 6 runs in total.

Single Testcases can be run, which will run the testcase in all available OS/browser
combinations. Note that it's the most immediate parent requirement that defines what
OS/browser combinations the testcase should be run in. Eg. requirement 1 has
subrequirement 1.1. requirement 1 has the following OS/browser combinations defined:
Vista/FF3, Vista/IE7, but 1.1 only has: Vista/FF3. Any testcases linked to requirement 1.1
will only be run in Vista/FF3

Control Panel

Control panel is where you configure Bromine. You shouldn't need to spend much time here
once Bromine has been setup.

Projects add/edit/delete projects here. Projects has many requirements, testcases, users, sites
and results

Nodes add/edit/delete nodes here. Nodes are the RC servers Bromine runs testscripts on.
Nodes has many browsers and has one operating system

Browsers add/edit/delete browsers here. Name is the humanly readable form, eg. firefox,
path is the selenium command to open the browser, eg. *firefox

Operating systems add/edit/delete operating systems here. You can use operating systems
more loosely if you like to provide more nitty-gritty environment definitions for your tests to
be run on. eg. “XP with service pack. 1” or “Vista quad core” or “XP javascript disabled”.

Types add/edit/delete types here. Types are used for putting together the commands that
executes the tests. eg. when running a php test Bromine will use the info from types to put
together a correct string to be run in the commandline. You shouldn't need to change this.
Users add/edit/delete users here. User belongs to group.

Groups add/edit/delete groups here. Groups can be used to set permissions on a larger scale
than user-specificly

Manage access Use this to set permissions for users/groups.

State of the system Use this to check for the most common errors when using Bromine, eg.
not having write permissions to various folders and such

Logging Bromine can log every request made, logging User, request ,time and IP adress.
This is for you paranoid admins.

Plugins Install/uninstall, activate/deactivate plugins here. Installed and activated plugins can
be accessed from a plugins menu.

You might also like