Details
-
Suggestion
-
Status: Gathering Interest
-
Medium
-
Resolution: Unresolved
-
None
-
None
-
None
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.