Forum Discussion
nmrao
9 years agoCommunity Hero
1. Each test case should be independent.
2. If some property is required and need to make it available for the project, then store it at project level custom property.
The script that does the above is:
context.testCase.testSuite.project.setPropertyValue("PropertyName", "value")
If you need to use the above property with in the project is to use property expansion i.e.,
${#Project#PropertyName}
If the same property needs to be read in a groovy script, use context.expand('${#Project#PropertyName}')
2. If some property is required and need to make it available for the project, then store it at project level custom property.
The script that does the above is:
context.testCase.testSuite.project.setPropertyValue("PropertyName", "value")
If you need to use the above property with in the project is to use property expansion i.e.,
${#Project#PropertyName}
If the same property needs to be read in a groovy script, use context.expand('${#Project#PropertyName}')