robotframework-soapuilibrary icon indicating copy to clipboard operation
robotframework-soapuilibrary copied to clipboard

mock wsdl and rest web services

Open poliarush opened this issue 12 years ago • 8 comments

are going to implement such functionality in your library?

poliarush avatar Mar 15 '12 17:03 poliarush

do you mean this: http://www.soapui.org/Service-Mocking/mocking-soap-services.html and http://www.soapui.org/apidocs/com/eviware/soapui/model/mock/MockService.html ?

Seems to be possible to access it through the API, though I didn't work with it yet. But it should be possible. Do you have a working example in a project file and could you gist it please so I can have a look?

pavlobaron avatar Mar 16 '12 06:03 pavlobaron

yes

https://docs.google.com/file/d/0B3bcyhcYBd3nUkJVUFNSU1BTOXlnOVl1T0ozX1VlZw/edit

poliarush avatar Mar 16 '12 20:03 poliarush

i got code that run mock service from soapui

def project = context.testCase.getTestSuite().getProject(); def mockService = project.getMockServiceByName("WorkScheduleServiceMock"); mockService.start();

poliarush avatar Mar 16 '12 20:03 poliarush

done. see examples/mock

pavlobaron avatar Mar 17 '12 08:03 pavlobaron

super fast, thanks

i will check today's evening

poliarush avatar Mar 17 '12 10:03 poliarush

i modified a bit run.bat to

set SOAPUI_HOME="c:\Program Files (x86)\SmartBear\soapUI-4.0.1"

jybot --pythonpath %SOAPUI_HOME%/bin/soapui-4.0.1.jar:%SOAPUI_HOME%/lib/STAR.jar --escape star:STAR --variable PRJ:tempconvert-soapui-project.xml --variable SUITE:suite --variable CASE:case --variable MOCK:mock test.txt

run it and get following issue http://pastebin.com/PtXR3c21

looking for suggestions!

poliarush avatar Mar 20 '12 14:03 poliarush

That's plenty of error text...

As far as I can see, the whole problem is around "java.lang.ClassCastException: com.eviware.soapui.config.impl.InterfaceConfigImpl cannot be cast to com.eviware.soapui. config.WsdlInterfaceConfig". But I have no idea, what it is. Is it any related to SoapUI running on Windows? Different versions? I must admit, I only tested on Ubuntu.

Can anyone confirm the error?

pavlobaron avatar Apr 01 '12 22:04 pavlobaron

I tested on

  • Windows 7 RU
  • jython 2.5.1
  • soapUI 4.0.1

and can reproduce issue

poliarush avatar Apr 02 '12 18:04 poliarush