It's all about the answers!

Ask a question

Help required using the RQMExcelWordImporter utility - Custom Attributes


Anthony Paul (7021821) | asked Oct 18 '12, 9:17 a.m.
I have been playing around with the RQMExcelWordImporter utility and was wondering if anyone could help with a problem I have configuring the config file.

I have created a template and have configured the associated config file, but the one type of field I can't get it to populate is the "Custom Attribute". According to:


"we can config the .cfg file like
//for testcaseCustomAttribute1 put identifier in Excel Cell M3 and name in Cell N3 and type in Cell M4.  
testcase.customAttributes identifier=M3.name=N3.type=M4.value=O"

I tried following the above but couldn't get it working. What is the identifier. I tried the name of the attribute but that didn't work. Looked in RQM to see where this value was defined but couldn't find it.

Any help on this would be much appreciated. 

Accepted answer


permanent link
Hao Wan (1.5k35) | answered Oct 21 '12, 9:53 p.m.
JAZZ DEVELOPER
Hi Anthony,
which version of Excel Importer are you using,
the syntax for 4.0.1 is
testcase.customAttributes identifier=M3.name=N3.type=M4.value=O"
but you said you are using syntax like
testcase.customAttributes.type="SMALL_STRING" 
testcase.customAttributes.identifier="Test_Data"
testcase.customAttributes.name="Test Data"
testcase.customAttributes.value=G

would you please update to Excel Importer 4.0.1 and have another try?
Anthony Paul selected this answer as the correct answer

4 other answers



permanent link
Hao Wan (1.5k35) | answered Oct 18 '12, 10:34 a.m.
JAZZ DEVELOPER
Hi Anthony,
The identifier based on the URL encoded form of a custom attribute initial name. This identifier is never changes once created.
you can create one test artifact with custom attribute on the web UI then using REST client such as Poster to get the xml of the test artifact to see what's the value of identifier.

permanent link
Anthony Paul (7021821) | answered Oct 19 '12, 7:09 a.m.
edited Oct 19 '12, 7:12 a.m.
 Many thanks for your help finally got Poster working and got the required values.

The Name and Identifier for me were the same, but the problem was that I didn't specify the Type in the config file.

The instructions said it would default to "Small String", but guess it didn't

For anybody else that has this problem here is how my config file reads in regards to custom attributes:

testcase.customAttributes.type="SMALL_STRING" 
testcase.customAttributes.identifier="Deadlines"
testcase.customAttributes.name="Deadlines"
testcase.customAttributes.value="Test Value"




permanent link
Anthony Paul (7021821) | answered Oct 19 '12, 8:46 a.m.
 Hi again,

So have been having more of a play and have found more problems.

Problem 1:

If I set the Value to something fixed like "Test Value" for a custom attribute its fine, but when I put in a reference to a spreadsheet then it doesn't work.

eg.

testcase.customAttributes.type="SMALL_STRING" 
testcase.customAttributes.identifier="Deadlines"
testcase.customAttributes.name="Deadlines"
testcase.customAttributes.value=E                            instead of testcase.customAttributes.value="Test Value"


When I export to XML from the utility it looks like this:

-<customAttributes> -<customAttribute type="SMALL_STRING"> <identifier>Deadlines</identifier> <name>Deadlines</name> <value>ABC</value> </customAttribute> -<customAttribute type="SMALL_STRING"> <identifier>Deadlines</identifier> <name>Deadlines</name> </customAttribute> </customAttributes>

Its adds the attribute Deadlines twice and on the second one there is no value. 

Problem 2:

If I put in the config file multiple attributes its only takes the first one and imports it. It ignores the other custom attributes.

Here is my config file.

What am I doing wrong?

Cheers

// This configuration file creates a test case with each test script and links them.
// The linking is accomplished by self referential data


// Start looking for scripts after row 2
testscript.XLSStartRow=2

// use the data in the first row of a found script's column A
testscript.XLSArtifactID=A
testscript.dc:title=A
testscript.dc:description=F
testscript.category term="Test Phase".value=B
testscript.category term="Test Area".value=C


// the literal "execution" will be put into the step type tag, so all steps will be of type execution
testscript.steps.type="execution"
testscript.steps.description=J
testscript.steps.title=I
testscript.steps.name=I
testscript.steps.expectedResult=K

// a new script starts when we encounter an empty row
testscript.XLSDelimeter=\n
// we want to use the data we got for each test script to create a test case
testcase.ID=testscript.XLSArtifactID

// by refering to the testscript's field instead of the column that data comes from
// the tool will also create links to each of the test scripts.
testcase.dc:title=testscript.dc:title
testcase.dc:description=testscript.dc:description
testcase.category term="Test Phase".value=B
testcase.weight="100"

testcase.customAttributes.type="SMALL_STRING" 
testcase.customAttributes.identifier="Deadlines"
testcase.customAttributes.name="Deadlines"
testcase.customAttributes.value=E

testcase.customAttributes.type="SMALL_STRING" 
testcase.customAttributes.identifier="Members_Required"
testcase.customAttributes.name="Members Required"
testcase.customAttributes.value=F

testcase.customAttributes.type="SMALL_STRING" 
testcase.customAttributes.identifier="Test_Data"
testcase.customAttributes.name="Test Data"
testcase.customAttributes.value=G


testcase.Section("myns:com.ibm.rqm.planning.editor.section.testCasePreCondition", "RQM-KEY-TC-PRE-COND-TITLE")=D


permanent link
Anthony Paul (7021821) | answered Oct 22 '12, 10:16 a.m.
 Hi Hao,

Many thanks, i was using version 4.0 and upgraded to 4.0.1 and the problems I had, have resolved themselves.



Comments
gilad mor piperberg commented Feb 21 '13, 7:34 a.m.

I have the same problem, but in exporter 4.0.1
can you please send me the exact line you entered in the cfg file.
Thanks in advance,
Gilad Mor Piperberg
Gilad.MorPiperberg@redbend.com


Anthony Paul commented Feb 21 '13, 7:43 a.m.

  Hi this is the line I used:


testscript.customAttributes identifier="Deadlines".name="Deadlines".type="SMALL_STRING".value=J

I have found that this works with Test Scripts but not with Test Cases using the "Scripts that create testcases" excel template.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.