Code Monkey home page Code Monkey logo

mockingbird's Introduction

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

mockingbird's People

Contributors

dependabot[bot] avatar hemantsharma-io avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mockingbird's Issues

MockingBird tab not showing in fiddler v5.0.20192.25091 for .NET 4.6.1

Hi Hemant, The tab is not showing in fiddler v5.0.20192.25091 for .NET 4.6.1. The fiddler is installed here - C:\Users<user>\AppData\Local\Programs\Fiddler and I have put the dll and it's corresponding templates in Scripts folder underneath it. In the loaded extensions it shows - MockingBird.Core.ExtensionLoader (v1.0.0.0) from %USERPROFILE%\AppData\Local\Programs\Fiddler\Scripts\MockingBird.dll. It doesn't show tab.

Multiple requests created multiple Threads

I was trying to record fill work through in Fiddler which is about 10 requests, so when I converted to jemter using this tools, I have seen there are 10 different threads actually created, is there anyway I can put all the requests in same thread group??

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.