-
Notifications
You must be signed in to change notification settings - Fork 11
Neodymium configuration properties
Neodymium combines a couple of frameworks that all have their own configuration needs which also effects test execution. Most of these properties can be defined/overwritten with environment variables. However since this is an awkward way of configuration we introduced the file: config/neodymium.properties
The file contains a collection of properties that is used to configure some aspects of the used frameworks. It doesn't cover all of the possible configurations for all the frameworks we've integrated.
Have a look at this file since it lists all supported properties as well as their default values and its purpose.
We use Owner a framework to write powerful and flexible properties without in order to avoid writing all the boilerplate code. If you are in need of your own set of global properties we encourage you to give Owner a try.
The following properties can be configured in the config/neodymium.properties
file. Those properties can be accessed via Neodymium.configuration().[propertyGetterMethod]()
.
Property | Default value | Description |
---|---|---|
neodymium.url | <none> | The URL of the web site to test |
neodymium.url.protocol | <none> | The protocol used to access the site |
neodymium.url.host | <none> | The host encoded in the URL |
neodymium.url.path | / | The path on the site that is used as test entry point |
neodymium.url.site | <none> | The site/channel part of the url |
Property | Default value | Description |
---|---|---|
neodymium.locale | en_US | The locale that should be used to lookup translations in localization feature |
neodymium.localization.file | config/localization.yaml | Path to the YAML formatted file that contains localized (translated) data for the site |
Property | Description |
---|---|
neodymium.basicauth.username | Username that should be used for basic authentification |
neodymium.basicauth.password | Password that should be used for basic authentification |
Property | Default value | Description |
---|---|---|
neodymium.selenide.timeout | 3000 (ms) | How long should Selenide wait to match a condition |
Property | Default value | Description |
---|---|---|
neodymium.debugUtils.highlight | false | Should elements highlighted that are selected by Selenide |
neodymium.debugUtils.highlight.duration | 100 (ms) | How long should an element be highlighted |
neodymium.junit.viewmode | tree | How to display test execution in Eclipse JUnit view. tree - a hierarchical representation, flat - a flat list of tests |
Responsive design breakpoints. Determines at which page width a site is considered to be displayed on a small, medium, large oder extra large device.
Property | Default value | Description |
---|---|---|
neodymium.context.device.breakpoint.small | 544 (pixel) | Maximum browser width for small devices (0 - 544) |
neodymium.context.device.breakpoint.medium | 769 (pixel) | Maximum browser width for medium devices (545 - 769) |
neodymium.context.device.breakpoint.large | 992 (pixel) | Maximum browser width for large devices (770 - 992) |
neodymium.context.device.breakpoint.xlarge | 1200 (pixel) | Maximum browser width for extra large devices (993 - 1200) |
Property | Default value | Description |
---|---|---|
neodymium.javaScriptUtils.timeout | 2000 (ms) | The amount of time to wait until JavaScript is considered to finished execution. Used by "until" function of JavaScriptUtils. |
neodymium.javaScriptUtils.pollingInterval | 200 | The interval at which "until" function checks whether conditions are fulfilled. |
neodymium.javaScriptUtils.jQueryIsRequired | true | Indicates that jQuery must be on the page and available in order to count the site as loaded. |
neodymium.javaScriptUtils.loading.animationSelector | Designed to select a loading animation to indicate if site loading has finished or not. |
HTTP proxy settings. Specify host and port of the proxy server and whether it should be used at all. If the proxy requires user authentication, make sure to provide the credentials needed. You may also configure a comma separated list of hosts that can be used directly, thus bypassing the proxy. Note that the host definitions are interpreted as regular expressions so ensure proper use of escape characters. Beside the config/neodymium.properties
file the proxy configuration can be also be configured within a config/proxy.properties
file. In case you need a separate file for CI environments.
Property | Description |
---|---|
neodymium.proxy | Decide whether or not a proxy is used (Default: false) |
neodymium.proxy.host | The host of the proxy |
neodymium.proxy.port | The host of the proxy |
neodymium.proxy.bypassForHosts | The host of the proxy |
neodymium.proxy.socket.userName | The socket username of the proxy |
neodymium.proxy.socket.password | The socket password of the proxy |
neodymium.proxy.socket.version | The socket version of the proxy |
The browser behavior describes how the browser in general conducts during test. There are a couple of properties that you can use to alter that.
Property | Description |
---|---|
neodymium.webDriver.reuseDriver | a boolean property indicating whether to use a single driver instance for all tests (defaults to false) |
neodymium.webDriver.keepBrowserOpen | a boolean property indicating whether to keep browser open after test has finishedNOTE: The WebDriver process might stay alive even if you close the browser afterwards |
neodymium.webDriver.keepBrowserOpenOnFailure | a boolean property indicating whether to keep the browser instance open only if the test failsNOTE: The WebDriver process might stay alive even if you close the browser afterwards |
neodymium.webDriver.firefox.legacyMode | a boolean property indicating whether to run Firefox WebDrivers in "legacy" modeNote: The legacy mode does not work with Firefox 48+. Use Firefox 45 ESR |
Since we support plattforms like SauceLabs and BrowserStack there is a need to store credentials to access their service. In order to use these service you need to provide an URL as well as credentials to access. Both platforms use Selenium Grid protocol which is used to remote control a web browser in the cloud. You can also setup your own browser cloud with Selenium Grid.
Look at the credentials template. It's designed for accessing only browser automation services which usually use an URL, username and a password respective access key. These credentials are needed to access the services that allow you to use remote browser to execute your tests. SauceLabs usually doesn't use a password. They use an access key which is different from your password and which can be accessed through their web site. So keep that in mind if you want to use such services.
In the example below there is an Firefox configuration that references the SauceLabs account from credentials file. The connection is made by the key pattern of the credentials file. browserprofile.testEnvironment.saucelabs.*
defines a test environment named saucelabs
which can be referenced in the browser settings as a testEnvironment
. That actually means that in order to create that particular web driver defined in browser.properties
the information from credentials.properties
will be taken into account.
Note: There is only a credentials.properties.template
file which needs to be renamed to credentials.properties
config/credentials.properties
## Sauce Labs Credentials
browserprofile.testEnvironment.saucelabs.url = https://ondemand.saucelabs.com:443/wd/hub
browserprofile.testEnvironment.saucelabs.username = MyAccount
browserprofile.testEnvironment.saucelabs.password = secret
config/browser.properties
browserprofile.FF_1024x768.name = Firefox
browserprofile.FF_1024x768.browser = firefox
browserprofile.FF_1024x768.browserResolution = 1024x768
browserprofile.FF_1024x768.testEnvironment = saucelabs
Overview
Neodymium features
- Neodymium configuration properties
- Neodymium context
- Utility classes
- Test data provider
- Test Environments
- Multi browser support
- Applitools Plugin
- Localization
- Highlight and Wait
- Advanced Screenshots
- Seperate Browser Sessions for Setup and Cleanup
Best practices and used frameworks
Special