RQMExcelImporter: why testsuite linking to testcase needs testcase external id to be specified?
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
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.
Comments
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).
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".