Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
What is the best way to import a large set of variables (variable, value) from an *.xml file, so that these values are local to the test being executed?
When tests are run in parallel, I'd like to be sure that the variables aren't global. I also want to make sure that the variables can be passed to any language supported by STAF/STAX (Python, Tcl, Java, etc)? And I would like to be able to dynamically override values from this *.xml file, perhaps even setting new values in the *.xml.
Would you recommend STAXUtilImportSTAFVars? And then some other means for dynamically setting values in the *.xml?
What I've done when using STAF/STAX in the past is to create *.xml parsers in the various languages, so that all languages are sharing a source *.xml. This time around I would like to make better use of your features.
You asked if I would recommend using STAXUtilImportSTAFVars as the best way to import a large set of variables (variable, value) from an *.xml file. Not really, as the purpose of this STAX utility function is to Import STAF variables on the specified machine(s), creating STAX variables from them. Since you said your variables are stored in an xml file (not in STAF variables), then this function wouldn't be appropriate.
Do you want to store these variables read from your xml file as local Python variables within your STAX job? Or, since you said "I also want to make sure that the variables can be passed to any language supported by STAF/STAX (Python, Tcl, Java, etc)?", are you planning on running your tests (that I assume you mean may be written in Python, Java, Tcl, etc) via a <process> element in a STAX job so that you really want these variables accessible to the program that you are running via a process (on any machine) instead of as local Python variables only accessible within a STAX job? If so, then you would want to read these variables via your program (not using a STAX function). And then this question is no longer really a STAF/STAX question.
And I would like to be able to dynamically override values from this *.xml file, perhaps even setting new values in the *.xml.
I'm not really sure what you mean or are trying to do.
Please disrecard the last two sentences in my previous post as I did not mean to post them.