Cant iterate tests in test set

Hi, 

I'm trying to iterate tests in a test set. when I use the following syntax, I get the expected results.:

Tests[0].TestSteps[0].StepNumber: ${Tests[0].TestSteps[0].StepNumber}
Tests[0].TestSteps[0].Step: ${Tests[0].TestSteps[0].Step}
Tests[0].TestSteps[0].Data: ${Tests[0].TestSteps[0].Data}
Tests[0].TestSteps[0].ExpectedResult:
${Tests[0].TestSteps[0].ExpectedResult}

 

But when I try to iterate in a loop, I don't get anything. I use the following syntax:

&{for
issues|filter=%{'${IssueTypeName}'.equals('Test
Set')}}
#{for tests}
    ${Tests[n].Key}
    ${Tests[n].Summary}
    ${Tests[n].Description}
#{end}
&{end}

 

My question is: Why does it work when I hardcode the array index, but not when I iterate in a for loop?

 

Thanks for your help.

6 answers

1 accepted

This widget could not be displayed.

Your template has some typos. I've fixed it. Please try it.

This widget could not be displayed.

Hi,

Which versions are you using?

Cheers.

This widget could not be displayed.

Xporter : 5.0.0

Xray: 2.0.10

 

They are trial version, but I dougt that it has anything to do.

This widget could not be displayed.

I've checked in my local Environment and it's working as expected.

Can you share your template?

This widget could not be displayed.

I stripped most of it and left the part that won't work. The green part works.

This widget could not be displayed.

Thanks, that's perfect.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Thursday in United States

Local Atlassian Research Workshop opportunity on Sep. 28th

We're looking for participants for another workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sh...

73 views 0 0
View post

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