Hi,
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.
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.
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.
https://support.smartbear.com/testcomplete/docs/testing-with/log/viewing/pages/log-items-panel.html
You can only write to the Project Log that's displayed on the right. This link will help with that:
https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/logging/message.html
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.
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.
Subject | Author | Latest Post |
---|---|---|