I have a step in a for loop and I'd like to rename it in every iteration (eg: Test 1, Test 2, Test 3 etc).
What I have noticed is that if I create a pre-expression to change the Step.Name then the in runtime the displayed step name changes only once it's execution is completed.
I thought that its because I change the name as a pre-expression, after the step started to execute, so I created a step before which tries changing the Runstate.Nextstep.Name parameter, but - to my surprise - the effect is the same, the step name changes only after its done with the execution.
This is confusing for the user, so would you mind helping me out with how to change the name of the step in a way that it changes the name before it starts executing the code its calling?
Solved! Go to Solution.
I cannot reproduce the issue you describe. Please compare with attached code.
Just replace the Statement step with a Wait. Copy the expression you had in Statement and set the wait time to 5s.
When you run the sequence then you'll that in the first iteration TS displays "Wait" and not test0, then in the 2nd iteration it will display test0, while it indeed executes "test1" etc.
Nope, works as expected. There is something different wrong on your machine...
EDIT: Ah, i see... your statement does not refer to report, but to the execution view.
Point is that tracing only updates the position of the execution arrow and the step which has just executed. Because of this, you won't see any modification of "future steps". To work around this, you can manually send an UI Message "Trace" in the renamed step after renaming has been done.
Ok... could be my PC. Pls set a 10s wait time and check what do you see in the first iteration. I see "Wait" instead of Test0. Once the wait is over, the name changes to test0 and it also logs correctly to the report file.
I am using TS2016.
Alright, that solves the problem, thanks.
Is there a way to somehow do this with one step? Cause right now I need two, one statement which does the rename and the trace and the step I'd like to execute. It would be nice if I could save the statement step.
Use a pre-expression like