Skip to content

Commit

Permalink
adding missing default properties
Browse files Browse the repository at this point in the history
  • Loading branch information
MohabMohie committed Aug 22, 2019
1 parent 5f9d6c4 commit 860f9b7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<selenium.version>4.0.0-alpha-2</selenium.version>
<webdrivermanager.version>3.6.2</webdrivermanager.version>
<allure-testng.version>2.12.1</allure-testng.version>
<allure-testng.version>2.12.1</allure-testng.version> <!-- UPDATE PropertiesFileManager.setPathProperties -->
<aspectj.version>1.8.10</aspectj.version> <!-- DO NOT UPDATE -->

<rest-assured.version>4.0.0</rest-assured.version>
Expand Down Expand Up @@ -282,7 +282,6 @@
<shaftEngineVersion>${shaft_engine.version}</shaftEngineVersion>
<propertiesFolderPath>${propertiesFolderPath}</propertiesFolderPath>
<propertiesFolderPath_jenkins>${propertiesFolderPath_jenkins}</propertiesFolderPath_jenkins>
<allureVersion>${allure-testng.version}</allureVersion>
</systemPropertyVariables>
<!-- To continue execution after validation errors are thrown in the
before method -->
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/shaft/tools/io/PropertiesFileManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ private static void overrideTargetOperatingSystemForLocalExecution() {
private static void setDefaultProperties() {
Properties properties = new Properties();
// read default properties

// TODO: Refactor to read from bundled properties files
properties.putAll(setDefaultExecutionProperties());
properties.putAll(setPathProperties());
properties.putAll(setPatternProperties());
Expand Down Expand Up @@ -164,6 +166,15 @@ private static Properties setDefaultExecutionProperties() {
properties.put("databaseQueryTimeout", "60");
// Timeout in seconds to be used when attempting to execute a query on a
// database (1 minute = 60 seconds)

properties.put("apiSocketTimeout", "60");
// Timeout in seconds between two consecutive data packets in seconds
properties.put("apiConnectionTimeout", "60");
// Timeout in seconds to wait for until a connection is established
properties.put("apiConnectionManagerTimeout", "60");
// Timeout in seconds to wait for an available connection from the connection
// manager/pool (1 minute = 60 seconds)

properties.put("autoMaximizeBrowserWindow", "true");
// true | false
properties.put("forceCheckForElementVisibility", "true");
Expand Down Expand Up @@ -226,6 +237,7 @@ private static Properties setPathProperties() {
properties.put("watermarkImagePath", "/images/shaft.png");
properties.put("downloadsFolderPath", "target/downloadedFiles/");
properties.put("allureResultsFolderPath", "allure-results/");
properties.put("allureVersion", "2.12.1");
return properties;
}

Expand Down

0 comments on commit 860f9b7

Please sign in to comment.