I'm writing test cases for browserstack App Automate using TestNG framework. I need to update browserstack configuration file programmatically before the device initialization occurs.I'm using the maven cli parameters to update the config file in from @BeforeTest method. Config file is updated but the updated file is not picked for that particular execution. Is there any such way? From where/when the browserstack.yml is processed?
1 Answer
When working with BrowserStack App Automate using the TestNG framework, the browserstack.yml configuration file is typically processed at the very beginning of the test execution lifecycle, before any test methods, including @BeforeTest, are invoked. This means that any changes you make to the browserstack.yml file during the @BeforeTest method might not be reflected in the current test run because the file has already been processed.