Advanced configurations
JOSF has some settings configured, which are currently unavailable through the JOSF front-end app. To edit these, open the config.json
file and edit the options. These changes are applied, the next time JOSF is started.
Important runtime settings
The most important options are these;
Configuration option | Default value | Description |
http.port | 8090 | The port JOSF is running on. If this port is taken by some other process, change it in here and restart JOSF. After that, change the JOSF API URL in the JOSF preferences from the front-end. |
http.connection.timeout | 60000 | When calling an API, JOSF takes this many milliseconds to wait for a timeout from the service |
http.socket.timeout | 60000 | When calling an API which is online, JOSF takes this many milliseconds to download the response. |
showObjectTimeout | 15 | JOSF’s retry mechanism will perform any action, until it either reaches a PASS or INFO result and will retry otherwise with a maximum duration of these many seconds. If you have trouble finding objects during your test case execution, increase this number. Note that even though the default value is set to 15, since JOSF 2.1 this setting is set to 2 seconds. The default value will only be used, when no value is given through the config.json file. |
pageLoadTimeout | 10 | JOSF will wait for pages to load, this many seconds before returning an ERROR. |
setScriptTimeout | 15 | You can execute JavaScript snippets by some of JOSF’s actions. If the execution of that JavaScript exceeds this many seconds, JOSF will return an ERROR. |
downloadDrivers | true | Toggles whether JOSF automatically downloads the correct webbrowser drivers into the web-drivers directory. Note: When set to false, make sure you manually place the drivers in the web-drivers directory. |
Note that these settings are stored in a JSON formatted file, and when this format gets corrupt, JOSF will not be able to interpret these and will fall back to its default values.
Directory settings
The other settings will be more about where JOSF stores its data. If required, this can be adjusted to your systems required paths.
"actionPackPath": "../action-packs",
Deprecated settings
These settings were used in previous versions of JOSF and are no longer used.
"basePath": "C:/Program Files/JOSF",
"FormatDateTime": "yyyy-MM-dd'T'HH:mm:ss",
"FormatTime": "kk:mm:ss",
"FormatDate": "dd-MM-yyyy",
"DriverListPath": "src/main/conf/driver-list.json",
"environmentDirectory": "../testcases/environments",
"gherkinDirectory": "../testcases/gherkin/features",
"stepDefinitionDirectory": "../testcases/gherkin/step-definitions",
"testCaseDirectory": "../testcases/traditional",
"apiHostDirectory": "../testcases/apis/hosts",
"apiResourceDirectory": "../testcases/apis/resources",
"apiRequestDirectory": "../testcases/apis/requests",
"pageObjectDirectory": "../testcases/page-objects",
"dataDrivenStorageDirectory": "../testcases/data-driven-storage",
"dataDrivenLinksDirectory": "../testcases/data-driven-storage/links",
"settingsDirectory": "../testcases/settings",
"playBookDirectory": "../testcases/play-books"