Import test cases into Jira with a CSV test case template
A ready-to-import CSV of 10 test cases, the fields each case needs, and how to import and export test cases with Jira’s own CSV tools.
Jira’s work types are general ones such as Story, Task and Bug, with no test case among them, but its CSV importer will bring a spreadsheet of test cases in as work items, and its export takes them back out. This page gives a ready-to-import CSV of 10 test cases for a web shop’s login and checkout, the fields each case needs, and the steps to import and export them with what Jira already has.
The steps need the most care: a cell with line breaks that isn’t wrapped in quotes splits into extra rows, and the steps never arrive. The template avoids that by keeping each case’s steps in one quoted cell, one line per step, which is how Jira’s importer handles multi-line text.
The fields a test case needs
| Field | What goes in it | Where it lives in Jira |
|---|---|---|
| Summary | What the test proves, in one line: “Declined card shows an error and keeps the cart” | Summary |
| Preconditions | The state before step 1: accounts, data, settings | A paragraph field |
| Steps | Numbered actions, one per line, with the test data they use | A paragraph field |
| Expected result | What a pass looks like, specific enough that two testers agree | A paragraph field |
| Priority | How much a failure would hurt | Priority |
| Component | The product area, such as Login or Checkout | Components (company-managed spaces only) or a label |
| Labels | The suites it belongs to, such as smoke or regression | Labels |
| Requirement | The story the test covers | A work item link |
Separate fields beat one long description: each can be a column in a search, a column in an export, and a target for JQL text search, such as "Expected result" ~ "declined".
The CSV template
Download test-case-template-for-jira.csv. It holds 10 cases, five for login and five for checkout. Here are the header and the first two rows:
Summary,Work type,Priority,Component,Labels,Preconditions,Steps,Expected result,Requirement
Sign in with a valid email and password,Test,High,Login,smoke,An active customer account exists for qa.buyer@example.com.,"1. Open /login.
2. Enter qa.buyer@example.com and the account's password.
3. Select Sign in.",The account dashboard opens and the header shows the customer's first name.,SHOP-101
Wrong password shows an error and keeps the email,Test,Medium,Login,regression,An active customer account exists for qa.buyer@example.com.,"1. Open /login.
2. Enter qa.buyer@example.com and a wrong password.
3. Select Sign in.","The form shows ""Email or password is incorrect"". The email field keeps its value and the password field is empty.",SHOP-101
All ten cases:
| Summary | Priority | Component | Label | Requirement |
|---|---|---|---|---|
| Sign in with a valid email and password | High | Login | smoke | SHOP-101 |
| Wrong password shows an error and keeps the email | Medium | Login | regression | SHOP-101 |
| Account locks after five failed sign-in attempts | High | Login | regression | SHOP-101 |
| Reset a forgotten password from the emailed link | High | Login | regression | SHOP-102 |
| Remember me keeps the customer signed in after a browser restart | Low | Login | regression | SHOP-101 |
| Guest checkout with a card | Highest | Checkout | smoke | SHOP-110 |
| Pay with a saved card while signed in | High | Checkout | regression | SHOP-111 |
| Declined card shows an error and keeps the cart | High | Checkout | regression | SHOP-110 |
| Discount code reduces the order total | Medium | Checkout | regression | SHOP-112 |
| Invalid ZIP code stops checkout at the shipping step | Medium | Checkout | regression | SHOP-113 |
A few rules the file follows, from Atlassian’s guide to preparing a CSV file:
- A cell with line breaks, commas or quotes is wrapped in double quotes, and a quote inside it is doubled:
""Your card was declined"". - Every row has all nine columns. An empty cell still needs its comma.
- The header row has no punctuation apart from the commas.
- For more than one label, repeat the column:
Labels,Labelsholds two.
Replace the requirement keys (SHOP-101 and the rest) with your own stories, or delete that column.
Prepare Jira for the import
Do this once, before the first import:
- Add a Test work type. In a company-managed space, a Jira admin goes to Settings > Work items > Work types > Add work type, picks a standard work type, and adds it to the space’s work type scheme. In a team-managed space, a space admin goes to Space settings > Work types > Add work type.
- Add three paragraph fields: Preconditions, Steps and Expected result. In a company-managed space, go to Settings > Work items > Fields > Create new field, choose Paragraph, then add each field to the Test work type’s screens. In a team-managed space, open the Test work type under Space settings > Work types and drag a Paragraph field into it for each one.
- Add a link type for coverage. A Jira admin goes to Settings > Work items > Work item linking and adds a link type named Tests, with the outward description “tests” and the inward description “is tested by”. Link types are shared across the site. If you use Advanced Test Management, skip this step: its setup creates a Covers link type.
- Create the Login and Checkout components in a company-managed space. In a team-managed space, which has no components, rename the Component header to Labels before you import. Jira reads columns with the same header as values for one field, so each case gets both labels, such as Login and smoke.
Import the CSV
Space admins with the Create work items and Make bulk changes permissions can run Jira’s CSV importer:
- In the sidebar, select Filters, then Search work items.
- Select More actions (•••), then Import work items from CSV.
- Choose the file, select Next, and fill in the details it asks for, such as the space. Leave the delimiter as a comma.
- Map each column to a field: Summary, Work type, Priority, Component and Labels to the fields of the same name, and Preconditions, Steps and Expected result to your paragraph fields.
- If the list offers your Tests link type, map Requirement to it. The importer uses the outward description, so each imported case “tests” the key in its cell, and that work item must already exist. Try two or three rows first and check the link direction.
- Select Map field value where your values differ from Jira’s, such as a work type called Test Case instead of Test.
- Select Validate to check for errors, then Begin import. Save the configuration when it’s offered, so the next file maps itself.
Because the Steps cell is quoted, its line breaks survive the import, and each step lands on its own line in the field.
People who aren’t Jira admins can import only a limited number of work items per file. For a bigger spreadsheet, split it, or ask a Jira admin to use Settings > System > External system import, which can also import parent and child work items.
Export test cases from Jira
-
Search for the cases you want, for example:
project = SHOP AND type = Test AND component = Checkout ORDER BY priority DESC, key ASC -
Add Preconditions, Steps and Expected result as columns in the list if you plan to export only the current fields.
-
Select ••• > Export, then Export Excel CSV (all fields) or Export Excel CSV (current fields).
The export options also include Word and XML. To work in a spreadsheet, Atlassian recommends the Open in Microsoft Excel or Open in Google Sheets icons above the results over uploading a downloaded CSV into those apps. Exported column names may not match the template’s headers, so check them before you import the file into another space.
Import and export with Advanced Test Management
Advanced Test Management for Jira gives a test case more structure than three text fields. Its setup adds a Test Case work type with Test Type, Automation Status and Automation Key fields, and each case holds preconditions plus numbered steps, each step with an action, optional test data and its own expected result (Tests tab, custom fields).
Moving cases in bulk takes two tools, because a Test Case is part Jira work item and part app data:
- Jira for the work item. Test Cases are ordinary Jira work items, created and changed like any other, and Jira’s export includes their summary, priority and other Jira fields.
- The app’s REST API for the steps. Steps and preconditions are app data, so they go in and come out through the REST API:
PUT /testCases/{issueKey}writes the preconditions and the list of steps, andGETreturns them as JSON. A site admin has to switch on app REST APIs, and calls need an OAuth 2.0 integration from Atlassian’s developer console, so it’s a job for someone comfortable with scripts.
To bring this template into a space where the app is set up, map Work type to Test Case with Map field value. If the importer offers link types, map Requirement to the app’s Covers link instead of a Tests link type, so the Coverage tab counts each case at once. Preconditions, Steps and Expected result still land in plain text fields: a script can read them back and send each case’s steps to PUT /testCases/{issueKey}, one step per line.
For coverage, the app reads a Covers link from each Test Case to its requirement, which Covers requirement sets when you create a case on the Tests tab. To group cases, tick them on the Tests tab and select Add to… to put up to 500 at once in a Test Set or Test Plan.
Mistakes that break an import
- Steps split into extra rows. A cell with line breaks wasn’t wrapped in quotes. Spreadsheet apps add the quotes when they save as CSV; hand-edited files often don’t.
- Shifted columns. A row is missing the comma for an empty cell, so every value after it lands one column early.
- Values Jira doesn’t know. A priority, work type or component spelled differently from Jira’s. Match them with Map field value instead of letting near-duplicates in.
- Everything at once. Import five rows, open one case and check every field and link, then import the rest.
- One case, many behaviors. If an expected result needs “and also”, split the case. Smaller cases fail for one reason, which makes the failure easier to read.
Questions
Can each test step be its own row in the CSV?
Not with Jira’s importer: one row becomes one work item. Keep all of a case’s steps in one quoted cell, one line per step.
Why did my test cases import without their steps?
Check two things: that the Steps column was mapped to a field, and that its cell was wrapped in double quotes, since unquoted line breaks split the row. Then select Validate before you import.
Is there a limit on how many test cases I can import at once?
For people who aren’t Jira admins, yes: Atlassian caps the number of work items per CSV file. Split a large spreadsheet into several files, or ask a Jira admin to import it through External system import.
Does Jira come with a test case work type?
No. Jira’s software spaces start with work types such as Story, Task and Bug. A Test work type is one you add yourself, or one a test management app adds for you.
Keep reading
Try Advanced Test Management for Jira
Write, organize and run your tests in Jira, right next to the work items they verify. Link every test case to its requirement, record every run, and see what’s covered and what’s failing at a glance.