Ask a Question

How many variables can be add on the Project temporary and persistent variables?

jcatayong
Contributor

How many variables can be add on the Project temporary and persistent variables?

Variables.png

 

I'm a newbie on TestComplete and I'm trying to create a some how Page Object Model using the tool. I used the Project Temporary vairables and Persistent variables to store element's/UI object's property, property value and xpath. My question is
What is the maximum number of variable that can be store on the Persistent variables and Temporary variables? Just to make sure I'm not doing something that will end up to rework. Or is there any way to store Objects with their properties in the tool?

Thanks in advance!!!

7 REPLIES 7
AlexKaras
Community Hero

Re: How many variables can be add on the Project temporary and persistent variables?

Hi,

 

From the technical point of view, there is no limitation on the number of (temporary) project variables. (Well, at least no one reported such problem here yet.)

However, XPath and Page Object are far not the best practices in TestComplete's world.

It is much better to use .FindXXX() and .WaitXXX() methods provided by TestComplete (.FindChild(), WaitWindow(), .WaitButton(), etc.) instead of XPath.

TestComplete provides you with Objects Tree that is effective replacement of the Page Object model. And exceeds it if NameMapping and Aliases are used. https://support.smartbear.com/screencasts/testcomplete/reliable-tests-for-dynamic-objects/ is a recommended video to get a good understanding of NameMapping and the whole https://support.smartbear.com/screencasts/testcomplete/ page is worth to be bookmarked as well.

 

One more note: Unlike Selenium, Appium, ..., TestComplete provides fantastic documentation that is really worth detailed reading. At least, I would recommend to go through the description of every function that you will use in your test code to get better understanding of how it works and be aware about its specifics.

 

A little-bit extreme summary: the sooner you will forget about Selenium practices and move to Aliases and .FindXXX() the better will be your test code. 🙂

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
shankar_r
Community Hero

Re: How many variables can be add on the Project temporary and persistent variables?

Hi,

 

I guess you had background of Selenium experience, TestComplete provides NameMapping concept in-order to maintain your objects as you are new to TestComplete you watch this video to get intro with NameMapping concepts.

 

Personally, I would not recommend to store your object properties in Project Variables. You can follow some approaches mentioned in the topics,

 

https://community.smartbear.com/t5/TestComplete-Desktop-Testing/How-to-overcome-count-limitation-of-...

https://community.smartbear.com/t5/TestComplete-General-Discussions/Project-Variables/td-p/124081

 

To answer your question, I don't think there is a benchmark count for number of variables that can be added into Project.

 

We have 150+ persistent and 250+ temporary variables for a project without having any issues. 


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

baxatob
Community Hero

Re: How many variables can be add on the Project temporary and persistent variables?

Hi,

 

Some time ago I have played with adding of project variables. I confirm that you can have at least 10,000 variables without any problem 🙂 

 

_var00000.png

tristaanogre
Community Hero

Re: How many variables can be add on the Project temporary and persistent variables?


@AlexKaras wrote:

 

 

A little-bit extreme summary: the sooner you will forget about Selenium practices and move to Aliases and .FindXXX() the better will be your test code. 🙂


Couldn't agree more.  TestComplete has a built in feature that takes care of object identification for you.  There is no need to "reinvent the wheel" and construct a POM within TestComplete, at least for object identification.

 

Now, you can still go the route of having classes and code units for each page containing methods for executing tests and actions against components on those pages, but I'd strongly recommend that those units only contain the method code, not object identification code.  Use Aliases to build out your object structure you want to use and reference those aliases in their method code.

 

@cunderw, don't you do something like this in the framework you demonstrated at Connect?  Perhaps you could speak to this a bit.


Robert Martin
[Hall of Fame]
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.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
cunderw
Community Hero

Re: How many variables can be add on the Project temporary and persistent variables?

Yeah absolutely. Basically they way I go about is to map top level components, tables, panels, etc... 

 

Then you have action script units for each sub  application / page that handle finding inputs, buttons, data from tables etc.. using find methods. These are used as building blocks for tests, no local or individual actions are handled by the tests themselves, they just call these utilities in the order needed for the tests. This allows you to update object properties and even entire flows, data and field validations etc... in one single place to keep all of your tests working.


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
AlexKaras
Community Hero

Re: How many variables can be add on the Project temporary and persistent variables?

> way I go about is to map top level components

 

This is the key that I meant: main skeleton elements are mapped and Aliased in a convenient way from the end-user point of view. Then those skeleton elements are used as starting points for the dynamic elements (like table cells) that are sought for via .FindXXX() methods.

Such design usually results in good maintainability, flexibility, maintainability and performance.

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Marsha_R
Community Hero

Re: How many variables can be add on the Project temporary and persistent variables?

Yes to all of that ^^   🙂

 

Use your name mapping for the minimum number of objects that you have to have to get started, then Find the rest.  

 

I still ended up with a large number of project variables, but that was because of the calculations we needed or values passing from one test to another, not for objects.


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
cancel
Showing results for 
Search instead for 
Did you mean: