Forum Discussion

BrandonH's avatar
BrandonH
Contributor
7 years ago

Setting a Test Item's Count via script

Hi,

 

     I've seen reference to a support ticket from 3+ years ago to add the functionality to set a Project Test Item's Count via script.  Is there now a way to do this?

 

Thanks,

 

Brandon

  • The limitations of the Test Items method of running test cases is exactly that... that basically all aspects of configuring Test Items are hard coded prior to execution and cannot be altered at runtime.  If you desire runtime control of what gets executed, when, how many times, and in configurable dependancies, the way to do so is to run tests as functions/tests called within others.  Most frameworks that I have designed and worked with in TestComplete work in this fashion.  Understandably, this means you can't get the "pretty" reports and graphs out of TestComplete as to how many "tests" passed/failed... but again, using code, external files, etc., you can construct your own reporting which is what we do by writing to an SQL table after each test what the test status is.

  • Do you have the link in question?  It helps if we have more details.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        OK, several things:

        1) Feature requests are just that... feature requests.  That is what that older thread indicates, that someone made a request to add the feature.  It is not a high-priority item for SmartBear development because it is not a feature that, apparently, a LOT of people are interested in or there would have been more requests for it. 

         

        2) Additionally, there is a sufficient work around.  If you want to repeat a test multiple times with the count being variable based upon some sort of value determined at run time, you can do so using a "For" loop, either as a Keyword test operation or writing it as script code.  This was also suggested in that previous thread you linked to.  Since such a convenient work around exists already in TestComplete (and it's stuff that's been there for YEARS), that also reduces the ranking of the feature request... why make a code change to the tool when the tool already supports the desired behavior?

         

        3) Posts on these communities are not "support tickets".  The communities are moderated and hosted by SmartBear and SmartBear staff do monitor and respond where appropriate... but these are places for folks like me and Marsha_R and others to collaborate together to solve each other's problems.  If you do wish to open a formal ticket, you can do so at https://support.smartbear.com/message/?prod=TestComplete and that will message SmartBear folks directly with your request.

         

        Now... if you do wish to suggest this feature and campaign for it to be implemented, that can be done... go to https://community.smartbear.com/t5/TestComplete-Feature-Requests/idb-p/TestXCompleteFeatureRequests.  Search there, first, to see if the request has already been submitted.  If so, add your vote and, perhaps, see if you can convince others to do so.  If not, feel free to add it.