12-04-2024 06:55 AM
Hi everybody,
I am generating 2 reports with TestStand:
- One is a csv generated thanks to a plug in based on Simple Text Report that I modified to correspond to my needs. This one is used to be a log file, reporting all actions in the sequence.
- And the second one is the "real" report, configured within the Result Processing -> Report window.
I want my log file to have all the information of all steps of the sequence and I want to let the user Enabling or Disabling the steps he wants in the real report with Result Recording Option.
The problem is that Result Recording Option : Disabled does not populate the ResultList, which is used as well by the Simple Text Report Plug in that I modified. So, the step does not appear in the report, which is nice, but does not appear in the log file.
Is there a way to have 2 different reports with different steps recorded ?
I found a conversation about it : Two reports with different steps recorded - NI Community,
but I didn't really found what I was searching for in the answer.
Thanks a lot in advance for your answer !
Solved! Go to Solution.
12-04-2024 07:04 AM
Report generation uses the ResultList variable as a datasource.
Everything which is not in there can't go into a report.
Disabled steps are not executed, hence they don't add anything to the ResultList.
In general, you can implement a lot of extra stuff going off-standard, but this comes at a price in terms of complexity and maintainability.
What is the purpose of logging information for steps which are not executed?
12-04-2024 07:20 AM
Dear Oli_Wachno,
My first report act as a log file, that's why I want all information of all steps executed in the sequence in it. The second one, the real report, needs to display some steps, defined by the user one by one. I cannot use ResultFiltering method for example, as it really depends which step the user wants. That's why ResultRecordingOption was interesting : for each step the user could select if he wants to display it in the report or not. The problem is that it affects the log, supposed to write everything in the file...
Thanks for your answer !
12-04-2024 01:30 PM - edited 12-04-2024 01:33 PM
Step ResultRecordingOption set to Disabled will cause the step result to not be included in the ResultList.
To handle your case you need to add a Property to the Step.Result in the PreExpression. Then this property can be used to do ResultFiltering in the Report Options.
When the user does not want the step in the report add this to pre-expression:
Step.Result.SetValBoolean("ShowInReport", PropOption_InsertIfMissing, False)
Then, go to Report Options and set a custom filter:
Result.Exists("ShowInReport", 0) ? Result.ShowInReport == True : True
Please note: All steps that might be filtered by the new property will need ResultRecordingOption set to Enabled
12-05-2024 03:59 AM
Thanks a lot, this solution works for my needs !