Ask a Question

Is there a way to loop a particular test item in project test items page ?

rushikesh
Contributor

Is there a way to loop a particular test item in project test items page ?

Hi 

 

PFA image loop.png

 

I want to loop the hoghlighted test item present on project test items page for ceratin no of times depaning on value which i recieve from first test item.

 

Can we do it in Test Complete.

4 REPLIES 4
shankar_r
Community Hero

It is possible to run a test item multiple times using Count column, In your case, you want to run n  times based on the last test item result.

 


@rushikesh wrote:

....no of times depaning on value which i recieve from first test item.

How will receive from last test item? Project Variable/ Global Variable?

 

As of now, there is no possibility to run a test item based on any value expect the Count field with help of TestCompete infrastructure.

But this can handle within scripts.


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

anupamchampati
Frequent Contributor

after receiving the value from first test item just try to update the Project.TestItems(TestCase).Count = (value)

@anupamchampati   Project.TestItems(TestCase).Count  is read-only property you can't update at the run time.

refer here: https://support.smartbear.com/testcomplete/docs/reference/project-objects/project/testitem/count.htm...

 


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

tristaanogre
Esteemed Contributor

The answer... is yes... but not based upon the test item.  What you will need to do is build the code that the test item refers to in order to have the loop by dynamic.  As mentioned, the "Count" property of the test item is read-only at runtime so you will need to write a "For" loop in your keyword test or script code to handle this dynamically lengthed loop.


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
cancel
Showing results for 
Search instead for 
Did you mean: