RaMup29
8 years agoOccasional Contributor
how to define variables in SOAPUI request
I have a requirement for adding a variable to the SOAP request.
Below is the sample request.
IMSI123445 is the variable in the below request. how can i add the variable to SOAPUI?
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:siemens:names:prov:gw:SPML:2:0">
<soapenv:Body>
<spml:deleteRequest
xsi:schemaLocation="urn:siemens:names:prov:gw:SPML:2:0 prov-gw-spml-2.0.xsd"
xmlns:spml="urn:siemens:names:prov:gw:SPML:2:0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<version>SUBSCRIBER_v51</version>
<objectclass>Subscriber</objectclass>
<identifier alias="imsi">IMSI123445</identifier>
</spml:deleteRequest>
</soapenv:Body>
</soapenv:Envelope>
- You can add a test case level custom property, say ID and provide the required value.
In the request, use property expansion as shown below:
<identifier alias="imsi">${#TestCase#ID}</identifier>
In case if it needs to be dynamically generated, use groovy script and store the value at test case level.