[Closed] How to assign value to attributes in tets case using Excel Importer
I have an Custom attribute "1. Pre Condition" in Summary block in Test cases.
I need to assign value to it.
I have tried below methods which dint work:
1. testcase.variables.name="1. Pre-Conditions".value=K
2. testcase.Section("myns:com.ibm.rqm.planning.editor.section.Summary","RQM-KEY-TC-PRE-COND-TITLE")=K
Could you tell me the right way to assign values to custom attributes.
Thanks,
Regards,
Chethan Kumar R
I need to assign value to it.
I have tried below methods which dint work:
1. testcase.variables.name="1. Pre-Conditions".value=K
2. testcase.Section("myns:com.ibm.rqm.planning.editor.section.Summary","RQM-KEY-TC-PRE-COND-TITLE")=K
Could you tell me the right way to assign values to custom attributes.
Thanks,
Regards,
Chethan Kumar R
Accepted answer
You can refer to https://jazz.net/wiki/bin/view/Main/RQMExcelWordImporter#Custom_Attributes about how to get identifier.
To get Custom Attribute Identifier follow below steps :
- Create Custom Attributes for TestCase
- Create/Update a TestCase and fill value for the Custom Attributes in the TestCase.
- Perform GET of this testcase using RQMURLUtility. In the received xml you should see ns2:customAttributes tag similar to below snippet. The value of "identifier" tag is the Custom Attribute identifier. In this case Identifiers for the 2 Custom Attributes are "Custom_attribute_0_" and "Custom_attribute_1_" respectively
testcase.customAttributes identifier="_._Pre-Conditions".name="1. Pre-Conditions".type="SMALL_STRING".value=K
Please verify in your environment what the identifier should be.
Comments
Custom attribute "1. Pre-Conditions" is already available in my environment.
Could you please tell me How do i need to read custom Attributes identifier for existing Custom attribute?
In the mean time tried with testcase.customAttributes identifier="_._Pre-Conditions".name="1. Pre-Conditions".type="SMALL_STRING".value=K dint work.
One other answer
For custom attribute, the syntax is:
testcase.customAttributes identifier="<Custom_attribute_identifier>".name="1. Pre-Conditions".type="SMALL_STRING".value=K
Please see https://jazz.net/wiki/bin/view/Main/RQMExcelWordImporter#Custom_Attributes about how to get custom attribute identifier.
Comments
Could you please tell me where to find the "<custom_attribute_identifier>".
I Tried this testcase.customAttributes identifier="1.Pre-Conditions".name="1. Pre-Conditions".type="SMALL_STRING".value=K but it actually creating a new attribute. :(
Its not created in Custom Attribute section but in Artifact categeries.