07-01-2010 04:19 AM
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) !
Solved! Go to Solution.
07-01-2010 04:30 AM
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) !
07-01-2010 04:33 AM
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:
Above: Step Setting
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
07-01-2010 06:33 AM
If I am understanding the problem all you do is pass some text in the Comment result. It can not be an empty string.
07-01-2010 07:01 AM
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...
07-01-2010 07:21 AM
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.
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 ?
07-01-2010 07:52 AM
It's the same way with the version you are using.
07-01-2010 07:57 AM - edited 07-01-2010 07:59 AM
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
07-01-2010 07:59 AM
Seems to be already done on that topic :
But I cannot open attachments with my Teststand 3.0. Any way to convert those sequences in attachment to 3.0 ?
07-01-2010 08:04 AM
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