Property files and parsing test data on the fly

In a lot of cases, the test environment data, such as username, password, servers, IP, and URL are dynamic, and change with the environment they run on. In these situations, it makes sense to use a placeholder in the test data and replace the values on the fly when the test method is run.

To do this, environment data can be stored in property files, a system property can be used to pass in the name of the file for that specific environment, and it can then be read as part of the @BeforeSuite method.

Let's take a quick look at the various parts of this equation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.74.227