NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the easiest way to add the 'comment' field of each step of a sequence, into the test-report html file ?

Solved!
Go to solution

I'm using Teststand 3.0, and I would like to have the comment field of each step of my teststand sequence file appearing in my html report file.

 

I guess I will have to modify the teststand model ReportGen_html, but I would like to have your opinion to do it in the easiest way...

 

I've already modified the SequencialModel for other purposes, but the ReportGen_html seems to be much more complicated to modify...

 

Thanks in advance for your help (and sorry for this bad english) !

0 Kudos
Message 1 of 12
(7,109 Views)

Traduction en français :

J'utilise actuellement Teststand 3.0, et je voudrais insérer dans mes rapports html le champ commentaire de chaque pas de test de mon fichier séquence.

Je pense que je vais devoir effectuer des modifications dans le fichier ReportGen_html, mais j'aurais voulu avoir votre avis pour avoir la meilleure méthode à mettre en oeuvre.

 

J'ai déjà dans le passé modifié le SequencialModel pour d'autres raisons, mais le fichier ReportGen_html me semble plus compliqué à modifier...

 

Merci d'avance pour votre aide (c'est plus fluide en français) !

0 Kudos
Message 2 of 12
(7,106 Views)

I am not sure about real suitable solutions with TestStand 3.0.

 

Using TestStand 4.2.1 it is a real easy task. You can use "Additional Results" and simply select to include the Step Comment to the report.

 

It would look like this:

17911i4577429BD7363292

 

Above: Step Setting

 

17913i546A59564CB1E898

 

Above: Report Entry in HTML report

 

 

What TS 4.2.1 is doing here: It uses the TS API to get access to the Comment of the step object and simply adds it in the reporting mechanism. You can do this in TS 3.x as well, but you have to split it up. So from my current understand, it is only feasable to do for customized step types. So this would probably include much more effort than updating TestStand.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 12
(7,106 Views)

If I am understanding the problem all you do is pass some text in the Comment result. It can not be an empty string.

 

 

Regards
Ray Farmer
0 Kudos
Message 4 of 12
(7,098 Views)

Thanks for your answer.

It seems to be very easy on TestStand 4.2.1. Unfortunately, I will not be able to get that version.

 

I'm actually trying to look if I could pass the comment-text in the Result container, thus allowing getting it in ReportGen_html sequence and putting it in the result html file by adding one step...

0 Kudos
Message 5 of 12
(7,091 Views)

Do someone know how the ResultList array is automatically filled ?

 

I've added a string to the Result array of each step by modifying the sequence file types.

17937i492A3FCCFA20125F

 

 

I'm wondering if there is a way to modify the algorithm that is filling the ResultList array, so that I could copy the 'comment' field of the step to this Result array.

If I can do that, then I think it'll be easy to add a step in ReportGen_html to put this string from Result array in the html report.

 

So the question is, which component is filling the Result array (with errors, status, reporttext...) at each step during the execution ?

 

 

0 Kudos
Message 6 of 12
(7,088 Views)

It's the same way with the version you are using.

 

 

Regards
Ray Farmer
0 Kudos
Message 7 of 12
(7,081 Views)

The problem is not getting the string "comment" into the result container (most simple solution is to set this in the ReportText). The issue is that you have to access the property "Comment" from the step object. If you take a look into the properties of the step, you will not find this as a subproperty.

 

Looking into the TS 4.2.1 example i made the screenshots from, you see that the comment is referred as "Step.AsPropertyObject.Comment". This is a construct which is not usable in TS 3.x since TS 3.x does not support TS API calls in expressions. So this is the part you have to split up:

1. A module using TS ActiveX API to convert the object "Step" into a property object, which would result in a reference possibly named "pStep".

2. Reading the subproperty "Comment" from the property object "pStep".

 

I think that this would be the approach for TS 3.x as well, but you would have to write the module, include it in the step (using a step typedefinition) and then use the PostExpression to set the "Step.Result.ReportText = pStep.Comment"

 

hope this helps,

Norbert

 

EDIT: Corrected a typo

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 12
(7,074 Views)

Seems to be already done on that topic :

http://forums.ni.com/t5/NI-TestStand/How-to-globally-modify-the-contents-of-ResultList-TS/m-p/285281...

 

But I cannot open attachments with my Teststand 3.0. Any way to convert those sequences in attachment to 3.0 ?

0 Kudos
Message 9 of 12
(7,071 Views)
Solution
Accepted by topic author Zener82

I converted the example from the quoted thread to 3.0.

The approach is quite similar to my suggestion with one difference: Instead of using custom step types, the example uses callback overrides to copy the string.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 10 of 12
(7,069 Views)