Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add new SoapResponseStrategy to help in predetermined test cases

See original GitHub issue

Thanks for your work, really amazing.

I need to write some Integration test cases depending on castlemock, so that my application will call castelmock to return different each time for the same specific web service operation.

The point is, I cannot depend on both the existing SoapResponseStrategy strategies (RANDOM and SEQUENCE), I cannot depend on RANDOM because my test cases need to know the result ahead so I could assert my code, and I cannot depend on SEQUENCE for many reasons one of them it is not a good idea to have test cases run in a certain order, they should run independently.

The suggested solution is to return different mock responses based on different input (XPath could used here).

BTW, SoapOperationStatus.ECHO is not helpful hence my application is sending real SOAP request message, and if I changed it to send some SOAP response to get it back in the request, I then changing in actual application code.


Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

karldahlgrencommented, Feb 10, 2018

Thank you @mhewedy for you contribution! Great work!

Best regards, Karl Dahlgren

karldahlgrencommented, Feb 7, 2018

Hi @mhewedy! Thank you using Castle Mock, and more importantly, thank you your amazing suggestions. XPATH has long been on my list to do. I really like your approach. Looks very straightforward. If you want, we can do this in two ways:

  • You make the changes and submit a PR. The only thing I would ask of you would be to sign and submit a contribution agreement (
  • I can make the changes. I can have the changes in place either today or tomorrow.

What would you prefer? Once again, thank you very much.

Best regards, Karl Dahlgren

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create Test Suite & Test Case in SoapUI - Guru99
This will help you use SOAP UI to test SOAP requests and response effectively ... and right-click on the 'Add.' Then click on...
Read more >
SoapUI - Quick Guide - Tutorialspoint
SoapUI - Quick Guide, SOAP is the acronym for Simple Object Access Protocol. ... Right-click on the Test Suite and select “New Test...
Read more >
Using SOAP requests - Postman Learning Center
Open a new request tab in Postman and enter your SOAP endpoint URL in the address field. Select POST from the request method...
Read more >
SOAP Request Test Step | ReadyAPI Documentation
Add SOAP Request test step. From APIs; From Functional Tests. Right-click the request in the Navigator panel and select Add to Test Case....
Read more >
5 Working with SOAP Messages - Oracle Help Center
SOAP uses the HTTP request/response message model. It provides SOAP request parameters in an HTTP request and SOAP response parameters in an HTTP...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found