This is a migrated thread and some comments may be shown as answers.

Best Practices for Variable Driven Connection Strings

1 Answer 69 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gregory
Top achievements
Rank 1
Gregory asked on 19 Dec 2013, 03:30 PM
We have three testing environments:  Dev, QA, and Production.  We also have scripts that do database comparison between app and DB.  Currently, the connection string is hard-coded.  I know that this should be variable/datasheet driven.  What would be best practice for this considering that we will test on three seperate databases during the sprint?  Using the datasheet variable, the sheet would have to be changed each time we want to hit a different database.  I undertand this would be easier than changing the coded connection string in each test, but it seems like there is probably a better way to do this that I cannot think of.  Ideas/thoughts/enlightenment?

Thanks!!

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 24 Dec 2013, 11:51 AM
Hello Greogry,

Thank you for contacting us.

The spreadsheet is not a bad idea. You can easily change it and it is very easy to maintenance it.

Another approach: If you would like to create global variables or functions in Test Studio Standalone version that are accessible from all the tests within the test project, you can create a utility class. This class will contain the intended functions or variables.

Let me know if this helps.


Regards,
Boyan Boev
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Gregory
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question
or