What you'll learn

  • How to export test cases from Micro Focus ALM/HP QC using a script to extract the test cases and convert them to an Xray compatible CSV file
  • Import different test cases (with different fields and options)
  • Validate that the test cases were imported to Xray

Source-code for this tutorial

  • All examples are available on GitHub

Overview

Micro Focus ALM (ex HP QC) is a tool from the opentext (ex Micro Focus) toolset. In this tutorial, you will learn how to export the test cases from ALM/QC using the API, and how to use a script (available in GitHub) to convert the XML obtained from the API call into a compatible CSV, so that it can be imported into Xray using the Test Case Importer.

This tutorial will provide an example of exporting test cases (with varied characteristics) from ALM/QC and importing them into Xray.

Features and Limitations

Below is a list of the supported features and current limitations.

Migration from ALM/QC is limited by the information we can export from ALM/QC and how it can be mapped to Xray entities.

Most of the test case information will be migrated seamlessly, but please check the following table for more details.

Supported FeaturesUnsupported
  • Test and Test steps
  • Test case attachments
  • Data sets
  • Test Folder
  • Test Set
  • Test Plans
  • Defects and Requirements


How it works

Micro Focus ALM/HP QC is an application that allows the users to specify and organize test cases into folders in the TestPlan tab. ALM/QC has test sets, test folders, and plans; these concepts help the organization and execution of test cases. Depending on your testing goals, you can use them or not.

In ALM/QC, we can create test cases and choose the type of the test case between many different types that are there to support the other modules available in this toolset. The script in this tutorial only exports the Manual test types.

In the Manual test type, the user can define multiple steps with step description and expected result; in these steps, you can define a data set and use variables or call other test steps. All of the test types can use steps to define the tests and have special fields available (depending on the test type used to integrate with automation using other opentext modules).

In ALM/QC, to execute tests, you need to associate the executions to a test suite under a folder in the test lab.

ALM/QC uses different entities to describe tests and the flow, so we have summed up into the next table the existing mappings between ALM/QC and Xray.

ALM/QCXrayComments
Test CaseTest

Only manual test types are imported into Xray.




Prerequisites


We will use the Test Case Importer tool for these examples, which is present when you install Xray in your Jira instance.

 We will need:

  • Access to ALM/QC API instance to export test cases in XML format
  • Access and usage of scripts to request the test cases through the API and convert them to CSV to be imported by Xray
  • Access to a Jira instance with Xray installed
  • Only users that have the Make Bulk Changes permission will have this option available. Additionally, the user will only be able to import data into projects where he has the Create Issues permission.




Example

We will show how we configured and obtained the XML content with all tests from the Domain and Project from ALM/QC.  The following examples also show how the scripts convert the XML content extracted from the API into compatible CSV files, and finally, how to import the CSV content into Xray. All of the code is available in GitHub.

We will showcase exporting test cases from ALM/QC using a combination of fields and options that should cover most use cases.

All of the examples in this tutorial have the CSV file with the definition of the test cases to import and a configuration file that will handle all associations and fields for the import to be successful.


Export to XML from ALM/QC and import into Xray

The following script extracts all Manual tests associated to a Domain and Project from ALM/QC.

The first step is to configure the username/password and endpoint of your ALM/QC instance in the 'hpqc_config.ini' under the 'hpqc' section.

hpqc_config.ini
[hpqc]
username = USERNAME
password = PASSWORD
base_endpoint = http://HPALMQC_ENDPOINT/qcbin/


The username and password used are the ones with permissions to access your ALM/QC instance.

The endpoint (HPALMQC_ENDPOINT) is the URL you use to access your ALM/QC instance.


The script will then perform the authentication as described in the ALM/QC documentation and create a session.

Once the user and session have been created, the script uses the Domain and Project passed in the script command line to extract all Manual tests from the project on that domain.

In ALM/QC, we can see that we have four tests under the Test Plan tab, three Manual tests and one VAPI-XP-TEST for the Domain TEST and Project DEMO.


The script requests all tests from the TEST Domain and Project DEMO using the endpoint: "rest/domains/{domain}/projects/{project}/tests" that lists all tests available there.

