print custom section in RQM using RPE
I asked a question in developerWorks RPE forum but wanted to ask on RQM forum as well:
http://www.ibm.com/developerworks/forums/thread.jspa?threadID=456942&tstart=0
7 answers
What do you mean "A custom section will be present in the schema only if it was added through a testcase/testplan template."? Do you mean that so long as custom section is added through a testcase/testplan, it will be able to show in the schema or the user needs to do something to make it present in the schema? We have one user asking the below question which is related to this discussion, can you please advise whether it is possible and how to retrieve custom section when there is no pre-defined field in the schema to matching the custom section? Thank you very much.
===question===
The schema I was talking about was the data source schema used in RPE
to extract data from RQM. As for test plan, I used "feed" schema
obtained from
https://xxx:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/schema/feed.xsd.
More specifically, the test plan fields
listed in schema were under "feed/entry/content/testplan/", which were
"schema fields" I meant. In the schema fields, there were some
pre-defined section names i.e.
Introduction, Business Objectives, Object Under Test etc. Please note
the schema fields were pre-defined in the schema file but not depending
on the customized sections
I created in RQM.
The case was that I could retrieve data out using RPE if two conditions
satisfied.
a. the customised section was created in test plan template at first,
and then generate the instance of test plan in RQM.
b. the customised section name matched the pre-defined name listed in
the schema fields.
Now my question is whether RPE has some way to retrieve data out if
condition a) was satisfied but b) was not.
====
Comments
After the schema is imported into RPE, you can edit it to include the customized section into the schema and use that field to retrieve data for customized section
Thanks ChongYuan for the answer. Collin will ask further question on how to create the custom field in the schema here. Please help further. Thanks again.
This is the screenshot I have got from RPE version 1.2. I would like to create an attribute under testplan as richtext object used for customized section. I can create one under content directory (parent directory of testplan) but not under tesplan directory. Could you please provide further instruction about how to create? Thanks a lot.
==Answer====
The testplan referenced in the feed schema actually locates in another schema file, so you need to edit the referenced schema file. But I don't find from RPE where to open that file directly. Here is something you can do to edit the schema outside of RPE, it's kind of of complicated though..
1) inside RPE right click on the schema file in outline view, select 'open schema in editor', the schema file name will appear:
2) locate your .dta file, it is actually a zipped file so you can open it using tools like 7-zip, and find the schema file matching the name in step 1) under \schemas fold
3) open the _RPE_MAPPINGS_ file, and find the schema file matching 'https://clm.jkebanking.net/qm/service/com.ibm.rqm.integration.service.IIntegrationService/schema/qm.xsd'. Open that schema file and add a new element of customized section for testplan (I created an element named com.ibm.rqm.planning.editor.section.test for example).
4)copy the updated schema file back to the .dta zip file. Reopen it in RPE.
Step 1. create the customized section in test plan template using RQM web UI.
Step 2. Generate the test plan using the test plan created in Step 1.
Step 3. Retrieving the customized section ID (generated by RQM automatically). Many handy tools can be used here. I am using Poster. Put the following URI enquiry:
https://server:port/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Project Area Name/testplan?fields=feed/entry/content/testplan[title='test plan name in Step 2']/(*)abbreviate=false
The return messages will contain all the resources under the requested test plan. The bold font shows the internal ID for customized section "Environment" e. g.
</com.ibm.rqm.planning.editor.section.dynamicSection_1381893903332 extensionDisplayName="Environment">
<div xmlns="http://www.w3.org/1999/xhtml">this is environment</div>
Step 4. Edit XML schema file as described by Chong yuan. Make sure the "name" field is the same as the section ID. It does not matter with "documentation" field. And the "label" field will be the same as Section Name, which is "Environment". Note it is important to match the RQM internal ID, otherwise it will not work.
Enjoy RPE.
Comments
Thanks Collin for providing the further details here.
There is no bold font in your comments. So which one is the id you are referring to:1381893903332 or not?
It is not clear which is the "name field" you suggested it need to be section ID, is it name= com.ibm.rqm.planning.editor.section.test above documentation field?
Can you please clarify a bit more? Thanks
The ID refers to "com.ibm.rqm.planning.editor.section.dynamicSection_1381893903332 ". Yes, the "name" field that was shown in above graph = com.ibm.rqm.planning.editor.section.test. The "name" field needs to exactly match the ID field obtained from the Poster return as I explained before. Hope it will help.
Thanks Collin for the further clarification. It is very clear now.
I answered my own question! Here is my workflow:
- Use an internet browser to "Inspect Element" on the custom QM test script section in order to identify its unique section ID.
- Construct an XML snippet like Exhibit A, customizing the unique section ID (in this case, 1546300150765), the documentation tag value (pop-up tooltip from RPE schema explorer), and the label tag value (what is displayed in the RPE schema explorer hierarchy)
- In RPE Studio, open template and open the RQM QM schema that is dedicated to the test script in the schema editor
- Navigate through the schema source to the tag <xs:element name="testscript"> (see Triangle in graphic below)
- Insert the customized XML snipped (Exhibit A) as a child element of Exhibit B in the test script schema source (see Circle in graphic below)
- Save the schema source
- Save the template
- Begin querying the custom test script section in the template
EXHIBIT A<xs:element maxOccurs="1" minOccurs="0" name="com.ibm.rqm.planning.editor.section.dynamicSection_1546300150765" type="qm:richTextSection"><xs:annotation><xs:documentation xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="en">Test Script Tables Section</xs:documentation><xs:appinfo><label>Test Script Tables Section</label></xs:appinfo></xs:annotation></xs:element>
EXHIBIT B<xs:element name="testscript"><xs:annotation><xs:documentation xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="en">The execution script for a manual test.</xs:documentation></xs:annotation><xs:complexType><xs:complexContent><xs:extension base="reportableArtifact"><xs:sequence>