| || |
Test data, Removal of hard coding in scripts
I'm importing the required test data by the piece of code in my script like DataTable.Import("C:\web3.2ExportPsetPageValuesweb 3.2.xls"), but I want to make the location of the test data table as customizable because tomorrow if the test environment changed then we can change the location of the test data excel.
I can parmeterize but, if i parmeterize that i need to add parmeterize variable in all my huge existing Test data excel sheet.
I'm looking for some approach like, there is only one place(or one file) i should mention the location of the test data, then wherever i used the import statement i just call this to locate the test data excel sheet.
It should be as sample in one file when i set the url or test data excel sheet location using that file I should call for that variable in all calling method instead repeating the same in all test data sheet.(Like Environment settings)
Can you anyone guide on this?
Re: Test data, Removal of hard coding in scripts
From the forum links, I come to know the solution would be using of xml files for setting up of common variables in Environment User Defined variables.
I've done that and called the variables using
but still calling of this xml file should be a hard coded value in script. How can I avoid this hard code, is there any workaround or different approach for this?