Short version:
I am looking to make sure that a URL (partial match) is requested (client-side).
Long Version:
I am looking to automate part of my testing. Currently I use Fiddler2 to manually verify.
Here's the scenario:
I would like to verify, in C#, that step 2 happened by doing a partial match (contains {string} for example).
Question:
How should I go about this? I have started looking into HttpWebRequest
class and FiddlerCore
, but my love using the simplest code possible (so other team members to update if needed) lead me to ask what the users of StackOverflow would recommend.
Take a look at SharpPcap. It's based on pcap (WinPcap on Windows), which is the packet capture library that is used by the popular Wireshark.
There is a really great tutorial on CodeProject with lots of example code to get you started: http://www.codeproject.com/Articles/12458/SharpPcap-A-Packet-Capture-Framework-for-NET
Once you have a hold of the packets (SharpPcap does capture, not parsing), you can use Packet.Net to parse the packets into something usable (HTTP communications, in your case).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With