From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-13-2012 03:47 AM
Hi
I'm trying to find out how to change the step name.
The problem is: When I call a sequence several times, I can find the names of the steps in the report for about 50 times.
So, what I want to do is: I want to pass a prefix for the step name on calling the sequence and add this prefix to each step name.
Do you have an idea how to do that?
Thanks a lot
Meike
Solved! Go to Solution.
08-13-2012 05:57 AM
08-13-2012 07:10 AM
Hi Jürgen,
Thanks for your help!
It helps so far that now I can change the name. Very good :-). I wouldn't have found it myself.
But now, with evey call, the name becomes longer and longer 😉 (without the post-expression). And somehow the program seems to evaluate the post-expression before saving the name in the report. So I can choose between a super long name and the default name.
Here is what i wrote:
Pre-Expression:
Locals.iStepNameLength= Len(Step.Name),
Step.Name = Parameters.sCallerSequence+Step.Name
Post-Expression:Step.Name = Right(Step.Name,Locals.iStepNameLength)
Meike
08-13-2012 07:51 AM
Hi Meike
Try to make it static.
Do not use Step.Name on the right side, use a local instead.
Step.Name = Parameters.sCallerSequence+Local.strName
If this will not help there is an other way to rename StepNames in report, by renaming it the ResultList.
but you need an additional step!!
Juergen
08-13-2012 08:30 AM
Hey Jürgen,
I had hoped that the solution would be easier :-(.
Thank you very much for your help. I learnd a lot!
Since my sequences are about 60 steps each (at the moment I have about 30 and it will be more), it's not so nice to save the step names in local variables. But it's also a lot of work to add additional test steps to change the names in the report.
Maybe I have to think about another way to get the structure clear in the report
Thanks again
Meike
08-13-2012 04:09 PM
Be careful with dynamically changing the name of the step at runtime -- it can cause interesting things to happen if you are not careful.
Consider adding information to Step.ReportText to add clarification of what is actually happening.
Also, you probably want to avoid using the expression Step.Name, as it is not necessairly the name of the step (especailly if you use this on a custom step type that has a variable you added called Step.Name) use instead NameOf(Step) or Step.AsPropertyObject.Name to help make sure you get the name of the step.
08-15-2012 01:46 AM
Hey Warren,
Thank you for the hint. Seems to be a good alternative to changing the step name.
Where can I add information to Step.ReportText? This variable does not seem to exist...(I tried to pass a value in the Post-Expressions field).
Meike
08-20-2012 05:55 AM
08-21-2012 06:44 AM
Hey Jürgen,
You're right, this returns a text in the protocol. Thank you! 🙂
Unfortunately it is hidden somewhere in the report when the teststep is passed (I use the xml-report with stylesheet "expand.xml").
I suppose I have to learn to create my own stylesheet or report model or whatever.
Thanks again
Meike