It's all about the answers!

Ask a question

Is there a way via RPE to render variables used in RQM Test Scripts in special formatting when outputting as Word?


Jamie Berry (14013593) | asked Jan 06 '16, 1:47 p.m.
I am trying to output the RQM Test Script description and expected results using RPE 1.2.1.1 and RQM 5.0.2.  When my test scripts utilize variables (either execution variables or test data variables) the variable name is formatted in XHTML as a <button> element.  When viewing this in RQM or via export to PDF in RQM there is special formatting applied.  When I generate a Word document from RPE, the special formatting is missing, even if I check XHTML Input and Output boxes in the Script based text element dialog.  Is there anything that can be done to have the button element rendered in Word to mark the variables?  Does RPE 1.3 do something with this?  Does anyone have example Javascript that would parse the XHTML input to manipulate it for subsequent XHTML output?

I realize this is probably more of an RPE question but since it is specifically for RQM related output, I thought I would try here.

Thanks,
Jamie.

Accepted answer


permanent link
Subramanya Prasad Pilar (4.6k14) | answered Jan 07 '16, 2:09 a.m.
What is the special format you have applied in RQM? Could you please provide sample XHTML data from RQM?
We can process XHTML in RPE through java Script as explained in http://rpeactual.com/2013/01/18/processing-rich-text-in-rpe/

But if you want button element or any other form element in Word document (or PDF output), it is not supported. This is the case with latest version of RPE or RRDG as well.
Jamie Berry selected this answer as the correct answer

Comments
Jamie Berry commented Jan 07 '16, 9:29 a.m.

 I haven't applied any special formatting in RQM.  I am using Test Data in the script and the variables used in steps come out with special formatting on their own when extracting the data.  I have been able to parse the XHTML in the javascript code in RPE to replace the <button ...> tags with some supported formatting, thanks to the article you mentioned (found it in my searches yesterday).  Here is an example of the XHTML that is coming back from RQM:


<div dir="ltr">Put your <button disabled="true" id="_2DF6g7SbEeW5ip9yTKVRiQ" name="variable" style="border:solid thin #D8D8D8;background:#EEFFFF;font-size:10pt;font-family:monospace;margin:0 0.5em;" type="button">Foot</button>  foot in</div>

Thank you for replying.
Jamie.


Jamie Berry commented Jan 14 '16, 10:52 a.m.

 In trying to process XHTML in a script, I am running into another problem with the XHTML returned from RQM.  I get a message stating "the reference to entity "artifactURI" must end with the ';' delimiter.  The XHTML is: 


<div dir="ltr"><p dir="ltr">New product is created with the following folder structure per <a widgetid="jazz_ui_ResourceLink_8" href="https://gdrm01:9443/rm/web#action=com.ibm.rdm.web.pages.showArtifact&artifactURI=https://gdrm01:9443/rm/resources/_GbH-hSwcEeWVFLukiMBC3w" id="jazz_ui_ResourceLink_8" class="jazz-ui-ResourceLink"><span>PDM-REL-NEWTON-AC-09</span></a>:</p><p dir="ltr">DOCUMENTS<br/>MECHANICAL<br/>ELECTRICAL<br/>SOFTWARE<br/>OPERATIONS<br/>Requests</p></div>

Do I need to escape the '&' in the XHTML?


Subramanya Prasad Pilar commented Jan 15 '16, 1:58 p.m.

That means RQM returns malformed XML (something hasn't been escaped properly). You can try after validating the rich text content in the Test script using the "validate content" button on Test Script Step editor.

Your answer


Register or to post your answer.