NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a short report (Text) ?

Hi,
 
I would like to gnerate a short report in addition to the report generated by TestStand.
 
This report will be text report and will include ONLY the main sequence steps and thier results.
 
Any suggestions of how to get started on this?
 
Thanks and regards
 
Rafi
0 Kudos
Message 1 of 4
(6,352 Views)
 
Hello Rafi!
 
The best way to accomplish this is to start by copying the sequential process model (SequentialModel.seq) and the Text report sequence (reportgen_txt.seq) from TestStand\Components\Models\TestStandModels to the public directory. 
 
It would also be a great idea to change the name to a custom name (ie additionalreportmodel.seq) so you do not encounter any issues later.
 
So what you are going to do is copy the steps that do report generation from the process model (which is what is creating your original 1st report) into a new sequence file. Open the sequential model and go to the sequences window and find TestReport. There are 10 steps in main, you most likely do not need the first 4. You can also hard code the path as whatever your custom name is rather than "ReportGen_" + Parameters.ReportOptions.Format + ".seq" which takes the report type from the report options settings.
 
So now you will be creating a text report calling this new sequence file (similar to the reportgen_txt.seq file) that you are going to customize to your liking.
 
Here are two great resources for more information on report generation and modifying result collection that will assist you in customizing your new report:
 
 
 
This should get you well on your way, happy TestStanding!
 

David D.

With warm regards,

David D.
0 Kudos
Message 2 of 4
(6,320 Views)

Hi David and thanks..

Before dipping into this elaborate process I would like to ask for your opinion on this much simpler one.

 

My test sequence consist of 10-20 subsequences called from the mainSequence.

Since all I want is to creat a report for those tests appearing in the top level of the main sequence (10-20 lines) and their results, I was thinking to just write a line to a text file after each step.

I was thinking to use a PostSequence callback (which is activated for every sequence).   I will further check to see if this sequence was called from the mainSequece, and only if so, then, I will write the result in the new 'Report'.

This way I will be able to keep the detailed XML for troubleshooting in addition to the short  report I was asked to provide by the QA people.

1) What do you think of this idea?

2) Will you be still recommending to do it via the sequential model?

 

Thanks

Rafi

0 Kudos
Message 3 of 4
(6,311 Views)
Hello Rafi!
 
Yes, absolutely it looks like a great way to implement your goals with the SequenceFilePostStep.
 
You could do 1 of 2 things:
 
1. Add the logging in the SequenceFilePostStep (hence causing you to log after each step)
 
or
 
2. Use the SequenceFilePostStep to append the results to a variable and then log that data in your main sequence (in clean up would be my recommendation).
 
 
The main difference is where you want the overhead that this is going to cause.
 
So it sounds like you are on the right track, and no I would not recommend now that you edit the sequence file although it could still be helpful to copy some steps for the text reporting rather than having to create new code from scratch.
 
Have an awesome weekend!
 
With warm regards,

David D.
0 Kudos
Message 4 of 4
(6,260 Views)