TestStepsCount returns 0

Hi,

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}
    #{end}
#{end}

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.

Doh!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

239 views 4 9
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