Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Usage Guide

Dominic Lachowicz edited this page Feb 22, 2014 · 6 revisions

#Setup Setting up Stumps is as simple as running its MSI installer. Its only prerequisite is Version 4.0 or later of the .NET runtime. It should run fine on alternate CLRs (such as Mono), though this has not been tested at this point in time.

Stumps runs as a Windows Service on port 8888. You should be able to see Stumps in Windows' list of running services, and be able to start & stop Stumps from there as well.

Starting off/Viewing your proxied websites

When you first visit the Stumps home page, you'll see a welcome screen that looks something like this. Here, you'll see any websites you're proxying, as well as an option to create a new proxy.

starting up

Starting to proxy a new site

Let's start proxying a new site. Click on "Your Website Here", and you'll be presented with the following screen. In the "Domain" textbox, enter in the domain that you'd like to proxy. The "Port" text box will pick a random free port on your proxy's workstation - this is what your web browser will connect to. Click "SSL" if you need to do HTTPS.

serve a new website

Deleting a proxied site

It's also easy to remove a proxied site.

delete a website

Recording traffic

The first step in creating a stump is to record traffic. Click on the little red "record" button from the home page. This will start recording proxied traffic (displayed to the right). From there, you can see the list of all of the HTTP actions (GETs, POSTs, etc.) and their associated requests & responses. Once you've got that, you can create a stump by clicking the "Create Stump" button.

record traffic

Creating/Editing a stump

First, you'll be asked to give your stump a name. After that, you'll be able to configure the stump. On the left hand side, you set up your matching criteria. The stump will be triggered (and a canned response will be returned) if all the criteria on the left are met. You can configure:

  • The method (eg. GET, POST, DELETE, HEAD, ...)
  • The path portion of the URL
  • The request headers (eg. what media types are accepted, or the user agent string)
  • The request body, if any (eg. form data that was submitted via a POST)

Many of these criteria support exact matching, partial matching, PERL-compatible regular expressions, and simple boolean operators (eg. "not"). For example, if you wanted to ensure that the "Accept" string contained "text/html" (but you didn't care what other media types the browser supported), you could write a simple regex for that field. If you don't care about a field (eg. the browser user agent), you can ignore the header entirely.

The right hand side allows you to configure the response. Here, you can specify:

  • The response code (eg. 200, 404, etc.) and the State Description (eg. "OK", "Not Found")
  • The response headers (eg. the web server version, any caching options, etc.)
  • The response body

The left and right hand sides are pre-populated with the request and response pair that was initially recorded. You are free to keep the defaults as-is, or modify them as appropriate.

create and edit stumps

Viewing a stump

You can always view your stumps, delete them, and edit them as necessary.

view your stumps

Demo video

We have also put together a 6 minute training video on YouTube:

Alt text for your video

Clone this wiki locally