You do not require to build the whole project again. We keep application Url in the property file, so in case you want to run test from on other test environment, just change the Url in a property file and that's it. In other words, the advantage of using properties file is we can configure things that are prone to change over a period of time without need of changing anything in code.įor E.g. If any information is changed from the properties file, you don't need to recompile the java class. This is a utility provided by Java itself. You can easily read properties from some file using an object of type Properties. Each parameter in properties file is stored as a pair of strings, in key-value pair format, where each key is on one line. properties files are mainly used in Java programs to maintain project configuration data, database config or project settings, etc. With the help of properties file, we will be eliminating these hard coded value one by one. And so far we have been using a lot of hard coded values in our code. It is dangerous to store hard coded values in the project, also it is against the coding principles. This chapter is all about How to Read Configurations from Property File in Selenium Cucumber Framework or in any framework.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |