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

Accepted Answer
1 vote

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
Community showcase
Published 26m ago in Jira

My Top 10 Favorite Features in the New Jira

  This morning, our CEO Scott Farquhar shared exciting news about a reimagined experience in Jira Software. As Principal Product Manager for Jira Software, I wanted to   re-share h...

29 views 0 2
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