Simple preferences
JOSF comes with a few ways to configure it to your specific situation. There are two types of configuration; the simple preferences, which holds the base URL of your application, environments and configured browsers. Next to that, there is a configuration file which holds more advanced settings that you can tailor to your needs.
Simple preferences
When opening the preferences, the settings are divided in three tabs.
Project
In this tab, you can view and configure the project level preferences
Project settings
The location and name of this project.
JOSF licence
When applying or updating your JOSF pro licence, upload it here.
Version control (GIT)
The Version control settings and credentials. For more information about version control, click here.
Environments
If you’ve ever come across the question; can I run the tests on our development environment as well? Then the environments settings is the place for you.
Add environments with variables that can be used all throughout JOSF. User name / password combinations are not always equal in two different environments. Add those variables to your environments and you use those variables in your test cases, instead of the hard-coded values. This way, when your data changes, you’ll will only need to change them from the environments settings.
Browsers
Base URL
The Base URL is the URL of your application under test. It is the first thing JOSF opens when you open a browser, so that means that you won’t need to navigate to that URL in each specific test case, but manage the base URL from this location.
Note that the Base URL accepts variables. We recommend adding an environment which holds a base URL
variable. This way, switching from environments, will also change the base URL that JOSF uses.
Configuration
The preconfigured browsers should work great most of the time, but if you are planning to use some more exotic browsers, or other platforms to run your tests on, you can change these settings here.
Switching to another browser is easy, by toggling either the pre-configured Remote Firefox, Remote Internet Explorer or Remote Chrome options. If you’ve configured JOSF CLI, then Headless Chrome is also an available option to execute your tests in.
Download latest browser drivers
It could happen that your local browser drivers are outdated. When this happens, press the Download drivers button for each browser type to redownload the latest drivers and your testing can continue.
Note that JOSF also redownloads the correct drivers on JOSF startup.
Cloud web driver providers
JOSF also supports different types of cloud web driver providers. One of those cloud web driver providers is Sauce Labs.
To use Sauce Labs with JOSF, login to your Sauce Labs account, open your user settings and find the Driver Creation section. Copy your Driver Creation URL and head back to JOSF.
In the Browsers tab, open the Cloud web driver provides pane and paste your Driver Creation URL in the connection string field. JOSF will extract the required User name, access token and data center fields.
Once saved, you can add Sauce Labs configurations, by pressing the Add configuration in the Sauce Labs pane. Give your web driver a meaningful name, and head over to the Sauce Labs platform configurator at https://saucelabs.com/platform/platform-configurator, select the desired platform, and make sure the config script is set to node.js and W3C. A good practice, is to also select the desired resolution. An example could be;
capabilities = {
browserName: 'chrome',
browserVersion: 'latest',
platformName: 'Windows 10',
'sauce:options': {
screenResolution: '1920x1440',
}
}
Then press the Copy to clipboard, head over to JOSF and press ‘Paste configuration from clipboard’. JOSF will translate it into the accepted format, like so;
{
"browserName": "chrome",
"browserVersion": "latest",
"platformName": "Windows 10",
"sauce:options": {
"screenResolution": "1920x1440"
}
}
Make sure you’ve selected your web driver from the pane to be active, and now you can start using Sauce Labs with JOSF.
Manual configuration / trouble shooting
If for some reason the copy-paste configuration is not working, you can then type in the required configuration manually. The accepted format of configuration looks like this;
{
"browserName": "chrome",
"browserVersion": "latest",
"platformName": "Windows 10",
"sauce:options": {
"screenResolution": "1920x1440"
}
}
Security
From the security settings tab, you can configure JOSF to use a proxy and upload certificates or to skip SSL checking entirely.
Proxy settings
If JOSF is running in an environment where specific proxy settings are required, toggle manual proxy and enter the proxy IP address and port number.
Some proxies require credentials. If so, enable the credentials toggle and enter your credentials.
Certificates
When your application under test requires a specific certificate, which is not installed on your machine, you can add it from the certificate settings. To add it to JOSF, click on the file picker to select a certificate and upload it to JOSF.
Previously added certificates will be shown as a list and can be removed from JOSF.
Skip SSL check
If you need JOSF to skip SSL validation/certificate checks, toggle on the Trust all certificates setting.
Advanced certificate configuration
Certificates are added to the running JRE keystore, which is password protected. If for any reason you are required to edit this keystore, you can do so from the Advanced certificate configuration. Most times these settings are correct and do not need to be changed.
Do not change any of the Advanced certificate configuration unless you are completely sure about the settings, or use these default settings;
- password: changeit
- certificate keystore type: jks
Note that on JOSF startup, it will (re)enable all the certificates that you’ve added. This is required for JOSF CLI stand-alone runs, as tests might run on other locations than your machine e.g. when running it from a remote CI/CD pipeline or a virtual machine.