# Configure browsers for testing

Verifier can run tests against one or many different browsers, individually or concurrently. The test server can be started ahead of the tests, to allow debugging with a particular browser. This article describes how to control and configure this behaviour.

## Running Verifier

When running Verifier from the command line it executes tests on a single instance of the default browser. Typing the command below runs all acceptance tests under the given directory. Progress information is displayed on the console and XML results are written to an output file.

Typing the following commands starts the browser but does not execute any tests. This provides the opportunity to interact with the browser directly using keyboard and mouse.

brjs test-server

## Configuring Browser Locations

The \$BRJS_HOME/conf/testrunner.conf configuration file controls which browsers are run. Edit this file and ensure that the path to (at least) the default browser in the browserPaths section is correct.

jsTestDriverJar: ../sdk/libs/java/testRunner/JsTestDriver.jar
portNumber: 4224
defaultBrowser: chrome

# browser paths which contain spaces may need to be wrapped in quote marks for certain operating systems
# browser paths can be either relative to this conf file or be an absolute path
# use $$after the end of the browser path and before any arguments you wish to add (e.g.$$--ARG to specify an argument)
# browser paths defined below are example locations, please update as necessary

browserPaths:
windows:
#       firefox: C:\Program Files\Mozilla Firefox\firefox.exe
#       ie: C:\Program Files\Internet Explorer\iexplore.exe
mac:
#       firefox: /Applications/Firefox.app/Contents/MacOS/firefox
#       safari: /Applications/Safari.app/Contents/MacOS/Safari
linux:
#       firefox: /usr/bin/firefox

## Targetting Different Browsers

To target different browsers an additional parameter is passed to the brjs test-server, or brjs test commands, as documented in the output of the brjs test help command.

Usage:
brjs test <dir> [<testType>] [-b browsers1,browsers2,...,browsersN ] [-
-report]
Help:
<dir>
the directory from which to start looking for tests

[<testType>]
(UTs|ATs|ALL) (default: ALL)

[-b browsers1,browsers2,...,browsersN ]
you can use ALL to specify that the tests should be run on all browsers

[--report]
if supplied, generate the HTML reports after running tests

The options to use for browsers1, browsers2, etc. are the labels used for each browser in the browserPaths section of the testrunner.conf file. i.e. Chrome, Firefox, Internet Explorer, etc. You can add additional labels with your own names (e.g. ie10) if you want to test against particular versions of a browser.