Reputation: 543
I've been trying to do some research on this topic as I assume this scenario occurs frequently, but I haven't found anything too relevant. We have a 3rd party service from our client that we interact with. We have their WSDLs, have made service references and developed our side of the project, but we do NOT actually have access to their services for testing. What is the best way to go about testing our code? Here are the options I am aware of:
Is there a better way to do this kind of testing? I felt very limited by option 1, but option 2 seems kind of intensive. My coworker has scoffed at option 2 because of the amount of work, and has mentioned that we should be using Visual Studio to perform testing. Does such a testing tool in visual studio exist? If so, would it be limited in the same way as Soap UI, where we would be subject to duplicate reply messages?
Thanks!
Update: To clarify, regarding the Visual Studio testing questions: I know that there is a test suite in VS and there are things like web tests, but what about a mock service? I havent seen anything to indicate the existence of this kind of testing tool.
Upvotes: 2
Views: 289
Reputation: 8400
We have multiple mockups running using your option 2. Indeed it takes some work to mimic the operational behavior of an external service, but it pays back tremendously. You have complete control over the test implementation and can control which answer to return on which question.
Important to have is a good description of the behavior of the service from the 3rd party. The interface description is often to little detailed. What errors can get returned? When do errors occur? What is the happy path. All should be known. So as a side effect of creating the mockup, you get an expert insight in the functioning of the 3rd party service :-)
Upvotes: 1