Check Out the Latest News About SmartBear Connect

Want More?

Register to get access to exclusive content

Reply
Highlighted
Occasional Contributor
Posts: 5
Registered: ‎06-13-2016

Setting project variables in one step

SoapUI has a nice feature called 'Environments' which allow all project-level variable values to be changed just by selecting from a dropdown. Is there an equivalent feature in TestComplete? 

 

I've seen the import/export extension that was submitted for the contest, but this requires selecting each variable to be imported or exported.

Posts: 3,764
Topics: 33
Kudos: 1,161
Solutions: 241
Registered: ‎11-30-2009

Re: Setting project variables in one step

There is no equivalent feature in TestComplete... yet.   Feel free to suggest such a thing however, I don't think there's an analogous concept.  In SoapUI you're testing API requests via Soap to different environments.  TestComplete is functionally testing applications via their UI. For the most part, there' not really a new "environment". The application is installed on a machine and set up and run as normal.  TestComplete then exercises the application and performs verifications.  It doesn't really matter what "environment" the application is installed on, for the most part.  Project level variables as typically used in TestComplete don't really correspond to environment factors.   They are more on the lines of global scoped variables in an application that any function/method/object in the application has acccess to.

 

 


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Extensions available
Community Leaders Program
Occasional Contributor
Posts: 5
Registered: ‎06-13-2016

Re: Setting project variables in one step

Thanks for the swift reply.

 

Because my client has multiple development versions in different QA environments at the same time, it is necessary to switch back and forth between them, and there are unique paths and credentials necessary for each version, so it would be handy to be able to change all necessary values in one go.

 

I'm just getting familiar with the product so maybe there is some way to accomplish this that I'm missing.

Posts: 3,764
Topics: 33
Kudos: 1,161
Solutions: 241
Registered: ‎11-30-2009

Re: Setting project variables in one step

What I've done in the past is created an INI file with different environmental values.  Then, using the Storages.INI object, I'd read those values in from the INI into the project variables... need to run under a different environment? Change the INI values or drop in a different file.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Extensions available
Community Leaders Program
Occasional Contributor
Posts: 5
Registered: ‎06-13-2016

Re: Setting project variables in one step

With another tool I've used a single variable to indicate the particular environment under test, then used that to select a .csv file containing the values needed. I wonder if I could do this with a DB Table variable using a script to change the file that is pointed to at run time?

Valued Contributor
Posts: 576
Registered: ‎03-12-2014

Re: Setting project variables in one step

Yes you could do the same.

Add a single variable in your init script.

and use DDT driver to read .csv file.

you can re-assign project variable values like

Project.Variables.DatabaseName = DDT.CurrentDriver.Value('Database')

where you have variable call "DatabaseName" and csv file has column Database

 

.....and of course there are many other ways to do that

 

 

Let's Meet in Boston
Try QAComplete Now