TestStepsCount returns 0


I'm testing a template based on the Exporting a Test Execution example.

When I export the data from my Test Execution issue, the exported information all seem ok except for the TestStepsCount. For that field, I get 0.

I stripped the template to bare minimum, but still get a count of 0 when I should have 2.


Why is this value wrong?


Here is the template that I use. Since TestStepsCount = 0, the loop is not done. 

#Total of Test Runs
Test Runs Count: ${TestRunsCount}
Assignee Id: ${AssigneeId}
Assignee Name: ${AssigneeUserName}
#Iterating over Test Runs
#{for testruns}
    #Getting data from Pre-Condition
    Pre-Condition AssigneeId: ${TestRuns[n].PreCondition. AssigneeId}
    Pre-Condition Key: ${TestRuns[n].PreCondition.Key}
    Pre-Condition Summary: ${TestRuns[n].PreCondition.Summary}
    Condition:  ${TestRuns[n].PreCondition.Conditions}
    #Getting data from testruns
    Test AssigneeID: ${TestRuns[n].AssigneeId}
    Test Assignee Name: ${TestRuns[n].AssigneeUserName}
    Test Key: ${TestRuns[n].Key}
    Test Summary: ${TestRuns[n].Summary }
    Test Description: ${TestRuns[n].Description}

    #Iterating over Manual Test Steps from Test Run
    ${TestRuns[n].Key}.TestStepsCount: ${TestRuns[n].TestStepsCount}
    #{for r=TestRuns[n].TestStepsCount}
        StepNumber: ${TestRuns[n].TestSteps[r].StepNumber}
        Step: ${TestRuns[n].TestSteps[r].Step}
        Data: ${TestRuns[n].TestSteps[r].Data}
        Expected Result: ${TestRuns[n].TestSteps[r].ExpectedResult}
        Comment: ${TestRuns[n].TestSteps[r].Comment}

1 answer

1 accepted

Ok, I got it. It was because the tests had not been run.

When I run the tests, I get the proper count.


Suggest an answer

Log in or Join to answer
Community showcase
Alexey Matveev
Published Saturday in Jira

How to run Jira in a docker container

Everything below is tested on Ubuntu 17.10. I prefer to use Jira in a docker container because: 1. I can install Jira with a couple of commands. 2. I can start and stop Jira just by starting and s...

66 views 1 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot