Forum Discussion

rushikesh's avatar
6 years ago

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



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

  • shankar_r's avatar
    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: 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.

  • anupamchampati's avatar
    Frequent Contributor

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

  • tristaanogre's avatar
    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.