System Verification Formal test plan for system verification. User Acceptance Strategy document for user acceptance testing and sign-off Master Test Strategy Defines testing for the Release 1 of JKE Banking. Significant capabilities being added in Release 1 include the Money that Matters initiative whereby account holders can elect to redirect dividends from their investments to causes needing assistance. Development Test Encompasses the testing done by the development team during each sprint Work-around How to handle RQM grid sections with RPE
Massimo Caprinali IBM Rational Software Services Introduction Purpose what this document is about This document will explain how to use RQM grid sections in RPE report template. Edit qm.xsd schema to respect your dynamic grid sections Download stylesheet.xml to discover grid section name https://<host>:<port>/qm/service/com.ibm.rqm.integration.service.iintegrati onservice/<projectalias>/<resourcetype>/urn:com.ibm.rqm:<resource>:<id>?sty lesheet=true For example, testplan with id 12 https://<host>:<port>/qm/service/com.ibm.rqm.integration.service.iintegrati onservice/<projectalias>/testplan/urn:com.ibm.rqm:testplan:12?stylesheet=tr ue The output is something like that:
<?xml version="1.0" encoding="utf-8"?> <ns17:stylesheet xmlns:ns17="http://www.w3.org/1999/xsl/transform" > <ns4:sections> <ns4:section id="com.ibm.rqm.planning.editor.section.plansummary" name="rqm-key-tp-summary-title"/> <ns4:section id="com.ibm.rqm.planning.editor.section.planbusinessobjectives" name="rqm-key-tp-buss-obj-title"/> <ns4:section id="com.ibm.rqm.planning.editor.section.plantestobjectives" name="rqm-key-tp-test-obj-title"/> <ns4:section id="com.ibm.rqm.process.editor.section.review" name="rqm-key-proc-review-title"/> <ns4:section id="com.ibm.rqm.defects.web.rmcollinks" name="rqm-key-rm-col-section-title"/> <ns4:section id="com.ibm.rqm.defects.web.cmdevplanlinks" name="rqm-key-dp-section-title"/> <ns4:section id="com.ibm.rqm.risk.editor.section.planassessment" name="rqm-key-tp-risk-title"/> <ns4:section id="com.ibm.rqm.process.editor.section.timebox" name="rqm-key-proc-timebox-title"/> <ns4:section id="com.ibm.rqm.process.editor.section.sizing" name="rqm-key-proc-sizing-title"/> <ns4:section id="com.ibm.rqm.planning.editor.section.planenvironment" name="rqm-key-tp-env-title"/> <ns4:section id="com.ibm.rqm.process.web.qualitygoalsection" name="rqm-key-proc-quality-goal-title"/> <ns4:section id="com.ibm.rqm.process.web.entrycriteria" name="rqm-key-proc-entry-criteria-title"/> <ns4:section id="com.ibm.rqm.process.web.exitcriteria" name="rqm-key-proc-exit-criteria-title"/> <ns4:section id="com.ibm.rqm.planning.editor.section.plantestsuites" name="rqm-key-tp-test-suites-title"/> <ns4:section id="com.ibm.rqm.planning.editor.section.plantestcases" name="rqm-key-tp-test-cases-title"/> <ns4:section id="com.ibm.rqm.planning.editor.section.plantestcaseexecutionrecords" name="rqm-key-tp-tcer-title"/> <ns4:section id="com.ibm.rqm.planning.editor.section.planresources" name="rqm-key-tp-resources-title"/> <ns4:section id="com.ibm.rqm.planning.editor.section.attachments" name="rqm-key-attachments-title"/> <ns4:section id="com.ibm.rqm.planning.editor.section.dynamicgridsection_1408626561321" name="custom Grid Section"/> </ns4:sections> </ns17:stylesheet> Find id of your custom grid section In xml downloaded from the previous step, find the id of your section. In the example is com.ibm.rqm.planning.editor.section.dynamicgridsection_1408626561321 Add your custom section definition into qm.xsd in RPE a) Edit qm.xsd schema in RPE Document Studio with XML Schema Editor
b) Inside these tags <xs:element name="tbestplan">/<xs:complextype>/<xs:complexcontent>/<xs:extension base="reportableartifact">/<xs:sequence> insert this: <xs:element name="testplan"> <xs:complextype> <xs:complexcontent> <xs:extension base="reportableartifact"> <xs:sequence> <xs:element maxoccurs="1" minoccurs="0" name="com.ibm.rqm.planning.editor.section.dynamicgridsection_1408626561321" type="xs:string"> <xs:annotation> <xs:appinfo> <label>custom Grid Section</label> </xs:appinfo> </xs:annotation> </xs:element> </xs:sequence> </xs:extension> </xs:complexcontent> </xs:complextype> </xs:element> c) Replace the name attribute and the label value in accordance with your custom section. Remember to insert the xml in the correct resource tag (<xs:element name="testplan">, <xs:element name="testcase">, etc.) d) Save the schema Get JSON data with RPE a) Create six variables like these: - jsonsection to store JSON data from REST call - jsonobject to store JSON Array Object - jsonvalues to store JSON rows - row index to iterate over JSON Array - currentrowarray to store JSON Object that represent a row - total rows in the JSON Array b) In a container, assign the variable jsonsection to your custom attribute _value
c) Recreate the following structure d) In the container Get JSON Object assign the variable jsonobject to this Script Expression
var JSON;if(!JSON)JSON=(function()... function getjsonobj(jsonstring) var arr = JSON.parse(jsonString); return arr; try getjsonobj(jsonsection); catch(err) null; ATTENTION: The complete script is here e) In the container Get JSON Values Array assign the variable jsonvalues to this Script Expression jsonobject.value; f) In the container Get JSON Values Array Row Count assign the variable row to this Script Expression 0; and assign the variable rowcount to this Script Expression jsonvalues.length; g) Create a condition for the table element rowcount > 0 h) In the container Assign Current Row assign the variable currentrowarray to this Script Expression function getrow(row) return jsonvalues[row]; try getrow(row); catch(err) java.lang.system.err.println(err); "";
i) For each cell text get data stored in the variable currentrowarray[col] (0 position = column 1) j) In the container Increment Row assign the variable row to this Script Expression row+1; k) In each cells insert a Text Element with this Script Expression: currentrowarray[0]; // for 1 st column currentrowarray[1]; currentrowarray[2]; // for 2 nd column // for 3 rd column and so on