Forum Discussion

EllaVader's avatar
EllaVader
Occasional Contributor
10 years ago

building a request field from a static and datagen value

I'm getting up to speed with SoapUI and I have a question on how I can build on of my REST request attributse from a combination of a data generated value, a property transfer and some static text.

Specifically, I want one of my fields for my REST requests to look like this:

"SOAP-MATTER-" + <uniqueID>

the uniqueID was generated from a DataGen step and stored in a property called uniqueID

I am stuck how to get my desired request to look like the above concatenated value.

Can anyone help me?

3 Replies

  • EllaVader's avatar
    EllaVader
    Occasional Contributor
    I figured out what to do. Not sure if it is the best solution but it is "a" solution.
    What I did was added another DataGen step called "Template" and it looks like this:

    SOAP-MATTER-${DataGen#RandomNumber}

    and the ${DataGen#RandomNumber} bit is referencing the value that I got from a previous DataGen which is Number type that generates a random number.

    And then I added a PropertyTransfer Step that transfers that generated value into a property I named matterID.
    Next for the request, I am using that value referenced like:
    ${Properties#matterID}

    Seems to be working. But what I would like to figure out is a way to see what the actual value is when the request actually got sent.
    Does anyone know how I can see what the actual value that was sent in the request is?
  • PaulDonny's avatar
    PaulDonny
    Regular Contributor
    If you click on the 'raw' tab on the testStep it will show the values being sent.
  • EllaVader's avatar
    EllaVader
    Occasional Contributor
    Thanks.
    I also found that I can view the Debugging tab at the test level and to view the raw request. But I had to make sure that the content pane of the raw request was expanded.