jasmine test cases for a SOAP server

56 views
Skip to first unread message

Reza Razavipour

unread,
May 6, 2014, 8:11:03 PM5/6/14
to nod...@googlegroups.com
I am writing a web server in node and express and most of the routes make SOAP calls.
I want to write test cases for my routes. I have enough for my non SOAP call features.

So I need to have a mock SOAP server? How would that look? 

What are the suggestions for this problem?

Paul Ciorogar

unread,
May 7, 2014, 12:43:19 PM5/7/14
to nod...@googlegroups.com
I would make a mock object that pretends to have the functions and callbacks of the SOAP server so that I can control what data I can get from it.
And if you have to wait for multiple asynchronous calls to finish so that you can reach a conclusion or build a page I would simulate that with a setTimeout on each callback.
What did you have in mind?

Reza Razavipour

unread,
May 7, 2014, 1:08:22 PM5/7/14
to nod...@googlegroups.com
Right now my soap calls are so deeply nested into my REST routes, I think I have to start pulling those out, and make them more accessible directly. Only then I can mock the specific calls.
I was really hoping for a SOAP mock server that I can add the call supports to them but like you said I can simulate that will timeouts and something that returns some fake data.

It is not trivial and it is tedious...

Raymond Feng

unread,
May 7, 2014, 1:50:43 PM5/7/14
to nod...@googlegroups.com
https://github.com/vpulim/node-soap has the server support to mock a service in node.

Reza Razavipour

unread,
May 8, 2014, 12:13:29 AM5/8/14
to nod...@googlegroups.com
Raymond,

I am using node-soap package for my calls to the real SOAP server.
How can I use this package to mock a server, I do not understand.
Reply all
Reply to author
Forward
0 new messages