How to use global property name in my JSON input request using SoapUI?

I have a SoapUI project that contains about 60 additional services. Each service requires some input, which will be changed for each performance. Therefore, I created certain global properties and assigned some values ​​to these properties.

I need to use these property values ​​in my SoapUI request (i.e. JSON format request).

If this groovy script means, I will use it as.

String HTiC_Username = com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.globalProperties ['HTiC_Username']. value;

But how to get the value of the Global property in a query?

I hope you understand my question. Please provide the correct guide.

thank

+5
2

"" (.. ) , : ${#scope#propertyName}

... "scope" , (, Global, Project, TestSuite, TestCase).

, username, Global, , (, JSON ..):

${#Global#username}

Groovy, : context.expand('${#scope#propertyName}')

... :

context.expand('${#Global#username}')
+7

:

  • (testdata.properties).

testdata.properties:

Billing_customerID = 1234567

OtherService_paymentid = 12121212

....

  • SoupUi (// ): testdata_filepath= C: \...
  • . " " : ${# Global # testdata_filepath} "" .
  • , XML : ${ # Billing_customerID}

:

...
<BillingCustomerIdentification>
     <BillingCustomerID>${#Properties#Billing_customerID}</BillingCustomerID>
</BillingCustomerIdentification>
...

, , . Hudson (. SO ).

, , ${# Global # someinputvariable} xml; -)

+2

All Articles