How to export external ID with prefix

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
ricardo_pinto
TestLink user
Posts: 2
Joined: Sat Nov 01, 2014 8:36 am

How to export external ID with prefix

Post by ricardo_pinto »

When I export all test suites to a xml file testlink (1.9.12) do not export prefix it only export test case number in externalid element.

Ex: if test project prefix is "PROJ_TST" for first tests case in xml created by testlink element is <externalid><![CDATA[1]]></externalid> instead of <externalid><![CDATA[PROJ_TST-1]]></externalid>

What I understand is that "externalid= test project prefix + test case number" but I do not understand why testlink do not export external ID with project prefix
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: How to export external ID with prefix

Post by fman »

1. If Test Cases are exported from a test project with target of be used on another test project, prefix has no use.
2. If Test Cases are exported from a test project with target of be used on another testlink installation and you want to have same prefix, only thing you need to do is create test project on target system with same prefix.

that's why prefix is not exported.
there is no way to export it without custom development
This feature is not interesting for stable code => please do not open issue request on Mantis.
IMHO you can make your customization with a minor work.
ricardo_pinto
TestLink user
Posts: 2
Joined: Sat Nov 01, 2014 8:36 am

Re: How to export external ID with prefix

Post by ricardo_pinto »

Thanks for your answer

You are right I forgot to tell you why I would like to export also the prefix.

The 2 use cases you described it not my target.
My target is to use testlink exported xml file in an external tool. External tool is Reqtify, that’s allowing me to check traceability between test cases and requirements: it lets me to verify that I covered all requirements with test cases wrote in testlink.
On this tool, test case ID (or name) is the external_id , and since it’s just a number it’s not convenient.
Since testlink is not able to export prefix I will add it manually.

I will not create any Mantis request.

Where I can make this customization? by modifying 'exportTestCaseDataToXML' function of testcase.class.php file?
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: How to export external ID with prefix

Post by fman »

I understand now your needs, I will check what code need to be modified and provide feedback
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: How to export external ID with prefix

Post by fman »

I've change my mind, I will use more time to explain you how to do that develop it myself.
stay tunned
http://mantis.testlink.org/view.php?id=6786
Post Reply