July 2009 Entries
Testing network failures, web requests and bandwidth throttling

 

I found myself needing to test failed and intercepted network requests the other day. But i needed to see how they would manifest themselves in the UI so i needed a tool that intercepted the messages between the browser and the webserver. This called for a proxy tool.

 

After a bit of searching my colleague Neil Rees (http://blogs.imeta.co.uk/nrees/Default.aspx) recommended CharlesProxy. (http://www.charlesproxy.com/)

 

Simply download the trial edition and Firefox add-on (Not sure it works with Firefox 3.5 though) Both are available from the Charles Download page (http://www.charlesproxy.com/download/)

 

When you run the app for the first time you will see the following page

 

image Charles Proxy Main Window

 

Set the Firefox Proxy

First thing to do is to set the Firefox add-on as the proxy. Open the Proxy Menu Option and click the Mozilla Firefox Proxy option.

 

image Setting Firefox as proxy

 

As you will see, the ‘Recording (Session)’ will be running. This means that Charles is monitoring and capturing all requests going through Firefox.

Note: Make sure you only have the tabs open you need otherwise all other tab activity (refreshes etc) will also be captured.

 

Start Recording

Once you have set this then simply start surfing away on the site you want to test. You will see that all of the traffic is captured in the ‘Structure’ tab on the left.

 

imageShowing pages and subpages collected through browsing. Example here is using Charles’ own website 

 

Each website you visit will have it’s own root folder. All pages within this site will be shown in the tree.

 

Throttling Bandwidth

A cool feature of Charles is the ability to throttle bandwidth. Great for testing performance and reliability across multiple network speeds.

 

Open up Proxy > Throttle Settings.

Tick the ‘Enable Throttling’ checkbox if it’s not already checked. Dropping down the throttle preset drop down allows you to choose some already defined speeds. Or you can specify your own.

 

imagePreset throttle settings in Charles

 

 

Once the ‘Enable Throttling’ is checked then the ‘Proxy  > Throttling’ will have a tick next to it:

 

image Throttling enabled

 

Simply run through your site and observe, explore and report. The site will now be running through a throttled bandwidth.

 

Intercepting / Withholding web requests

Once you have recorded some requests (or you know exactly which request you want to intercept) you can start applying a breakpoint. A breakpoint, will intercept and hold the relevant web request until you decide whether to let it continue, if at all.

To add a breakpoint open Proxy > Breakpoints.

Then enable breakpoints using the checkbox. Then add a new breakpoint. Then complete the relevant information.

 

image Adding a breakpoint

 

Or an easier way. Simply navigate in the structure column to the page you want to breakpoint and right click on it and click ‘breakpoint’.

 

image Right click menu on website

 

Nothing significant will show other than the small red button on the menu bar will now be depressed. This button toggles breakpoints on/off. If you re-open breakpoints from Proxy > Breakpoints then you will see there is now a new breakpoint in the list. Double click it to bring up the breakpoint information. Shown in the screen below.

 

image Breakpoint information

 

Now revisit the website and navigate to the page that has the breakpoint applied. Charles will now stop all requests and present the following screen.

 

Note, there will be multiple requests (POST, GET) and there could be multiple of these, so make sure you stop/modify or execute the right request.

 

image  Breakpoint in action

There are now three options.

 

You can cancel which cancels that breakpoint and allows the message to continue as usual.

 

You can abort, which will snaffle the message, resulting in page / request not found. You will obviously get different results for GET and POST requests.

image Aborted breakpoint

 

Or you can execute. This will simply execute the request. But the cool thing with execute is that you can edit the request before executing. Open the ‘Edit Request’ tab at the top and then edit away. (Note: there are more tab options at the bottom)

 

image Edit breakpoint then execute

 

Once complete. Execute the request and see what happens.

 

Summary

Charles Proxy is one of the best tools I’ve encountered for managing web requests. It’s given me some great insight in to some of our products and how they behave during requests and failures.

 

Overall it’s a good tool for simulating network failures, potential man in the middle tampering and general network throttling.

 

By the way, the trial version runs for 30 minutes and then closes but it’s really not that expensive to buy anyway.

Testing Accessibility - some useful resources

I've been investigating accessibility and usability recently for a new project I'm working on. I thought I'd share some of the resources I've found that might be of use to others.

I'm testing against the WCAG 2.0 standard, but there are very few resources available that can automatically check against that standard. It was only introduced in 2008 and so most tools are still checking against WCAG 1.0. There are some interesting changes between the two, but that's not for this blog post.

One of the best resources I've found so far, believe it or not, is twitter. There are so many usability and accessibility companies, consultants, designers, programmers and testers all tweeting about the topic that it inevitably leads to a wealth of information. So following the right people means you get to know of all sorts of useful resources.

But ultimately, they point to resources and tools. Here's a run down of some of the ones I'm looking at using:

NOTE: Conformance to WCAG standards cannot be proved by just using an automated tool. The automated checkers will obviously give you an indication where you have failed. However, if you have passed (according to checker) it is still possible for the site/page to not comply. An example would be the ALT text that goes alongside an image. An auto tool can check whether it is there. What it cannot check though is that if the ALT text is relevant to the image it is describing. For example, a picture of an Apple with an ALT text of Pear is a fail. A tool can't tell you that.


WCAG guidelines

Actual Guidelines- http://www.w3.org/TR/WCAG20/

Overview of WCAG - http://www.w3.org/WAI/intro/wcag.php

Understanding WCAG 2.0 - http://www.w3.org/TR/UNDERSTANDING-WCAG20/

Techniques for WCAG 2.0 - http://www.w3.org/TR/WCAG20-TECHS/


Firefox 2.0 add-ons

TAW3 en un clic - https://addons.mozilla.org/en-US/firefox/addon/1158

This is a really good add on which gives you a link in the Tools menu: Tools > TAW It

When clicked it grabs the page you are on and gives you a new page with each validation error, query or warning highlighted with relevant failure information included. It also gives you a good list of areas that require human checking. Their website also offers a validation process as well as a WCAG 2.0 Beta checking site. (http://www.tawdis.net/ingles.html?lang=en)

Firefox Accessibility Extension - https://addons.mozilla.org/en-US/firefox/addon/5809

Useful firefox add on which gives you a summary report and other validation checking. This combined with the TAW add on is a really good combination.


Online Checkers

W3C validator - http://validator.w3.org/

Section 508 and WCAG checking tool - http://checkwebsite.erigami.com/accessibility.html

Luminosoty Colour Contrast Ratio Checker - http://juicystudio.com/services/luminositycontrastratio.php

T.A.W checker (as mentioned in Firefox add on section) - http://www.tawdis.net/ingles.html?lang=en

Cynthia WCAG checker - http://www.contentquality.com/

Etre checker - http://www.etre.com/tools/accessibilitycheck/

WAVE online checker -http://wave.webaim.org/


Other Resources

Some useful information on what is involved in WCAG 2.0 over 1.0 - http://jimthatcher.com/index.htm

Story of uptake across globe - http://www.dingoaccess.com/accessibility/adopting-wcag-2/

The Pollenshop accessibility experts - http://www.thepollenshop.co.uk/accessible_web_services/standards_compliance/wcag_compliance.asp

User Vision - http://www.uservisionblog.co.uk/2009/07/10/recommended-reading-week-1-accessibility/

This checks the readability of your content - http://www.online-utility.org/english/readability_test_and_improve.jsp

This checks the Online Colour Contrasts - http://www.accesskeys.org/tools/color-contrast.html

Colour blindness checker - http://www.etre.com/tools/colourblindsimulator/

Online Image checker (checks images for contrasts) - http://juicystudio.com/services/image.php

Browser resolution checker - http://www.markhorrell.com/tools/browser.html

This is an awesome little site that has people randomly taking part in click testing and then describing what they found - http://www.fivesecondtest.com/


Accessibility Devices

JAWS screenreader - http://www.freedomscientific.com/products/fs/jaws-product-page.asp

Good screen reader tool with lots of configurations and options. Does a really good of reading the website content. Probobably one of the most popular screen readers.

Thunder screenreader - http://www.screenreader.net/

I find this tool extremely useful. A really good screenreader for reading sites. Works well with Webbie.

Zoom Text - http://www.aisquared.com/products

This is probably one of the best and most comprehensive tools I've yet to see. It not only allows a whole host of screen zoom options (lens, whole, line, docked, freeze, overlay) but it also does screen reading superbly too. It can read highlighted text, whole pages, typed words or letters and has all of the usual features such as grammar on/off.

There are a multitude of devices available for the accessibility market, a great list of most of them is here:

www.tricare.mil/cap/acc_sol/Assistive_Technology.cfm


Rob..