1

I am automating engineer using ranorex with c# and have a client requirement as below

1.we have scheduled few test cases to run daily 2.If any particular test case fails the https requests should be tracked for this failed cases

I have googled and found that we need to use fiddlercore and have written script as below

1.Fiddler.FiddlerApplication.Startup(8877, true, true);
2.var items = new List<Fiddler.Session>();
3.Fiddler.FiddlerApplication.AfterSessionComplete += delegate(Fiddler.Session oS)
4.{
5.  items.Add(oS);
6.};

7.Fiddler.FiddlerApplication.OnNotification += delegate(object sender,      NotificationEventArgs oNEA) 
8.{ Console.WriteLine("** NotifyUser: " + oNEA.NotifyString); };
9.Fiddler.FiddlerApplication.Log.OnLogString += delegate(object sender, LogEventArgs   oLEA) { 10.Console.WriteLine("** LogString: " + oLEA.LogString); };

    //Open url
    //steps in testcase


FiddlerApplication.oTranscoders.ImportTranscoders( @"C:\EZPrints_VL_Demo\FiddlerCore- BasicFormats.dll");
var oExportOptions = new Dictionary<string, object>();
string filename = "C:\\output.har";
oExportOptions.Add("Filename", filename);
Fiddler.FiddlerApplication.DoExport("HTTPArchive v1.2", items.ToArray(), oExportOptions, null);
Fiddler.FiddlerApplication.Shutdown();

but after executing this I am not able to see any file created with name "output.har" and also when I debug after 3rd step execution is not going to 5th step inside loop it is going to 7th step.

My question is

  1. Does my approach meet my requirement. Will it track all sessions of my entire testcase. If not, what updates I need to do it make it so? 2.If my approach is correct am I missing something which is stopping me from generating output?
secretformula
  • 6,414
  • 3
  • 33
  • 56
Praveen
  • 53
  • 1
  • 1
  • 8
  • Recently found [PCAP.NET](http://pcapdotnet.codeplex.com/) more easy to get started with this – sll Oct 30 '12 at 12:07
  • I have tried PCAP.NET, SharpPcap.Net tools already. Problem is I am just a automation engineer and don't have sound knowledge in development. Usage of this tools is becoming a big problem for me. I found much documentation on fiddle and thought of using this – Praveen Oct 30 '12 at 12:10
  • Ok please keep this thread updated and post a solution if you found, thanks – sll Oct 30 '12 at 12:11

0 Answers0