I would like to export a testplan with a specific environment (IOS or Android)

Houssam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 20, 2021

I would like to export a testplan with a specific environment (IOS or Android) with Xporter so that only the test executions for one specified environment in the Xporter template are displayed. 

Is there a away to implement this with a conditional statement in the Xporter template?

1 answer

0 votes
Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2021

Hi @Houssam 

It may depend on the type of field that the "environment" is and where it is be used.

However, if it is the Test Environment found in the Xray Test Executions, you may use a conditional block (https://confluence.getxray.app/display/public/XPORTERCLOUD/Conditional+Blocks), and a code similar to this (https://confluence.getxray.app/display/public/XPORTERCLOUD/Exporting+Test+Plan) to get the Test Executions environment.

#{for testExecutions}
    #{if (%{'${TestExecutions[n].TestEnvironments}'.equals('IOS') || '${TestExecutions[n].TestEnvironments}'.equals('Android')})}
           This section will only be visible if the condition is true.
    #{end}
#{end}

Thank you.
Kind regards,
Rogério Paiva [Xporter Support Team]

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events