Tests
<Entities TotalResults="2">
<Entity Type="test">
<ChildrenCount>
<Value>0</Value>
</ChildrenCount>
<Fields>
<Field Name="template">
<Value/>
</Field>
<Field Name="has-criteria">
<Value>N</Value>
</Field>
<Field Name="estimate-devtime"/>
<Field Name="check-out-user-name">
<Value/>
</Field>
<Field Name="vc-end-audit-action-id">
<Value>1</Value>
</Field>
<Field Name="vc-checkin-date"/>
<Field Name="description">
<Value/>
</Field>
<Field Name="base-test-id"/>
<Field Name="storage-path">
<Value/>
</Field>
<Field Name="timeout"/>
<Field Name="has-linkage">
<Value>N</Value>
</Field>
<Field Name="last-modified">
<Value>2023-10-17 11:31:19</Value>
</Field>
<Field Name="vc-time">
<Value/>
</Field>
<Field Name="subtype-id">
<Value>MANUAL</Value>
</Field>
<Field Name="attachment">
<Value/>
</Field>
<Field Name="vc-version-number"/>
<Field Name="creation-time">
<Value>2023-10-17</Value>
</Field>
<Field Name="id">
<Value>1</Value>
</Field>
<Field Name="text-sync">
<Value/>
</Field>
<Field Name="vc-checkin-time">
<Value/>
</Field>
<Field Name="owner">
<Value>admin</Value>
</Field>
<Field Name="ver-stamp">
<Value>45</Value>
</Field>
<Field Name="vc-comments">
<Value/>
</Field>
<Field Name="runtime-data">
<Value/>
</Field>
<Field Name="vc-start-audit-action-id">
<Value>1</Value>
</Field>
<Field Name="has-dependencies">
<Value>0</Value>
</Field>
<Field Name="order-id">
<Value>1</Value>
</Field>
<Field Name="steps">
<Value>3</Value>
</Field>
<Field Name="exec-status">
<Value>Passed</Value>
</Field>
<Field Name="dev-comments">
<Value/>
</Field>
<Field Name="vc-checkin-comments">
<Value/>
</Field>
<Field Name="vc-date"/>
<Field Name="vc-status">
<Value/>
</Field>
<Field Name="name">
<Value>login</Value>
</Field>
<Field Name="parent-id">
<Value>1001</Value>
</Field>
<Field Name="vc-checkin-user-name">
<Value/>
</Field>
<Field Name="step-param">
<Value>0</Value>
</Field>
<Field Name="configurations-count">
<Value>2</Value>
</Field>
<Field Name="status">
<Value>Design</Value>
</Field>
</Fields>
<RelatedEntities/>
</Entity>
<Entity Type="test">
<ChildrenCount>
<Value>0</Value>
</ChildrenCount>
<Fields>
<Field Name="template">
<Value/>
</Field>
<Field Name="has-criteria">
<Value>N</Value>
</Field>
<Field Name="estimate-devtime"/>
<Field Name="check-out-user-name">
<Value/>
</Field>
<Field Name="vc-end-audit-action-id">
<Value>26</Value>
</Field>
<Field Name="vc-checkin-date"/>
<Field Name="description">
<Value><html><body> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Logout test descriptions</span></font> </div> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><b>Bold </b></span></font> </div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><i>Italic</i></span></font> </div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Underline</u></span></font> </div> <div align="left" style="min-height:9pt"></div> <table width="566" cellpadding="0" cellspacing="0" style="table-layout:fixed;border-collapse:collapse;border-width:0px;border-color:#010101"> <colgroup> <col width="189" /> </colgroup> <colgroup> <col width="189" /> </colgroup> <colgroup> <col width="189" /> </colgroup> <tbody> <tr> <td align="left" valign="top" width="182" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Header1</u></span></font> </div> </td> <td align="left" valign="top" width="182" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Header2</u></span></font> </div> </td> <td align="left" valign="top" width="182" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Header3</u></span></font> </div> </td> </tr> <tr> <td align="left" valign="top" width="182" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Row11</u></span></font> </div> </td> <td align="left" valign="top" width="182" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Row12</u></span></font> </div> </td> <td align="left" valign="top" width="182" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Row13</u></span></font> </div> </td> </tr> <tr> <td align="left" valign="top" width="182" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Row21</u></span></font> </div> </td> <td align="left" valign="top" width="182" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Row22</u></span></font> </div> </td> <td align="left" valign="top" width="182" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Row23</u></span></font> </div> </td> </tr> </tbody> </table> <div align="left" style="min-height:9pt"></div> <div align="left" style="margin-left:3mm;margin-right:0mm;text-indent:0mm;margin-top:0mm;margin-bottom:0mm;min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><b>Bullet list</b></span></font> </div> <ul style="margin-top:0mm;margin-bottom:0mm;margin-left:0mm;padding-left:0pt;list-style-type:disc"> <li style="margin-left:24pt;margin-right:0pt;padding-left:0pt;text-indent:0pt;font-size:10pt;color:#010101"><font face="Arial"><span dir="ltr" style="font-size:8pt;font-family:'arial';color:#010101;font-weight:normal;font-style:normal"><u>Item1</u></span></font></li> <li style="margin-left:24pt;margin-right:0pt;padding-left:0pt;text-indent:0pt;font-size:10pt;color:#010101"><font face="Arial"><span dir="ltr" style="font-size:8pt;font-family:'arial';color:#010101;font-weight:normal;font-style:normal"><u>Item2</u></span></font></li> </ul> </body></html></Value>
</Field>
<Field Name="base-test-id"/>
<Field Name="storage-path">
<Value/>
</Field>
<Field Name="timeout"/>
<Field Name="has-linkage">
<Value>N</Value>
</Field>
<Field Name="last-modified">
<Value>2023-10-18 07:59:15</Value>
</Field>
<Field Name="vc-time">
<Value/>
</Field>
<Field Name="subtype-id">
<Value>MANUAL</Value>
</Field>
<Field Name="attachment">
<Value/>
</Field>
<Field Name="vc-version-number"/>
<Field Name="creation-time">
<Value>2023-10-17</Value>
</Field>
<Field Name="id">
<Value>2</Value>
</Field>
<Field Name="text-sync">
<Value/>
</Field>
<Field Name="vc-checkin-time">
<Value/>
</Field>
<Field Name="owner">
<Value>admin</Value>
</Field>
<Field Name="ver-stamp">
<Value>24</Value>
</Field>
<Field Name="vc-comments">
<Value/>
</Field>
<Field Name="runtime-data">
<Value/>
</Field>
<Field Name="vc-start-audit-action-id">
<Value>26</Value>
</Field>
<Field Name="has-dependencies">
<Value>0</Value>
</Field>
<Field Name="order-id">
<Value>2</Value>
</Field>
<Field Name="steps">
<Value>3</Value>
</Field>
<Field Name="exec-status">
<Value>No Run</Value>
</Field>
<Field Name="dev-comments">
<Value/>
</Field>
<Field Name="vc-checkin-comments">
<Value/>
</Field>
<Field Name="vc-date"/>
<Field Name="vc-status">
<Value/>
</Field>
<Field Name="name">
<Value>logout</Value>
</Field>
<Field Name="parent-id">
<Value>1001</Value>
</Field>
<Field Name="vc-checkin-user-name">
<Value/>
</Field>
<Field Name="step-param">
<Value>0</Value>
</Field>
<Field Name="configurations-count">
<Value>1</Value>
</Field>
<Field Name="status">
<Value>Design</Value>
</Field>
</Fields>
<RelatedEntities/>
</Entity>
<singleElementCollection>false</singleElementCollection>
</Entities>


