Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I am developing a asp.net mvc site that depends deeply on a 3rd party web service.

I would like to know what is the best approach to develop this site since the web service is not ready yet and I can't wait it to be ready to start developing.

I am using Specflow and selenium to drive my development.

share|improve this question
add comment

1 Answer

You can create mock response files of that web service and use them during development of your site. I assume that general structure of web service response is already established.

share|improve this answer
    
You mean, I can create interfaces representing these web services and implement them with mocks and after that just replace with the actual web services? Right? So, this means I would have to change the tests expectations also. Is this the best way? –  VinTem May 11 '11 at 14:38
    
No-no, it's much simpler.Suppose a webservice returns an XML document. WIth an actual working webservice you would write something like doc = Nokogiri::XML(open('webservice.com?user="Adam Smith"')) (code in Ruby using XML parsing library Nokogiri), and then manipulate variable doc. With mock response files you should just use something like doc = Nokogiri::XML(File.new(AdamSmith.xml)). –  Nikita Barsukov May 11 '11 at 15:28
    
But in that case we are assuming that I know exactly how the web service will return the data which is not the case. What I know is what it has to return and I have model classes, I will have to map the service data to my model. So I can't just replace an xml. –  VinTem May 12 '11 at 12:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.