Properties and Results - ChrisMell/OEL-wiki GitHub Wiki
db.Properties
db.properties is a file that each user needs to create in the src/main/resources directory. It is a text file containing necessary parameters for accessing the database. Here are the parameters and their values:
Parameter | Value |
---|---|
databaseName | OELCore_Automation |
username | [your username] |
password | [your password] |
serenity.properties
Serenity.properties is a file in the src/test/resources directory containing Serenity’s system property defaults.
This project uses the following properties:
Property | Value | Usage |
---|---|---|
Webdriver Properties | ||
webdriver.driver | Firefox, chrome or edge | Determines the browser that the tests need to be executed on |
webdriver.autodownload | True | Prevents the download popup when performing download actions |
Timeout Properties (milliseconds) | ||
Timeouts.implicitlywait | 10000 | Implicit Waits are used to ensure that Serenity does not fail a test if a web element is not immediately present on the page, when you first try to use it |
Fluentwait | 10000 | Fluent Waits make Serenity wait for an element that is already present on the page to become visible or enabled, before interacting with it. |
serenity.step.delay | 50 | Time to wait for before executing steps |
Screen Properties | ||
Take.screenshots | Refer to usage column for information | Set this property to have more finer control on how screenshots are taken, default is serenity.take.screenshots=BEFORE_AND_AFTER_EACH_STEP This property can take the following values: |
FOR_EACH_ACTION: Saves a screenshot at every web element action (like click(), typeAndEnter(), type(), typeAndTab() etc.). | ||
BEFORE_AND_AFTER_EACH_STEP: Saves a screenshot before and after every step. | ||
AFTER_EACH_STEP: Saves a screenshot after every step | ||
FOR_FAILURES: Saves screenshots only for failing steps. | ||
DISABLED: Doesn’t save screenshots for any steps. | ||
Browser.maximized | True | Opens browser in maximized mode |
Browser Preferences | ||
Chrome.switches | Refer to usage column for info | Different preferences Chrome needs to be launched with |
Firefox.preferences | Refer to usage column for info | Used specifically in this implementation to suppress popup windows in Firefox, on clicking Download links for docx and xlsx files |
Environment Properties | ||
Default.webdriver.base.url | [Any URL] | Default URL if a specific URL is not specified. Not specifically used for this implementation |
All.coalitionservices.home | Coalition Services Homepage URL | Currently points to automation environment |
All.Family.login | Family Services Homepage URL | Currently points to automation environment |
All.Provider.login | Provider Services Homepage URL | Currently points to automation environment |
The user can open the file, and manually change the values of these properties in order to affect the way that the framework handles different types of circumstances that may arise, during execution. Such issues may include delayed loading times, download pop up boxes that impede test progress, or the overall reaction time of the test engine to the application, as the test traverses it, through its transitions from one step to another.
output.properties
Output.properties is a file in the src/test/resources directory that contains two properties called report.location and local.report.location.
While both properties' values are by default blank, and replaced by an autogenerated directory at runtime, Please refrain from editing the local.report.location, as this property is used by the framework. You may change the report.location property, if you prefer to have your test-output files generated at a different location.
Test Execution Steps (including Maven Goals)
If the tester wants to run the tests for iteration 1 in the automation environment using Google Chrome, then the maven goal would be the following:
mvn verify -Dit.test=Iteration1 -Denvironment=automation -Dwebdriver.driver=chrome -Dinjected.tags="browser:chrome" -DfailIfNoTests=false.
Results and Artifacts
Location of results folder
The output generated by the test can be found at the directory path, specified in the output.properties file, denoted by the local.report.location property. This folder containing the artifacts, results, and logs, is named according to the date and timestamp of the test's execution:
Artifacts Folder
This folder contains any files created during the course of a test. Examples of files that are found here include: downloaded files, data files, and office documents such as excel files.
Results Folder
Upon completion of a test suite, results are generated and saved in this folder. These results can be retrieved by opening the index.html file, found therein.
Log Folder
Contains the log files generated during the course of a test. Open these log files to view assertions, exceptions, endpoint contacts, database connections and other tasks related to the test execution.