Once that information is returned the script requests the test steps for each test present in the previous request using the endpoint: "rest/domains/{domain}/projects/{project}/design-steps?query={{parent-id[{test.id}]}}". 

The XML generated by ALM/QC that holds the steps has the following content:

TestSteps Details
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Entities TotalResults="3">
<Entity Type="design-step">
<ChildrenCount>
<Value>0</Value>
</ChildrenCount>
<Fields>
<Field Name="step-order">
<Value>1</Value>
</Field>
<Field Name="vts">
<Value>2023-10-18 08:05:22</Value>
</Field>
<Field Name="ver-stamp">
<Value>3</Value>
</Field>
<Field Name="attachment">
<Value/>
</Field>
<Field Name="has-params">
<Value/>
</Field>
<Field Name="expected">
<Value/>
</Field>
<Field Name="vc-user-name">
<Value/>
</Field>
<Field Name="name">
<Value>Call <login></Value>
</Field>
<Field Name="description">
<Value><html><body> Call <login> with the following parameters: password = <font face="Arial"><span dir="ltr" style="font-size:8pt">admin</span></font>, username = ? </body></html></Value>
</Field>
<Field Name="id">
<Value>1004</Value>
</Field>
<Field Name="link-test">
<Value>1</Value>
</Field>
<Field Name="parent-id">
<Value>2</Value>
</Field>
</Fields>
<RelatedEntities/>
</Entity>
<Entity Type="design-step">
<ChildrenCount>
<Value>0</Value>
</ChildrenCount>
<Fields>
<Field Name="step-order">
<Value>2</Value>
</Field>
<Field Name="vts">
<Value>2023-10-18 08:05:22</Value>
</Field>
<Field Name="ver-stamp">
<Value>2</Value>
</Field>
<Field Name="attachment">
<Value/>
</Field>
<Field Name="has-params">
<Value/>
</Field>
<Field Name="expected">
<Value><html><body> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Expected Result</span></font> </div> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">First step description</span></font> </div> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><b>Bold</b></span></font> </div> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><i>Italic</i></span></font> </div> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Underline</u></span></font> </div> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Table:</span></font> </div> <table width="559" cellpadding="0" cellspacing="0" style="table-layout:fixed;border-collapse:collapse;border-width:0px;border-color:#010101"> <colgroup> <col width="279" /> </colgroup> <colgroup> <col width="279" /> </colgroup> <tbody> <tr> <td align="left" valign="top" width="272" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Header 1</span></font> </div> </td> <td align="left" valign="top" width="272" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Header2</span></font> </div> </td> </tr> <tr> <td align="left" valign="top" width="272" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Row1</span></font> </div> </td> <td align="left" valign="top" width="272" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Row2</span></font> </div> </td> </tr> </tbody> </table> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Bullets</span></font> </div> <ul style="margin-top:0mm;margin-bottom:0mm;margin-left:0mm;padding-left:0pt;list-style-type:disc"> <li style="margin-left:24pt;margin-right:0pt;padding-left:0pt;text-indent:0pt;font-size:10pt;color:#010101"><font face="Arial"><span dir="ltr" style="font-size:8pt;font-family:'arial';color:#010101;font-weight:normal;font-style:normal">One point</span></font></li> <li style="margin-left:24pt;margin-right:0pt;padding-left:0pt;text-indent:0pt;font-size:10pt;color:#010101"><font face="Arial"><span dir="ltr" style="font-size:8pt;font-family:'arial';color:#010101;font-weight:normal;font-style:normal">Second point</span></font></li> </ul> <div align="left" style="min-height:9pt"></div> </body></html></Value>
</Field>
<Field Name="vc-user-name">
<Value/>
</Field>
<Field Name="name">
<Value>Step 1</Value>
</Field>
<Field Name="description">
<Value><html><body> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">First step description</span></font> </div> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><b>Bold</b></span></font> </div> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><i>Italic</i></span></font> </div> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"><u>Underline</u></span></font> </div> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Table:</span></font> </div> <table width="559" cellpadding="0" cellspacing="0" style="table-layout:fixed;border-collapse:collapse;border-width:0px;border-color:#010101"> <colgroup> <col width="279" /> </colgroup> <colgroup> <col width="279" /> </colgroup> <tbody> <tr> <td align="left" valign="top" width="272" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Header 1</span></font> </div> </td> <td align="left" valign="top" width="272" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Header2</span></font> </div> </td> </tr> <tr> <td align="left" valign="top" width="272" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Row1</span></font> </div> </td> <td align="left" valign="top" width="272" style="padding-left:4px;padding-right:4px;border:solid #010101 1px"> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Row2</span></font> </div> </td> </tr> </tbody> </table> <div align="left" style="min-height:9pt"></div> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">Bullets</span></font> </div> <ul style="margin-top:0mm;margin-bottom:0mm;margin-left:0mm;padding-left:0pt;list-style-type:disc"> <li style="margin-left:24pt;margin-right:0pt;padding-left:0pt;text-indent:0pt;font-size:10pt;color:#010101"><font face="Arial"><span dir="ltr" style="font-size:8pt;font-family:'arial';color:#010101;font-weight:normal;font-style:normal">One point</span></font></li> <li style="margin-left:24pt;margin-right:0pt;padding-left:0pt;text-indent:0pt;font-size:10pt;color:#010101"><font face="Arial"><span dir="ltr" style="font-size:8pt;font-family:'arial';color:#010101;font-weight:normal;font-style:normal">Second point</span></font></li> </ul> </body></html></Value>
</Field>
<Field Name="id">
<Value>1002</Value>
</Field>
<Field Name="link-test"/>
<Field Name="parent-id">
<Value>2</Value>
</Field>
</Fields>
<RelatedEntities/>
</Entity>
<Entity Type="design-step">
<ChildrenCount>
<Value>0</Value>
</ChildrenCount>
<Fields>
<Field Name="step-order">
<Value>3</Value>
</Field>
<Field Name="vts">
<Value>2023-10-18 08:05:22</Value>
</Field>
<Field Name="ver-stamp">
<Value>3</Value>
</Field>
<Field Name="attachment">
<Value/>
</Field>
<Field Name="has-params">
<Value>Y</Value>
</Field>
<Field Name="expected">
<Value><html><body> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt">The <<<UserName>>> appears in the username field</span></font> </div> </body></html></Value>
</Field>
<Field Name="vc-user-name">
<Value/>
</Field>
<Field Name="name">
<Value>Step 2</Value>
</Field>
<Field Name="description">
<Value><html><body> <div align="left" style="min-height:9pt"> <font face="Arial"><span dir="ltr" style="font-size:8pt"> Insert <<<UserName>>> in the username field</span></font> </div> </body></html></Value>
</Field>
<Field Name="id">
<Value>1003</Value>
</Field>
<Field Name="link-test"/>
<Field Name="parent-id">
<Value>2</Value>
</Field>
</Fields>
<RelatedEntities/>
</Entity>
<singleElementCollection>false</singleElementCollection>
</Entities>


