Forum Discussion
It is pretty simple if you use custom properties of test case.
Change below from
<DocumentItemID DocumentItemTypeCode="" SendingComponentID="" LogicalSystemID="">
to
<DocumentItemID DocumentItemTypeCode="${#TestCase#TYPE_CODE}" SendingComponentID="${#TestCase#COMPONENT_ID}" LogicalSystemID="${#TestCase#SYSTEM_ID}">
Define test case level custom properties
TYPE_CODE
COMPONENT_ID
SYSTEM_ID
and respective values.
Please refer documentation for the same
https://www.soapui.org/scripting-properties/property-expansion/
- Ramanasaps4hana5 years agoOccasional Contributor
Hi Rao,
Thanks for your quick response.
Actually i can't do this because i want to use these properties to automate the test cases. So again passing values inside groovy script for each property will be like double work.
actually i tried without Groovy script initially but i'm facing issues in common property passed across test cases.
ex: I have a TestCase Order which has DocumentID field with dynamic value created using formula "${=UUID.randomUUID().toString().replaceAll('-','')}" and the same "DocumentID" i need to pass to the next TestCase Fulfillment automatically in "OriginalItemID" field which i'm not able to pass it from Order to Fulfillment using property Transfer.
Kindly guide me how can i pass a field value across TestCases in same TestSuite.
Or Kindly help e with Groovy script in case not possible without script.
Regards,
Ramana.
- nmrao5 years agoChampion Level 3Thumb rule is that each and every test case should be independent.
Reorganize the tests so that they can be executed without dependency.- Ramanasaps4hana5 years agoOccasional Contributor
Hi Rao,
TestCases may be independent but here the TestCases should execute one after another based on the generated UUID of first TestCase which needs to be passed to the next TestCase, because of business process.
I can't escape from business process and need to automate in the same way.
- nmrao5 years agoChampion Level 3In case if you need the value to be used in multiple test cases, the generate the value in setup script of test suite and store it in suite custom property. And use property expansion , i.e use TestSuite instead of Test case in the initial reply.
- Ramanasaps4hana5 years agoOccasional Contributor
Hi Rao,
Thank you once again but i'm not able to see ant script menu option by right clicking on TestSuite.
Could you please provide some steps to follow so that i can write the UUID generation code at TestSuite level which i'll use setPropertyValue to set Custom Property at TestSuite level and the same variable i'll assign it to all TestCases.
But my only point is the UUID must be same across all TestCases and it shouldn't be generated in each TestCase.
If comfortable to communicate with you directly then please provide personal contact to explain my issue.
Regards,
Ramana.