NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify HTML report Text for String Value Test Step??

Hello

I am stuck in a situation where i need to modify the string in html report.
When we use a String Value Test we get labels as "String" in the HTML report specifying the Limit String and the Actual value recieved(as shown in blue below)
i need to change these labels text, while exploring through the Reportgen_html.seq i found that this is done in step: "Add Flagged Values" i.e. in sequence: "PutOneResultInReport"
which in turns call a dll to retrive the value.
Please let me know how is it possible to change the label text according to out requirement.

String Value test

Status:

Failed


String:

""


Limits:


   String:

""


Comparison Type:

Ignore Case






0 Kudos
Message 1 of 9
(4,768 Views)
Hello


This concern is a bit urgent . could you please reply as early as possible.

regards
kulwant
0 Kudos
Message 2 of 9
(4,758 Views)
Hi Kulwant,
To have user defined result you need to create your own step type.
It's an easy job. Open the Types pallete (press Ctrl+T).
Copy the default String Value Test type from NI_Types.ini file to My_Types.ini file. Make another copy of it in the My_types.ini file. This is required to have the type editable. You can then delete the first copy from My_Types.ini file.
Expand the 2nd copy of String Value Test type and expand the Result container. Here you add the String which you want to in report say string1. Click on it and go to advanced tab. Select the PropFlags_IncludeInRerport check box.
Save the file. Now a new Step type will get added in the Tests Steps category. Select this step in your sequence and run the sequence.

Later on you can remove the defaultString from report from Configure Reports option.

Regards,
Kaustubh.
0 Kudos
Message 3 of 9
(4,735 Views)

Hi,

Or

you can modify the ReportGen_Html.seq to find and replace "String" with the new text after the return from the DLL call and before inserting into the local report text.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 9
(4,723 Views)
thanks guys


Actually both the ways are very nice ,but as we have written alot of test sequences so it would be difficult to go with first (change in type pallate)
but with second solution( by using find and replce method).its more  of a improper solution because its giving to strings with same name and we have to change one with Expectedstring and another with Returnedstring.but we can go with that  incase unable to find any other.
if u guys are having any other solution or we can amend the dll as we can edit the code (option avilable in Ts).that would be much better.


regards
kulwant


Message Edited by Kulwant on 05-07-2008 12:54 AM
0 Kudos
Message 5 of 9
(4,719 Views)

You can do both by not using the option to change all occurrance, just means you will have to do two FindAndReplace calls.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 6 of 9
(4,713 Views)
thanks alot
i have used and implemented findandreplace method.
thank you very much
0 Kudos
Message 7 of 9
(4,709 Views)
Hello Kulwant and Ray,

I just wanted to let you know of a third option to change the "String" text.  You can modify the language resource file: <TestStand>\Components\NI\Language\English\TestStandStrings.ini.  The particular entry you are looking for is String = "String" under the [RPT_FLAGGED_NAME] key (approximately line 2050 - 2300).  If you change this line, your HTML and TXT reports will use the new value instead of "String".  Also, changing the String line will change the value for every entry of "String" even if it shows up under Limts.  Look below for some screenshots that will help explain what I am talking about.

The specific line I am talking about in the TestStandStrings.ini (after and before):




After you change the file to "StringFoo" the report will look like the following:




Message Edited by JettR on 05-19-2008 04:16 PM
Best Regards,
Software Engineer
Jett R
Download All
0 Kudos
Message 8 of 9
(4,623 Views)

Hi JettR,

Thanks for that, I had forgotten about the language file.

But to add to that, you should be able to add the single entry of STRING = "StringFoo" under [RPT_FLAGGED_NAME] in the CustomStrings.ini in the \USER\Language\English

folder and not change the <TestStand>\Components\NI\Language\English\TestStandStrings.ini.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 9 of 9
(4,613 Views)