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'm testing a Windows desktop application, that requests data from a server during certain operations. I want to make sure the application can handle all possible responses, including bad ones.

What is the easiest way to accomplish this?

Will I have to create a test server, and use the hosts file to connect to that server instead of the real server? Is there a better way?

Are there tools available that can already do this?

share|improve this question

3 Answers 3

If you want an in-browser solution, you can use the Firefox addon Tamper Data. Just like fiddler, you'll be able to modify each request being made in the browser.

From the addon description:

Use tamperdata to view and modify HTTP/HTTPS headers and post parameters.

Trace and time http response/requests.

Security test web applications by modifying POST parameters.

share|improve this answer

Fiddler is a great (and free) tool for this, like Sam mentioned. It accomplishes a lot for a free app and even has a few features that others don't, like changing your user agent.

I do have Fiddler installed, but when I want these kinds of tools I tend to open Charles: http://www.charlesproxy.com/

It isn't free ($50/seat), but the additional tools available are really awesome. Map Local, Map Remote, DNS Spoofing, Port Forwarding, Reverse Proxies, etc.

If you're in more of a security mindset, there is also ZAP (Zed Attack Proxy). It will do many of your normal proxy tasks as well as quite a lot of other goodies. Just be careful where you point some of the tools :)

ZAP: https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project

share|improve this answer

Fiddler http://www.fiddler2.com/fiddler2/ is a great tool for this kind of testing. It is an http proxy which allows you to send a request and then "fiddle" with both the request and the response between your app and going to the server. You can make small changes to a response, or create a response from scratch to send to your app.

share|improve this answer
    
I agree - fiddler is a good tool to use here. –  Joe Strazzere May 29 '12 at 19:35
    
And here is a good video on using Fiddler: mehdi-khalili.com/advanced-web-debugging-with-fiddler –  Dmytro Zharii May 29 '12 at 22:56
    
Does fiddler work with desktop applications, or is it only useful with web applications? I'm not able to get it to see the request sent by my desktop application. –  Tester101 May 31 '12 at 15:16
    
It works with any http traffic from any source. If the traffic is not over http then you would need a different tool. Did you set the proxy for your app? fiddler2.com/fiddler/help/hookup.asp#Q-ConfigureApp –  Sam Woods May 31 '12 at 19:01
    
Another thing I should mention, Fiddler has an API as well which makes it useful for automating these tests if you are looking at doing that. –  Sam Woods May 31 '12 at 19:07

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.