Forum Discussion

kirk_bottomley's avatar
kirk_bottomley
Contributor
11 years ago

Populating Project Variables via XML

I posted this a couple of months ago within another thread. I thought maybe it should be its own post instead...



Our test environment consists of several workstations, each with its own parameters; different app paths, different sandboxes, different SQL servers, etc.



I was going to create an XML that will store the variables needed for each machine, then read those in at the start of a test.When a workstation opens the project, as long as they open it in shared mode, there is a folder created with their workstation id already. 



I wanted to create a Master XML that is stored at Project.Path that has all the variable information in it. Then when a user opens the project, it checks to see if they already have a workstation.xml file in their share folder. If not, copy the Master.xml to workstation.xml at Project.ConfigPath, set the variables, then run the tests. If it exists already, just run the tests.



For variables that won't change often, I wanted to set the Category property for that variable to "Fixed". If it's something that will vary from machine to machine, like AppPath or testbed locations, I was going to set the Category to "User". Then when the XML is parsed the first time, it would pop up a form allowing the user to configure their own machine settings the first time, and never have to do it again.



The first problem I found was that NetworkSuite variables can't be created this way.

Then I found that the Category and Description properties can't be addressed this way.



Can anyone think of a workaround for this workaround approach to work? Or a better approach altogether?
No RepliesBe the first to reply