To execute the script, use the following command:

python3 hpqc2Xray.py -p DEMO -d TEST -o hpalmqc_tests.csv


The script parses the content and converts it into a compatible CSV file.

The output file has all the test steps and the format defined in ALM/QC.

hpalmqc_tests.csv
Issue ID,Issue Key,Test Type,Test Summary,Test Priority,Action,Data,Result,IssueType,Description
1,,Manual,"login

",3,"First step description

",,"First step expected result

",,
1,,Manual,,3,"Second step description

*Bold*

_Italic_

_Underline_

Table:  
  

|Header 1|Header2|
|Row1|Row2|
|

Bullets

  * One point
  * Second point

",,"Second step expected result

*Bold*

_Italic_

_Underline_

Table:  
  

|Header 1|Header2|
|Row1|Row2|
|

Bullets

  * One point
  * Second point

",,
1,,Manual,,3,"Third step with attachments

",,"Third step with attachments

and Links  ![graphic](file://\[IMAGE_BASE_PATH_PLACEHOLDER\]Jira%20icons.png)

",,
2,,Manual,"logout

",3,"Call <login> with the following parameters: password = admin, username = ?

",,,,"Logout test descriptions

*Bold*

_Italic_

_Underline_  
  

|*Header1*|*Header2*|*Header3*|
|Row11|Row12|Row13|
|Row21|Row22|Row23|
|

*Bullet list*

  * _Item1_
  * _Item2_

"
2,,Manual,,3,"First step description

*Bold*

_Italic_

_Underline_

Table:  
  

|Header 1|Header2|
|Row1|Row2|
|

Bullets

  * One point
  * Second point

",,"Expected Result

First step description

*Bold*

_Italic_

_Underline_

Table:  
  

|Header 1|Header2|
|Row1|Row2|
|

Bullets

  * One point
  * Second point

",,
2,,Manual,,3," Insert <<<UserName>>> in the username field

",,"The <<<UserName>>> appears in the username field

",,
3,,Manual,"Checkout

",3,"First step of checkout

Ident of first step

",,"Expected result for first step of checkout

Font color blue

",,"Checkout description

  * Bullet1
  * Bullet2

"
3,,Manual,,3,"Second step of checkout

",,"Second expectation of checkout

",,




To import it into Xray, we use Test Case Importer with the recently created CSV file; you can use the configuration file provided with the .json extension (importConfiguration.json).


Choose the Project into which you want to import the Tests, as shown below.


When the import operation is complete, you can download the operation details, save the configuration for future use, or check the created issues.


When you click over the link to see the imported issues, we can see that it has created three Tests with all the properties defined in the CSV.


More Details

Let's look into some specificities of this approach and some test particularities.


Manual Tests (With Steps) into Manual Test Case

ALM/QC allows you to create Manual Test Cases with steps (using step description and expected results).

We have created three test cases using the steps separated into fields. 

After running the script that converts the XML returned from ALM/QC into a CSV file, we can see that each Test is created and the steps are filled with the information extracted from the returned requests.

Manual Tests in comic_estore.csv
  
Issue ID,Issue Key,Test Type,Test Summary,Test Priority,Action,Data,Result,IssueType,Description
1,,Manual,"login

",3,"First step description

",,"First step expected result

",,
1,,Manual,,3,"Second step description

*Bold*

_Italic_

_Underline_

Table:  
  

|Header 1|Header2|
|Row1|Row2|
|

Bullets

  * One point
  * Second point

",,"Second step expected result

*Bold*

_Italic_

_Underline_

Table:  
  

|Header 1|Header2|
|Row1|Row2|
|

Bullets

  * One point
  * Second point

",,
1,,Manual,,3,"Third step with attachments

",,"Third step with attachments

and Links  ![graphic](file://\[IMAGE_BASE_PATH_PLACEHOLDER\]Jira%20icons.png)

",,
2,,Manual,"logout

",3,"Call <login> with the following parameters: password = admin, username = ?

",,,,"Logout test descriptions

*Bold*

_Italic_

_Underline_  
  

|*Header1*|*Header2*|*Header3*|
|Row11|Row12|Row13|
|Row21|Row22|Row23|
|

*Bullet list*

  * _Item1_
  * _Item2_

"
2,,Manual,,3,"First step description

*Bold*

_Italic_

_Underline_

Table:  
  

|Header 1|Header2|
|Row1|Row2|
|

Bullets

  * One point
  * Second point

",,"Expected Result

First step description

*Bold*

_Italic_

_Underline_

Table:  
  

|Header 1|Header2|
|Row1|Row2|
|

Bullets

  * One point
  * Second point

",,
2,,Manual,,3," Insert <<<UserName>>> in the username field

",,"The <<<UserName>>> appears in the username field

",,
3,,Manual,"Checkout

",3,"First step of checkout

Ident of first step

",,"Expected result for first step of checkout

Font color blue

",,"Checkout description

  * Bullet1
  * Bullet2

"
3,,Manual,,3,"Second step of checkout

",,"Second expectation of checkout

",,

...



Even though there are more tests defined in ALM/QC the script only extracts the Manual Tests.



The Test Cases extracted use the Test Name from ALM/QC as the summary, and the description is extracted directly into the description field of Xray. Notice that most of the style format is exported into Xray also. 


In the first Test we also have several steps that were extracted from the Design Steps of the ALM/QC, the script takes the Description from ALM/QC and creates an Action in Xray. In the same way, it extracts the Expected Result from ALM/QC and creates an Expected Result on the Xray side.

The parameters and Modular tests must be recreated as the information available from ALM/QC does not include them, so they cannot be imported in Xray.

Modular test case from ALM/QC are exported as a reference to the original test case and must be recreated. 

Tests with data sets defined in ALM/QC are imported without the data set.

All style formats are maintained with the exception of the underline.

ALM/QC does not define priority, so all Manual Tests imported have the Medium priority associated.



Tips

  • Use the CSV file provided to import the examples and the associated JSON configuration to have the setup and mapping correct.
  • Ensure you are using the scripts available for the right version of Jira (Cloud or Server).