Forum Discussion
I would export it to Excel from the one project suite and then use these script examples to build the table in the other suite.
- joe_210 years agoContributor
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_R10 years agoModerator
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.
- joe_210 years agoContributor
Yeah, when I was first learning how to use TestComplete, I made heavy use of external data storages.
But I found they were somewhat unreliable. Occasionally a test would fail for inability to open a file, for one reason or another.
Usually because the file in question had been moved by someone else...
So I did away with them in my projects. Just use table variables now, and that's generally not a problem, except I started a new suite and needed a few of the old tables in it.
What I wish is that SmartBear would make the project variables and suite variables copy and paste-able.
Just right click a suite variable and copy it, then paste it into the other suite.
Now I'd find that useful.
Related Content
- 10 months ago
Recent Discussions
- 3 days ago
- 3 days ago
- 6 days ago