Forum Discussion

weisband's avatar
weisband
New Contributor
12 years ago

Test-Values for fields

Can I save my requests? Can requests be generated with other values as "?". It's very boring to do it by hands each time. May be, it would be better to use the value <field-name>+"Value" as initial value rather then "?".

5 Replies

  • PaulDonny's avatar
    PaulDonny
    Regular Contributor
    This is something I am actually building for my company. Though, I imagine mine would be a bit more advanced than what your wanting. I have a UI that allows the user to input the different values and on the backend it will create and run the request when they submit and then output the results into the UI directly.

    My suggestion, learn Java or create some groovy scripts.
  • weisband's avatar
    weisband
    New Contributor
    Thanks. "Learn Java" was the most useful sugestion of your post.
  • DavidEtcell's avatar
    DavidEtcell
    Occasional Contributor
    What you're doing is the whole point in SoapUI

    Some groovy scripting is required, unless you want to get SoapUI Pro and use a DataSource or DataGen, then its much MUCH simpler.
  • PaulDonny's avatar
    PaulDonny
    Regular Contributor
    Weisband, if you want the information regarding the work I have done it is all on this forum. Here goes the links:

    How to replace all of your '?' with null values:
    http://forum.soapui.org/viewtopic.php?f=14&t=22913&sid=4c812a70c0a62f40ba8d240a851cc858


    How to build a SoapUI project using Java with values from an external source:

    http://forum.soapui.org/viewtopic.php?f=5&t=22797&sid=4c812a70c0a62f40ba8d240a851cc858

    How to add all parameters into a SoapUI project using an external source utilizing groovy script:

    http://forum.soapui.org/viewtopic.php?f=5&t=22445&sid=4c812a70c0a62f40ba8d240a851cc858

    (Note, this one replaces your UI with a new one, it needs work but it does do a good job, just looks bad and if your assertions are not set up correctly it will not work that well for you).



    You could always just use properties too if you want something more simplistic.
  • nmrao's avatar
    nmrao
    Icon for Champion Level 1 rankChampion Level 1
    Here i wanted to add one point that soapui can generate random values instead of just a "?" by changing the preferences which will help you in case if your service can accept random data.