English

How do you find Jira stories without test cases, and keep that list short?

On this page

To find Jira stories without test cases, you need a query that asks which stories have nothing linked to them as a test. The query is only as good as the link between stories and tests, so the first job is to make that link something Jira can search.

This guide gives the queries to copy (no tests, failing, never run), a way to sort the list into decisions, and a short weekly routine that keeps it from growing back. The overall approach to tracking tests in Jira is in the Jira test management guide.

Why is this harder than it sounds?

A Jira story knows nothing about tests unless something connects them. Tests may be issues of a custom type, rows in an app, or links to an external tool. Atlassian Community has several threads titled along the lines of “I’m looking for a JQL to display stories that do not have test cases linked to them” and “How to query stories which have no test or have tests not in an approved status”, which shows how common the question is. The answers there depend on the tool in use, so a query that works in one setup does not carry over to another.

Two things make the gap easy to miss:

  • A story can have links to many things (epics, bugs, other stories) and still none to a test.
  • A story can have a test that was never run, which looks covered but is not verified.

So the useful question has three parts: which stories have no test, which have only failing tests, and which have tests that never ran.

Which queries find the gaps?

When tests are linked to stories in ProbeTest, each story that has at least one linked test gets coverage properties you can search in JQL. The documented values for testStatus are PASSING, FAILING, BLOCKED, NOT_RUN and IN_PROGRESS. Replace SHOP with your project key.

Question Query
Which stories have no tests? project = SHOP AND testStatus IS EMPTY
Which stories are failing? project = SHOP AND testStatus = FAILING
Which stories have tests that never ran? project = SHOP AND testStatus = NOT_RUN
Which stories are blocked? project = SHOP AND testStatus = BLOCKED

The first row is the one most people want. Because only stories with at least one linked test have a status, IS EMPTY returns the stories nobody has tested. Narrow it to what matters by adding AND issuetype = Story AND statusCategory IN ("To Do", "In Progress"), so finished work does not crowd the list.

The other coverage fields (testCount, testFailCount, testLastRun and testFailingIn) are searchable too; check the documentation for what each holds before you build a filter on it. Coverage fields can be searched but not shown as columns, so use them in filters, boards and dashboards.

Diagram Four queries, four different gaps

StoryWhat the search returns it forNext step
No test linkedtestStatus IS EMPTYWrite or link a test
Tests never runtestStatus = NOT_RUNAdd to a cycle
A test failingtestStatus = FAILINGAssign the failure
A test blockedtestStatus = BLOCKEDClear the blocker
Each list needs a different action, so keep them apart.

How do you sort the list into decisions?

A list of stories without tests is only useful if every row ends in a decision. Go through it with these four outcomes:

  1. Write a test. The story has behavior worth checking. Link a new or existing test.
  2. Link an existing test. A test already covers it but is not linked to this story.
  3. Accept the gap. A copy change, a flag flip or a config edit may not need a test. Write down why in a comment so the next reader knows it was deliberate.
  4. Close or split the story. If nobody can say how the story would be tested, it may be too vague to build.

Outcome 3 is the one that keeps the list honest. A gap you accepted on purpose is fine. A gap nobody noticed is the problem.

How do you run a weekly gap review?

Fifteen minutes is enough when the list is short. Save the “no tests” query as a filter and use this routine:

  1. Open the filter, scoped to the current sprint or the next release version.
  2. For each story, pick one of the four outcomes above and act on it.
  3. Open the FAILING and NOT_RUN filters and assign each story to a person.
  4. Note the count of stories with no tests. If it grows two weeks in a row, the team is writing stories faster than it writes tests, which is worth a conversation, not a heroic cleanup.

Put the three filters on a dashboard with Jira’s Filter results gadget, so the numbers are visible without opening anything. The same data feeds a release decision: a version with stories that have no tests is a risk to state out loud, as covered in the release readiness checklist.

What does a worked example look like?

This is an example, not real project data. A team has a release with 14 stories. The “no tests” filter returns four. In the review they decide:

  • Two stories get new tests linked, one of them reusing a test written last month.
  • One story is a text change in a footer. They accept the gap and add a comment saying so.
  • One story is “improve search” with no testable outcome. They split it into two stories with clear results.

After the review, the filter returns zero stories without a decision. Two stories still show NOT_RUN, and those go to the testers for this cycle. The list went from four unknowns to two scheduled tests and two recorded decisions.

Doing this inside Jira with an app

ProbeTest for Jira, a test management app with coverage you can search in JQL writes testStatus, testCount, testFailCount, testLastRun and testFailingIn onto stories that have linked tests, so the queries above work in filters, boards and dashboards. You link tests from a test, from a story with the Link tests… action, or from CI by putting the story key in the test name. The Coverage tab also has a matrix with chips for stories with no tests, never run or failing, and an Open in Jira button that runs the same filter in Jira search. The Tests panel on a story lists its tests, latest results and any defects.

The details are in the traceability and coverage documentation. ProbeTest is for Jira Cloud only and is coming soon to the Atlassian Marketplace. It adds no issue types, so the stories you search stay the same stories you already had.

Sources

Frequently asked questions

Can JQL find Jira stories that have no test cases?

Only if your test tool exposes something JQL can search. Jira has no built-in idea of a test case, so the query depends on how tests are stored: a link type, an issue type or a field the tool adds. Check which of those your setup uses before you write the query.

Why is the test status empty for a story that has tests?

In ProbeTest only stories with at least one linked test get a status, so an empty status means no linked tests. If the story does have tests, check that they are linked to this story and wait a short time, because Jira needs a moment to index a change.

What is the difference between no tests and not run?

No tests means nothing is linked to the story, so nothing could ever verify it. Not run means tests exist but have no result yet. The first is a design gap, the second is a scheduling gap, and they need different owners.

How often should you review stories without tests?

Weekly for the active sprint and once before every release. A short list reviewed often is easier to clear than a long list reviewed once a quarter.

Should every story have a test case?

Not always. A copy change or a config tweak may not need one. The point is that a missing test is a decision someone made, not something nobody noticed.