Forum Discussion

artigas's avatar
artigas
Occasional Contributor
11 years ago

Counter of how many KeyTest or Script Statements have been executed ???

Is there a way to get a count of how many KeyTest Statements (steps) or Script Statements (steps) have been executed for a specific run at either the Project Suite level, the Project level or the test level.



The reason for the count of each statement executed is to have an estimate as to the verification points (VP - steps) of a completed run.



  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    There is not, as far as I know, a built in feature to do what you want.  What it seems that you want is that you want to know how many verification points were executed.  That's something that only you can determine as to what is a verification point and what is a "maintenance" step.



    For example, there's some code and steps that are executed during an automated project that are there simply to set up the scenario.  Those probably would not be considered "verification" points...  So, I'd add to those sections that you want something on the lines of 



    Project.Variables.VPSteps = Project.Variables.VPSteps + 1




    And then, in something like the "OnStopTest" event, add 



    Log.Message("Verification steps completed: " + Project.Variables.VPSteps)




    Does this help?
  • hlalumiere's avatar
    hlalumiere
    Regular Contributor
    My usual answer applies here. The ideal way to collect metrics is to insert your results of interest into a database table, then you can query that table to get all kinds of useful information TestComplete cannot give you. For example, whatever verification points are, I assume there is some common routine that is ran on every VP? In that case add an SQL insert query in there to insert the current build, VP ID, date and time, etc, into a table. Now each and every VP is stored in a database. From there you can get:



    - Total count of VPs

    - Total count of VPs passed

    - Total count of VPs failed

    - Same counts as above, but build-specific

    - Graph of performance, in VP over time

    - Etc...
  • artigas's avatar
    artigas
    Occasional Contributor
    A hearty thank you to both repliers. Both of you pointed out something that allows me to come up with a workable solution. Combining what you both said allows me come up with what I need.