lundi 18 mai 2020

UFT API test: how to generate a number for an element in a request

I have the following (part of) request:

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <StartProcesRequest>
        <caseID>case1</caseID>
        <requestNR>123456789</requestNR>
        <custID>cust123</custID>
    </StartProcesRequest>
</s:Body>

When sending the request the first time I get a correct response. Second time I send the message the requestNR must be changed or else I get duplicate error.

How can I make UFT generate a random 9 digit number for requestNR?

Thank you in advance.




Aucun commentaire:

Enregistrer un commentaire