Ask a Question

Naming Each Iteration of a Test Item

Occasional Contributor

Naming Each Iteration of a Test Item



I have a test item which is run multiple times using the Count option.

Is it possible to give each iteration a unique name in the test log?


Currently each iteration appears in the log as "TestItemName < Iteration N >".

I would like to be able to be able to assign each iteration a more meaningful name via scripting e.g.

"TestItemName < MyUniqueName>" or even better "MyUniqueName".


Any ideas on how to achieve this type of naming in the test log would be appreciated.

Champion Level 3

If you are getting an iteration number in the log, then it sounds like you are already putting your own string to the log.  You can change that string to whatever you would like.


Look in your script for something like Log.Message and see if that's the case.

Occasional Contributor

Thanks for your suggestion.


I haven't specified anything to be included in the log, the iteration number seems to be the default behaviour.





Those log items are just a display of what happened.



You can only write to the Project Log that's displayed on the right.  This link will help with that:

Occasional Contributor

Thanks for your input.


I know how to write to the project log, but unfortunately that is not sufficient in this case. 

If there is no way to update the test item name, then I will have to rethink my approach to this problem.

Esteemed Contributor

A suggestion:


Rather than using the "Count" property on the test item, add a for loop to your test case to loop through the 10 times.  Then use Log.AppendFolder and Log.PopFolder to build a tree structure in your test log to separate each time through the loop.  Log.AppendFolder has a text string parameter that you can use to title the "folder" that it creates so your log will reflect the 10 loops.

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