Forum Discussion

joe_2's avatar
joe_2
Contributor
9 years ago

Move a variable between two project suites

I have two project suites.

One of the project suites has a rather large table variable that I use as a lookup for specific x/y values to be clicked during a test.

I'd like to duplicate the default values for this table in the other suite.

Is there some way to export a table variable's contents, and then import it into another suite?

 

I did manage to produce a comma delimited text file from my original table, but when I try to fill the empty table with that, it wants to put all the data into the first cell.

 

I can use the split method in a script to make a temporary table full of  the values, but don't know any scripting way of setting the default values in my target table...

 

I'm beating my head against the wall, here, trying to move this stupid table without re-entering all the data.

 

Any suggestions?

4 Replies

    • joe_2's avatar
      joe_2
      Contributor

      Thanks for the response.

       

      I tried that.  Got it to export to excel just fine, but when I tried to build the table variable, it put the values in the temporary portion of the table, didn't set the defaults.  I couldn't figure out how to set the defaults, which meant I would need to either use a persistent variable (and it would have been the only one in the project -- I don't like exceptions.) or I'd need to re-fill it from the excel file each run.

       

      This is what I was doing a while back, and I found external data storages to be unreliable and hard to work with.

       

      What I ended up doing was rewriting the little subroutine I had made that exports it to the text file so that it would save a column of values instead of a comma delimited string.  

      Then I used the data generator's 'values from a set' to import the values from the text file one column at a time.

       

      Clunky and roundabout, or what I like to call sledge-hammer programming.

      Figuring it out probably took about as long as re-typing the whole table would have.

      But I finally had the default values set in the new project suite variable, like I wanted, without having to re-enter all the data.

      And now I know how to move a variable between suites, in case I ever need to do it again.

       

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        You might consider putting the data in an external file instead of a variable.  Then you could just copy it around wherever you need it.