Ask a Question

Import/Export variable lists

Import/Export variable lists

We would like to be able to share variables lists from all levels without having to share project files or add them all in manually.


If I export my project variables, then my colleagues should be able to import the resulting list and have it be merged with theirs.

Champion Level 2

Having to enter a long list of project variables is tedious when we need to combine or split up projects and we need the variables duplicated.  It would be helpful to be able to get some or all of the project variables and add them in somewhere else.

Valued Contributor

I would like to have export method on project variables. (mey be to a .cvs file)

so that those could be sent to other projects or preserve previous values

Community Hero

Why don't you store the data you need in an excel sheet?

Champion Level 2

We do use Excel if we are reading in a lot of data, but I shouldn't have to go to all that trouble to share a single value between tests.

Status changed to: Accepted for Discussion
Community Hero

It would be very simple to also write a script that will do this.


You can loop through the number of variables you have and output their name, type and value into a file, then read them back in another project to add them. 


Very rough psuedo code.

function outputVars() {
   var count = Project.Variables.VariableCount;
   var name, type,value;
   for(var i = 0; i < count; i++){
      name = Project.Variables.GetVariableName(i);
      value = Project.Variables.VariableByName(name);
      type = Project.Variables.GetVariableType(Project.Variables.VariableByName(name))
     //code to write to file

function insertVars() {
   //code to open file
  for(lines in file) {
      //add var and type
   //set var value etc..
Champion Level 2

Good, now SmartBear can use that script to implement it.  🙂


Hey guys,

just for reference:

SmartBear just launched a coding contest to face just that problem 🙂




Super Contributor

Having to work with a big amount of variables, which I now have to type in manually one-by-one, I thought this process would go much faster if TC would support importing if variables lists (also parameter definitions) from external files, like Excel, CSV, txt.


Super Contributor

 Hi ,


About which variables you are talking, ProjectSuite/Project or local variables ??


Welcome to the TestComplete Feature Requests board!

Here you can review submitted feature requests and vote up the ones you like! If you can't find the feature you want - go ahead and suggest your own idea. Ideas with the highest rating can be implemented in the product.

Check out the Create a Feature Request guide for more information.
New Here?
Welcome to the Community
Sign Up Here