Skip to content

MockingBird is a Fiddler extension to transform HTTP requests to another format

License

Notifications You must be signed in to change notification settings

hemantsharma-io/MockingBird

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mocking Bird

MockingBird

There are lots of reason you might need to debug a HTTP/HTTPs request(s), be it try to recreate a issue and narrow-down the problem in your favorite language editor or compare contents between different request(s) etc. MockingBird is a Progress Telerik FiddlerTM extension to transform a Fiddler's HTTP/HTTPs session to any other format you want e.g. you can generate Java, C#.net or any other language code from selected requests you want to troubleshoot issues for and use the output code in your favourite IDE. It's not limited to just code and can be used to create any format as long as you can create a Mustache template for it e.g. you can create a csv file with selected HTTP request to perform a functional or load test in SOAP UI or JMeter.

How it works

Features

Convert HTTP requests to any format you want

As soon as you have a template it's just a matter of dragging and dropping selected request(s) to the code area and Voila!! the code is ready.

Can convert multiple http request

Select multiple requests and just drop inside Generate Tab tab.

Support multiple templates

Create as many templates as you need. Just place them inside <Fiddler's script path>/templates/<TemplateName>.tpl and restart Fiddler the template will be avilable in Template tab. Simply select it and drag and drop HTTP request in Generate Code tab.

Edit templates at runtime

You can make changes to selected template in Template tab and click on Save button to save it. All the request would be trasformed as per the updated changes.

How to install

  1. Download MockingBird.zip
  2. Extract it to Fiddler's script folder. You can find the folder path from Fiddler > Tools > Options > Extesions (tab)
  3. Start/Restart Fiddler

System requirement

  1. Fiddler v5.0.20182.28034 or higher

How To(s)?

Convert a HTTP request to Java code and debug it in IntelliJ Idea in Fiddler

Watch this video

Convert a Fiddler session to JMX (i.e. JMeter) for perf testing

  1. Select 'JMeter Load Test' template from drop down in Template tab

    I created a simple HTTP sampler JMeter project and having a loop count of 100 and saved the .jmx file as .tpl after adding mustache tags

    Img

  2. Switch to Generate Code tab

  3. Drag & Drop HTTP Request to code area

  4. Click Save as file button. Enter JMeter Load Test.jmx as file name and click Save button to save the file.

  5. Open JMeter and open JMeter Load Test.jmx file

  6. Click start button in JMeter window's toolbar

  7. Click on Aggregate Report and it will display you the aggregate run results like below.

    Aggregate Report

Most used variables

  • {{#SelectedSessions}}...{{/SelectedSessions}} - This is a for-each loop for selected sessions
  • {{{GetRequestBodyAsString}}} - Return a string generated from request body
  • {{RequestMethod}} - Http request method e.g. GET, POST and PUT etc.
  • {{#RequestHeaders}}...{{/RequestHeaders}} - This si a for-each loop for request headers in single selected session or current session in for-each session loop
  • {{Name}} - If used inside {{#RequestHeaders}}...{{/RequestHeaders}} then returns current header name
  • {{Value}} - If used inside {{#RequestHeaders}}...{{/RequestHeaders}} then returns current header value
  • {{hostname}}- Returns current selected session's hostname
  • {{port}} - Returns current selected session's port number
  • {{PathAndQuery}} - Returns path without hostname and port

If you want to explore more variables and methods goto Fiddler > Rules > Customize rules and you should see Fiddler ScriptEditor. This editor will have list of objects with their typical properties and methods that you can refer. image

References

  1. Progress Telerik FiddlerTM
  2. mustache.js
  3. Nustache - Logic-less templates for .NET