Forum Discussion

MCom_Klaas-Jan's avatar
MCom_Klaas-Jan
New Contributor
15 years ago

Use of datasource to feed mockservice

Hello,

Is there a possibility to update the properties of a mockservice by using an excel file?

requestProperty1  requestProperty2
requestValue1          responseValue1
requestValue2          responseValue2

I want to use one single response message and have the returned values depend on the request. Preferably on the global MockService level so I can use them for all available services.

Thanks in advance!
Klaas-Jan Lute

4 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    You will need to use Groovy for this.

    You could save the parameters into the context in a Start script, and access them in the corresponding dispatch script.

    I hope that helps.

    /Nenad
    http://eviware.com
  • Hello Nenad,

    Thank you very much for your reply. I have added the script and it works.

    I know there are a lot of script fragments on the Eviware site and also on the internet. A developer was kind enough to help me out, but for a tester as me the proces of scripting is possibly a bit too complicated. It would be very nice to be able to add a datasource to a mockservice in the same way you do when working in a testsuite. Is it possible to add this to the wish list?

    Kind regards,
    Klaas-Jan