Skip to content

Latest commit

 

History

History
37 lines (21 loc) · 1.04 KB

working_with_parameters.md

File metadata and controls

37 lines (21 loc) · 1.04 KB

Configuration options

GENERAL:
Configuration is set in following classes:  
MainConfig
TestEnvironmentConfig  
BrowserStackDeviceConfig  
MAIN CONFIG:

src/test/resources/MainConfig.properties

Goal: to store configuration, not depends from environment (example: folderName)  
  
Usage: protected static MainConfig config = ConfigFactory.create(MainConfig.class); 
String ALLURE_SNAPSHOTS_FOLDER = config.allure_screenshots_folder();  
TEST ENVIRONMENT CONFIG:

src/test/resources/ANY_NAME.environment.properties

Goal: pass parameters, related to specific environment  
  
Usage: to point to environment config file pass env param: mvn test  ...-Denv=ANY_NAME...  
to get correct cofig:  private TestEnvConfig testConf = createTestEnvConfig();  
open(testConf.googleUrl());  
BROWSERSTACK DEVICE CONFIG:

src/test/resources/BROWSERSTACK_DEVICES_CONFIG

Goal: select device for test  

Usage: to point to device config file pass env param: mvn test  ...--Ddevice=OS_X_Mojave_Safari...