Multibrowser

Configure and run tests across multiple browsers and devices.

Neodymium supports testing across a range of browsers, including Firefox, Chrome, Internet Explorer, Safari, and mobile devices such as Android, iPhone, and iPad.

Configuration

To configure these browsers, create a browser.properties file in the config directory at the project root.

All browser configurations must adhere to the naming convention: browserprofile.<browserId>.<property> = <value>

In this example, Chrome and Firefox are configured with specific resolutions and arguments:

# A local Chrome with a small window size
browserprofile.Chrome_1200x768.name=Chrome 1200x768
browserprofile.Chrome_1200x768.browser=chrome
browserprofile.Chrome_1200x768.browserResolution=1200x768
browserprofile.Chrome_1200x768.arguments=-ignore-certificate-errors; --remote-allow-origins=*

# A local Firefox with a small window size
browserprofile.Firefox_1200x768.name=Firefox 1200x768
browserprofile.Firefox_1200x768.browser=firefox
browserprofile.Firefox_1200x768.browserResolution=1200x768
browserprofile.Firefox_1200x768.headless=false

Common Properties

PropertyDescription
nameName of the browser in the report (required).
browserBrowser to use, e.g., chrome or firefox (required).
browserResolutionResolution of the browser window (e.g., 1200x768).
argumentsOptional browser arguments (e.g., -ignore-certificate-errors).
acceptInsecureCertificatesWhether the driver accepts insecure certificates.
headlessDefines if the browser should run in headless mode.

For a complete list of properties, see the Configurations page.

Running Tests

To utilize the browsers defined in browser.properties, use the @Browser("<browserId>") annotation.

If no tests are annotated, the default Neodymium browser is used. To execute all tests with every configured browser, you can annotate the AbstractTest class with @Browser("<browserId>") for each browser.

import com.xceptance.neodymium.common.browser.Browser;
import com.xceptance.neodymium.util.Neodymium;
import org.junit.jupiter.api.BeforeEach;

@Browser("Chrome_1200x768")
@Browser("Firefox_1200x768")
public abstract class AbstractTest
{
    ...
}

Individual test methods within a class can also be run with different browsers by annotating them specifically.

Running all tests will now result in the following report, showing execution across the configured browsers.

Multibrowser report.

Last modified December 16, 2025: fix image links (4abbede9)