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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

30 views 3 4
Join discussion

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