jmistrik
13 years agoOccasional Contributor
test case scope property expansion from different test case
Hello,
I would like to check HttpRequestContent of a rest test resquest step in a specific Test Suite. How can I do the property expansion or get the "expanded" content?
Example:
TestSuite1
- TestCase1
--TestStep1=groovy script that checks the reqest content
TestSuite2
- TestCase2
--TestStep2=REST with request content with property expansion linked to a test case scope property
<Contract>
<a>AAA</a>
<b>${#TestCase#prop1}</b>
</Contract>
I would need to get in TestStep1 the contract after expansion. Could someone help?
The main problem is that i get it as string with the expansion strings (eg. ${#TestCase#prop1}) ..I can call "context.expand()" on the string - that would probably work, but since iam alredy in TestCase1 which has not the properties like the original TestCase2, it does not find them so after expand they are all empty.
Thanks.
Jaroslav)
I would like to check HttpRequestContent of a rest test resquest step in a specific Test Suite. How can I do the property expansion or get the "expanded" content?
Example:
TestSuite1
- TestCase1
--TestStep1=groovy script that checks the reqest content
TestSuite2
- TestCase2
--TestStep2=REST with request content with property expansion linked to a test case scope property
<Contract>
<a>AAA</a>
<b>${#TestCase#prop1}</b>
</Contract>
I would need to get in TestStep1 the contract after expansion. Could someone help?
The main problem is that i get it as string with the expansion strings (eg. ${#TestCase#prop1}) ..I can call "context.expand()" on the string - that would probably work, but since iam alredy in TestCase1 which has not the properties like the original TestCase2, it does not find them so after expand they are all empty.
Thanks.
Jaroslav)