It's all about the answers!

Ask a question

RQMExcelImporter: why testsuite linking to testcase needs testcase external id to be specified?


Don Yang (7.4k2195130) | asked Sep 14 '16, 8:53 p.m.
edited Sep 14 '16, 10:50 p.m.
I tested with 4.0.5 and 5.0.2 RQMExcelImporter using TestSuite with TestCases 001.cfg/TestSuite with TestCases 001.xls.
cfg file is like below:
====
testsuite.dc:title=C1
testsuite.dc:description=A4
testsuite.XLSLink=testcase


testcase.XLSStartRow=7
//testcase.XLSArtifactID=B
testcase.dc:title=B
testcase.dc:description=E
testcase.jzalm:owner=C
testcase.Section("myns:com.ibm.rqm.planning.editor.section.testCaseDesign","RQM-KEY-TC-DESIGN-TITLE")=F
testcase.Section("myns:com.ibm.rqm.planning.editor.section.testCasePreCondition","RQM-KEY-TC-PRE-COND-TITLE")=K
testcase.Section("myns:com.ibm.rqm.planning.editor.section.testCasePostCondition","RQM-KEY-TC-POST-COND-TITLE")=L
===
If I commented out testcase.XLSArtifactID=B(don't want to use XLSArtifactID keyword reference to https://jazz.net/forum/questions/227848/rqm-excel-importer-tool-602-how-to-use-the-sample-file-testsuite-with-testcases-that-have-testscriptscfg-without-xlsartifactid)
then I will get

Error sending to server Testsuite_with_testcases_that_have_testscripts2_Sheet1_1.xml of type testsuite

It looks like "testsuite.XLSLink=testcase" requires "testcase.XLSArtifactID=B" to be spedified.
I am wondering why testsuite linking to testcases using XLSLink requires XLSArtifactID?

(I understand if we have external id specified, we have other way like using Link() to link test suite and testcase but that is not an option here)

Any info would be highly appreciated.

Accepted answer


permanent link
Donald Nong (14.4k314) | answered Sep 19 '16, 3:46 a.m.
I believe this is a defect, while I tested with RQM 6.0.2 and got the same result.

When the line "testcase.XLSArtifactID=B" is removed/commented out, the test cases are created with IDs generated automatically using the Excel file name as part of the ID itself. In this particular case, the first test case created this way is "TestSuite_with_TestCases_001_Acme_Hammers_1.xml". When the test suite is being created, it incorrectly references this test case as "../testcase/TestSuite_with_TestCases_001_Acme_Hammers_1" (note the missing ".xml"), hence the error.

It may be debatable whether the test case ID should contain ".xml" or not, but the key point here is the ID being generated and the one being referenced do not match.

So no, "testcase.XLSArtifactID=B" is not required, and the test suite should handle the automatic-generated ID properly.
Don Yang selected this answer as the correct answer

Comments
Don Yang commented Sep 19 '16, 6:21 a.m. | edited Sep 19 '16, 6:22 a.m.

Thanks Donald, this sounds reasonable.
When external id is not specified, we know the external id is formed as

<Excel file name><Excel worksheet name>[<artifact count when 2 or more artifacts in the same Excel worksheet>].xml

when I exported to the file, I notice that the first test case name will be like:
TestSuite_with_TestCases_001_Acme_Hammers_1.xml
this name is duplicated as test suite name. I am not sure if "Unable to resolve the referenced test case '../testcase/TestSuite_with_TestCases_001_Acme_Hammers_1' required to create the test suite step" is because of missing .xml or it is because of the duplicate name. When external id is specified for testcase, the name will become Dead_Hammer.xml and I guess test suite will reference the test case as "../testcase/Dead_Hammer"(no .xml)  instead of ./testcase/Dead_Hammer.xml when it is created.
Anyway, need to confirm with the escalation if your theory is correct(missing .xml) or it is because of duplicate name in test suite and test case when external id is not specified(my thought).


Donald Nong commented Sep 19 '16, 8:03 p.m.

I believe it has nothing to do with the ID being the same for the first test case and the test suite itself. When you get the said error about '../testcase/TestSuite_with_TestCases_001_Acme_Hammers_1', if you try to access '../testcase/TestSuite_with_TestCases_001_Acme_Hammers_1.xml' instead, you will get the newly created test case straightaway.

If you compare with the sample "TestPlan with TestCases 001", you can see that the latter correctly references the test cases with IDs containing ".xml".

Your answer


Register or to post your answer.