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 was curious to know if anyone has done any work on automated network analysis such as starting network traffic capture (to file) before executing some test, perform some test, then stop capture, then parse capture file for known patterns to look for (expected data, errors that should not appear, etc.).

Using pcap libraries for whatever programming/scripting language, using tshark, tcpdump, etc.

I had planned to do some work in this area for SIP/VoIP testing but never got the time at work to look into it. But it should be theoretically possible, so just wanted to see if there were real life implementations of it by others (whether made open source or not).

share|improve this question
add comment

4 Answers 4

up vote 1 down vote accepted

There are a few different solutions off the top of my head. There are several proxies that others have already mentioned that have APIs that can be made to listen on whatever port you need. They may not get granular enough though for what you need. If I were looking in this area I'd maybe take a look at Python's socket module.: http://docs.python.org/2/library/socket.html

This even gives an example of sniffing and then parsing: http://www.binarytides.com/python-packet-sniffer-code-linux/

share|improve this answer
    
Yea that's what I figured as one option (as mentioned in question about using pcap libraries). Thanks for providing code example of how to do it. –  David Feb 18 '13 at 2:51
add comment

You might want to take a look at Fiddler

share|improve this answer
    
"Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic" where as the original question is about SIP/VoIP –  Rsf Jan 27 '13 at 9:38
    
Yep....I read past that part :-) –  Bj Rollison Jan 29 '13 at 7:59
add comment

I know that it is doable, one of my previous employers integrated Wireshark (Ethereal then) analysis into its VoIP automation, using Perl AFAIK.

I did some hacks by grepping on tcpdump and a filter, catching a packet or event I was looking for.

share|improve this answer
    
Thanks, that's good to know. Too bad code's not available to share as open source :( –  David Feb 18 '13 at 2:34
add comment

If I understand your question correctly, there should be. I've had some success with BrowserMob Proxy and have started doing a little of experimentation during my space time with FiddlerCore. Both of these are with general web application testing though. I'm not certain how either of these would work with a VOIP solution, but, I think that Rsf's idea of Wireshark sounds very promising.

share|improve this answer
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.