Skip to content

Random Test Data at Your Fingertips

Johnny Mnemonic wearing VR goggles

“I want to get online…I need a computer!”

Exploratory testers, what if you could easily:

  • Plow through lengthy registration forms in seconds
  • Overload comment boxes with millions of words
  • Assail address books with a heaps of ugly special characters

To learn how, check out Trish Khoo’s blog post, Go faster! Linking data generation to hotkeys. Using my own bubblegum and duct tape, I managed to wire together the following:

  • AutoHotkey, sometimes using its InputBox function to collect parameters before returning a result:

    A "What domain?" prompt from AutoHotkey

  • A Ruby random data generation gem named Forgery
  • My fork of Anthony Long’s picka random data generator — the reason for the fork was, instead of generating data that will always pass form validation (better for automated tests), generate data that will usually pass form validation (better for exploratory testing).

    As an aside, one reason to love picka: its sentence function, which pulls text from The Adventures of Sherlock Holmes, totally of out of context (much more entertaining to read than lorem ipsum):

    He rose as he knew was in a corner a scissors grinder with his compasses drawing a circle with Eyford for its own fields filled for the world

Categories: Testing.

Tags: , , , , ,

Minimalist Skin for Bugzilla

If you test web sites and use Bugzilla, a skin I’ve developed named Minimalist may be of interest to you. Of course, please feel free to fork it and modify it for your needs!

Screenshot of the Minimalist skin for Bugzilla

Screenshot of the skin

Here are the skin’s main improvements over “Dusk” (on which it’s based):

  1. Slimmed-down footer: only includes saved searches (instead of just another copy of the header)
  2. “Heat” shading for priority and severity values
  3. Brighter, fresher colors, copied from inspired by Lighthouse
  4. Browser icons (mapped to “Hardware” values)
  5. Wider search field, because QuickSearch is awesome

Categories: Testing.

Tags:

Automated Testing with Fiddler

A probe droid from Star Wars

Harry Robinson likens his Computer-Aided Exploratory Testing to using probe droids

Exploratory testing isn’t necessarily all manual testing. In fact, I’m always looking for opportunities to extend my reach and increase my efficiency with automation. It’s like putting on a pair of night vision goggles: it’s still me and my brain, simultaneously learning, designing, and executing tests, only able to see things from more perspectives at once.

If you’re not familiar with the Fiddler Web Debugger, its core features are:

  • inspecting HTTP traffic
  • setting breakpoints
  • manipulating (“fiddling” with) data

I don’t believe it’s traditionally thought of as a web automation tool (like Selenium or JMeter), but there’s a customizable rules file named, oddly enough, CustomRules.js that can be modified to perform automation as you perform manual exploratory testing. Below are two extremely simple modifications I’ve made that have aided my exploratory testing a great deal. Please feel free to copy, modify, be inspired by them!

Example #1: JSON-RPC error detection

// Is this the domain we're interested in (foo.bar.com), and is this a JSON response?
if (oSession.HostnameIs("foo.bar.com") && oSession.oResponse.headers.ExistsAndContains("Content-Type", "application/json")) {
  // "error:null" is present in the response
  if (oSession.utilFindInResponse("\"error\":null", false) > -1) {
    // Turn the line in Fiddler green
    oSession["ui-color"]="green";
  }
  // "error:null" is *not* present in the response
  else {
    //Turn the line in Fiddler red
    oSession["ui-color"]="red";
  }
}

A few of our applications use the JSON-RPC standard for their web services. A rule of thumb I’ve developed is: if an error occurs, something other than “error: null” will be present in the response. When added to the OnBeforeResponse function in CustomRules.js, this code simply turns the request green or red in the session list based upon this rule:

A JSON-RPC error highlighted in red in Fiddler

With Fiddler up on my other screen, any time unexpected behavior is exhibited by the front-end, I only need to glance over and look for red to see whether or not the back-end web services are somehow involved.

Example #2: tracking request highlighting

if (oSession.HostnameIs("www.google-analytics.com")) {
  //Turn the line in Fiddler gold
  oSession["ui-backcolor"]="gold";
}

Every web application we build has some form of tracking (sometimes only in certain environments), and whether it’s event tracking, tracking activity within a Flash interface, or just normal page tracking, it’s been valuable for me to have these requests stand out in the Fiddler session list, like so:

Tracking request highlighted in gold in Fiddler

When added to the OnBeforeRequest function in CustomRules.js, the code above simply turns any request to Google Analytics gold in the session list. If selected, Fiddler’s WebForms view then provides an easy way to inspect the parameters being sent (which can be useful if you don’t have access to the analytics tool itself).

Categories: Testing.

Tags: , ,

Make It Work

Photomontage of "Best of All Possible Libraries"

In March of 2010, I was commissioned by the New York Public Library to write a track for their new employee orientation video, “Best of All Possible Libraries.”

The title of the track comes from the video’s introduction, given by the library’s president, Dr. Paul LeClerc. Looking out over the famous Rose Reading Room, he emphasizes that the greatness of the institution ultimately derives from “the staff of the New York Public Library [who] put this place together and every single day, day in and day out, season after season, make it work.”

Make It Work

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Categories: Composing.

Tags: