Uploaded image for project: 'Xray for Jenkins'
  1. Xray for Jenkins
  2. XRAYJENKINS-139

It should be possible to use Environment variables

    XporterXMLWordPrintable

Details

    • Suggestion
    • Status: Gathering Interest
    • Medium
    • Resolution: Unresolved
    • None
    • None
    • None
    • UNCOVERED

    Description

      It should be possible to use Environment variables.

      Consider the example below:

      parameters {
          choice(name: 'ENVIRONMENT', choices: ['dev', 'test', 'staging', 'prod'], description: 'Select the environment to run against.')
          choice(name: 'TESTS', choices: ['All', 'API', 'Web'], description: 'Select the tests to run.')
      }
      
      environment {
          PROJECT_KEY = "$jiraProjectKey"
          TEST_PLAN_KEY = "$testPlanKeys[$env.ENVIRONMENT]"
          PRODUCT_NAME = "$productName"
          TEAM_NAME = "$teamName"
      }
      

       

      Pass this code into importInfo and testImportInfo JSON:

      "summary": "${ENVIRONMENT} - ${PRODUCT_NAME} - ${TESTS} Tests",

      And the end result is a Test Execution with summary:

      dev - ${PRODUCT_NAME} - API Tests

       

      ${PRODUCT_NAME} is not resolved.

      Attachments

        Activity

          People

            Unassigned Unassigned
            amgt Ana Teixeira
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: