Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Do you want to migrate tests from other tools? If you are able to export them to a an Excel/CSV file, then you may import the tests to Jira using also using the instructions bellowbelow.  Note that Xray's Test Case importer is the recommended tool for this purpose and not Jira's native CSV importer as detailed here.

If you need guidance on a specific use case, please contact us.

...

You can import Test definitions from external sources using CSV files, either by using Xray's Test Case importer (recommended) or Jira's native CSV importer plugin (see Importing Data from CSV).

This page explaing the later procedure, which is more generic and supports importing of all Test types. However, for manual Tests you should use Xray's Test Case importer.


To import issues using Jira's CSV importer, as an administrator, you have to:

...

In order to import Manual Tests in a CSV file to Jira, you need to define the following columns:

  • "Test Type", ensuring its value is "Manual"
  • "Manual Test Steps"; this is the custom field in the JSON list format representing all your manual steps. Here is Next follows an example of the "Manual Test Steps" custom field:; due to CSV format, double quotes within this field have to be escaped whenever writing it into the CSV.


Code Block
languagehtml/xml
[
   {
      "index":1,
      "fields":{
         "Action":"Step 1 action",
         "Data":"",
         "Expected Result":"Expected result",
         "Limit date":"06 Jun 2020"
      },
      "attachments":[
         {
            "fileName":"Xray Unit Testing.docx",
            "fileIcon":"word.gif",
            "mimeType":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
            "fileIconAlt":"Microsoft Word",
            "fileSize":"506 kB",
            "numericalFileSize":517880,
            "created":"2020-06-04T22:46:21+01:00",
            "createdDate":"Jun 4, 2020 10:46:21 PM",
            "author":"admin",
            "authorFullName":"john",
            "filePath":"valid/local/path/to/server/inside/jira/directory"
         }
      ]
   },
   {
      "index":2,
      "fields":{
         "Action":"Step 2 action",
         "Data":"",
         "Expected Result":"Expected result",
         "Limit date":"07 Jun 2020"
      },
      "attachments":[

      ]
   }
]


This is a  very basic example containing two test cases, having 2 steps each.

Code Block
titleExample of CSV file with manual tests
Summary; Assignee; Reporter; Issue Type; Description; Test Type; Manual Test Steps
"Basic Test issue"; admin; admin; Test; "This is a basic Test issue"; "Manual"; "[{""index"":1,""fields"":{""action"":""Step 1 action"",""data"":"""",""expected result"":""Expected result""},""attachments"":[]},{""index"":2,""fields"":{""Action"":""Step 2 action"",""Data"": """", ""Expected result"":""Expected result""},""attachments"":[]}]"
"Another basic Test issue"; admin; admin; Test; "This is another basic Test issue"; "Manual"; "[{""index"":1,""fields"":{""action"":""Step 1 action"",""data"":"""",""expected result"":""Expected result""},""attachments"":[]},{""index"":2,""fields"":{""Action"":""Step 2 action"",""Data"": """", ""Expected result"":""Expected result""},""attachments"":[]}]"


This second example shows more complex/complete scenarios, detailing how to specify attachments, additional Xray step custom fields.

Code Block
titleExample of CSV file with manual tests
Summary; Assignee; Reporter; Issue Type; Description; Test Type; Manual Test Steps
"Test issue 1"; admin; admin; 10000; "This is a Test issue"; "Manual"; "[{""index"":1,""fields"":{""Action":""Step 1 action"",""Data"":"""",""Expected Result"":""Expected result","Limit date":"06 Jun 2020"},""attachments"":[{""fileName"":""Xray Unit Testing.docx"",""fileIcon"":""word.gif"",""mimeType"":""application/vnd.openxmlformats-officedocument.wordprocessingml.document"",""fileIconAlt"":""Microsoft Word"",""fileSize"":""506 kB"",""numericalFileSize"":517880,""created"":""2020-06-04T22:46:21+01:00"",""createdDate":""Jun 4, 2020 10:46:21 PM"",""author"":""admin"",""authorFullName"":""bruce wayne"",""filePath"":""/jira/postgres/870/home/data/attachments/IMCSV/10000/IMCSV-1/xray_3883""}]},{""index"":2,""fields"":{""Action"":""Step 2 action"",""Data"":"""",""Expected Result"":""Expected result"",""Limit date"":"07 Jun 2020""},""attachments"":[]}]"
"Test issue 2"; admin; admin; 10000; "This is a Test issue"; "Manual"; "[{""index"":1,""fields"":{""Action"":""Step 1 action"",""Data"":"""",""Expected Result"":""Expected result"",""Limit date"":""06 Jun 2020""},""attachments"":[]},{""index"":2,""fields"":{""Action"":""Step 2 action"","Data":"""",""Expected Result"":""Expected result"",""Limit date"":""07 Jun 2020""},""attachments"":[]}]"
Tip
titleHow to optimize this process

Some organizations already have Manual Test definitions in spreadsheets. These spreadsheets normally define all Tests to execute and within each Test, their steps. This is the main reason why  Xray's Test Case importer is a better alternative for importing Manual Tests.

Before Xray for Jira 2.1, you could use a special converter tool (now deprecated) for converting these spreadsheet Test definitions, more specifically the Test Steps, into the JSON format above expected by Xray and Jira.

...

                Each approach can be achieved using the REST API, and the POST /rest/raven/1.0/import/execution endpoint. You just need to know in advance the Test Execution key and also the issues keys for each Test that is part of the Test Execution.

Configuring maximum allowed attachment size

The maximum allowed size for the Test Case Importer is the same as Jira's for CSV imports.