Wednesday, 22 April 2009

Speeding up the online MSDN Library

For developers, the MSDN library is a regular place to drop into. Whether you visit the site directly, via the VS IDE or end up there after an enthralling Google excursion, no matter, once arrived I usually find the experience slower than I’d like.

Enter the low bandwidth version. For example:

Standard view: http://msdn.microsoft.com/en-us/library/bb384398.aspx

Low bandwidth version: http://msdn.microsoft.com/en-us/library/bb384398(loband).aspx

Depending upon the time of day and size of article, the differences in load times are considerable!

Anal URL examiners amongst you will have noticed the word loband in the above link. In fact this “device” name can be added to any of the MSDN library links to render the low bandwidth version of the page in hand.

See Jon Galloway’s original blog entry for further info (including a bookmarklet to make the switching easy) and also Scott Hanselman’s more recent post which delves a little deeper, discussing page size differences, other “devices” (including the up and coming VS 2010 IDE view “dev10ide”) and how the URL routing works behind the scenes.

Clarkey

Thursday, 19 March 2009

Corporate Intranet Web App - Some Sample Browser Stats

A lot of the work I do is on Intranet based web applications, in large Corporates with locked down desktops and recommended browsers etc.

Here are some browser statistics collected via an ASP.Net data entry and reporting application that I worked on a while ago, collected from users whom logon regularly. System is global and figures are based on 1017 active users:

Browser version   User Count
IE5   1
IE6   973
IE7   33 (up from 18 in 2008)
IE8   2
Firefox 3   8 (up from 4 in 2008)

IE6 is the Corporate standard, so nothing really of interest here ;-)

More interesting I think is window sizes. Here's a sample:

Viewable window size (width)   User Count
less than 800 wide   23
800 exactly   63
801 to 899   28
900 to 999   22
1000 to 1099   489
1100 to 1199   35
1200 to 1299   135
1300 to 1399   1
1400 to 1499   52
1500+   5

These figures were captured at logout time (assuming that by then the user would have their browser sized/maximised to their preference for the application). The 800x600ish sizes are still very popular despite this being the bare minimum that this web application is designed for (1024x768+ is recommended). It just shows that we cannot always assume that users are running 1024 or above.

Clarkey

Friday, 6 March 2009

Automating Web UI Testing

Over the last day or so I've been researching to see if I could find a decent tool for automating Web UI tests. I work on a number of projects where automating the (currently manual) regression web tests would prove to be a great time saver and rescue our testers from the repetitive boredom that is inevitably part and parcel of such a task. You can only run that historical trends report so many times before you nod off in your chair...

This was my wish list:

  • Must be usable by those who are not necessarily developers. Many testers do not come from a formal geeky coding background :-)
  • Able to record browser sessions. Once the test recording is complete, the ability to modify the various steps is needed
  • Test case reusability - e.g. set up the user logon process once and reuse across tests
  • Must be browser DOM based (and give me easy access to it please)
  • Have a usable 'learnable by exploration' IDE
  • Allow me to add/drop into custom code should I need to - work at various levels of abstraction
  • Support what we now class as standard web app features such as javascript usage, pop-ups, AJAX, DHTML bla bla.
  • Ideally integrate with Visual Studio 2008
  • Multi-browser support, although admittedly a lot of the Intranet front-ends I work on are Corporate IE6+ standardised ones (I know slapped hands...)

There are plenty out there and not being a dedicated tester/QA guru I do not pretend to have done an exhaustive search!

Initial thoughts - VSTS TE

We had a license for Visual Studio Team System Test Edition (VSTS TE), so I thought it made sense to start with that. I set up a VM, installed VSTS TE and recorded my first web test:

web recording

It nicely recorded the http requests, preserved session state etc (bit like the old ACT), and the steps that it went through to complete the test were all clearly shown:

http request tree view

but after some experimenting for an hour or so, I stopped. Why? Well, the whole set up is clearly aimed at techies which is not necessarily a bad thing, but I really couldn't see any of our QA testers using this in a hurry. Shame - an undoubtedly powerful tool for developer level testers but it felt more like a testing  framework than an integrated Web UI testing tool. It's all there (see web test overview on MSDN), but it needs some sort of abstraction and nice UI over the top of it.

Back to the drawing board then...but don't stop reading yet... after some digging I found what I think could be a solution and one that plugs nicely into the VSTS I had already installed, namely ArtOfTest's WebAii Automation Design Canvas (built on top of its free WebAii .Net Automation Framework).

WebAii Automation Design Canvas

Lets cut to the chase. Watch the following 4 minute WebAii demo which shows how you construct a simple web recorded test:

watch the 4 minute demo video

A simple example I know but this is more like it. I particularly like the element highlighting and the ability to do 'quick verifications' on those elements during the recording. You can also be as specific as you wish, having full access to the browser DOM tree:

locate in DOM tree

and from there you can examine/compare individual attributes using the verification builder:

  verification

this gives you pretty good control. For example, to compare an entire HTML table of results use (notice it is already populated with the relevant markup from the recorded web page):

verification of table markup

I like the way the cancel and OK buttons are reversed in the above too, nice anti-usability touch ;-)

Another useful feature is the storyboard view which shows small screen shots from each page taken during the web recording:

storyboard view

This makes a great (albeit simple) documentation tool for each step. The screen shots also show which control is being actioned upon.

Other nice features

Here's a run down of some of the other bits I have tried so far:

  • You can play back your tests against IE or Firefox.
  • You can do simple data driven tests, for example, run the same test multiple times, but use different usernames/passwords for the logon on each iteration.
  • supports AJAX and Silverlight but not tried this in anger yet.
  • You can call other tests (e.g. a logon test) as a single test step.
  • You can convert a step to .Net code (a one way thing). This is a nice feature and allows you to use recording to capture the main outline of the test and then drill down into various tests by using the "convert step to code" option and hand crank any .Net code you need.
  • Web elements can be identified in various ways, including by attribute matching and XPath queries. This is useful for picking up any dynamically 'added on the fly' controls.

System requirements and cost

You need Visual Studio Team Edition 2008 (or Pro edition).

The WebAii Automation Design Canvas cost itself is around £1700 ($2499) per machine (see price list). I think this is pretty good value for a machine license as you can then share usage across different users. VMs and VPC images are also ok to use. A common sense licensing model from ArtOfTest, nice.

What next

Next step for me is to trial this on a project before the trial license expires to ensure it covers all that we need. I want to integrate it into an existing project, TFS it up and use it in anger with some of our main web UI regression tests we already have in place. I'll bring in the QA guys too, to assess its usage and usability from a less technical perspective.

Clarkey

Wednesday, 25 February 2009

Visual Studio 2010 - WPF screen shots

As you probably know by now, VS 2010 will use WPF (the version to be shipped with .Net 4) for its new editor. If you want to see its cool new look, pop over to Jason Zander's blog:

http://blogs.msdn.com/jasonz/archive/2009/02/20/a-new-look-for-visual-studio-2010.aspx

Nice. Just hope the WPF UI is responsive on lower spec machines...

See also the VS 2010  'brochure' page for a summarised feature list of what you can expect to see forthcoming (there is a CTP download too).

Clarkey

Tuesday, 10 February 2009

Keeping myself in the cloud

I love the Internet. Whether it's to catch up on email, pick up some geeky blog feeds, check out the latest on BBC News, upload some photos or simply update my facebook status, I like to be connected. When I am not in the office or at home, my mobile phone is pretty good for very simple browsing, but my netbook (Acer Aspire One, excellent bit of kit) is what I really like to use when I am out and about.

So... I have my trendy netbook... but hey... how do I get access to my beloved 'cloud'? Oh yes, use a Wi-Fi hot spot everyone crys. Wi-Fi is indeed getting better and most hotels/cafes now offer some sort of sign up style of access. I've no problem with that except most charge silly figures for a measly 30 mins or so of access. Grrrr. Also, I find there is never a hot spot nearby when I need one.t-mobile broadband usb key

I think I've found a better solution for when Wi-Fi is not suitable - a 3G USB stick. Mobile broadband is not new of course, but up until recently most services have been contract based and/or too expensive for my adhoc, occasional style of usage. What I really needed was a reasonable PAYG one. After a bit of searching around, this t-mobile package (£2/day) fitted my situation nicely. You basically pay £2 when you first connect and then you have 24hours of usage (you can connect/disconnect as many times as you wish within that period). There is a 3GB/month fair use policy.

It uses the well known HSDPA 3G protocol (see t-mobile's coverage checker for 3G in your area), but it also gracefully drops down to the (albeit slow) 2G GPRS where there is no 3G signal. Even in GPRS mode, it gives acceptable results. Of course, in 3G mode is where the device excels... with a theoretical down-link speed of 3.6 MBit/s (this is what it 'connects as'), in practice with a low/medium signal I've been getting around 1 Mbit/s down-link speeds and 300kbit/s uplink. Not bad at all.

At £39 notes for the USB stick, if you use the Net in an adhoc way like I do, it's a no brainer and definitely worth a look.

Monday, 22 December 2008

Scrum and eScrum/TFS Feedback

We adopted Scrum and eScrum/TFS (Team Foundation Server 2008) back in June this year for a pilot project. As we are a few days before Xmas, when all is beginning to quieten down, now seems a suitable point to dot down a few observations. Here we go.

The Scrum Method

First of all, I'm converted! Scrum is one of the few processes/methods (I'm not a big process person myself generally) that excites me, in that it focuses the team on delivering good working software and encourages a good relationship between the IT Team and the business. Since adopting it on a small project, I can happily [subjectively] report back that it works, and it works well. We used 3 or 4 week sprints, monthly sprint review/planning meetings, and daily scrums (sometimes missing a day if one was not felt necessary, but we still touched base to confirm this). We also had scheduled weekly "product owner update meetings" to ensure we had a regular slot in a busy "product owner's life", where we always scanned down the sprint backlog to see how things were progressing.

Here's are some observations.

1) The business loved it because:
  • Transparency and business ownership. They enjoyed being a big part of the project, seeing the parts that went well as well as those that did not!
  • Focus on delivery of key features. Having the control of what goes in and what does not, via strict prioritisation
  • Explicitly clear what is being delivered in each iteration and by when
  • Productivity. Business often surprised by the "amount" delivered
  • Regular releases. This often resulted in less impact on the business at go live time ("little and often" approach)
  • Gets everyone focused, especially on testing!
2) The development team liked it because:
  • Clear whom is doing what
  • Regular daily Scrums picked up any niggling issues very early
  • Test earlier and focus on producing tested, “packaged up” work. Although we are not yet adopting TDD (test driven development), as we are doing shorter development cycles, this necessitates earlier testing to ensure all is tested before the end of a sprint. What we did find though was that during the final few days of each sprint, we found it beneficial to focus purely on wrapping up what we had done and "test/fix only" in order to deliver a fully tested product even if it meant removing a sprint item or two in order to achieve this.
  • System deliverables improved. Smaller increments and closer links with business definitely has resulted in better work being produced ('better' being a system that matches what the business wants).
  • All OK so far. Any problems?
    3) A few Issues:
    • Multiple product owners (we had three distinct areas thus 3 owners). Needed a gatekeeper PO to help manage this
    • Trying to fit too much into a sprint. Call it eager to please, naivety or lack of experience, but the first couple of sprints resulted in the development team working their socks off to finish the sprints on time. Looking back, this was purely due to underestimating effort and not allowing enough time for feedback/testing.
    • New requirements coming in during a sprint. This is something we are now getting better at but early on we were drawn by the temptation of squeezing in "important" new requirements into an existing sprint (slapped hands I know!). We live and learn.
    • Some requirements not clear during sprint. We tried to start development on requirements that were changing or not really known. Ouch.
    • Keep control of the number of meetings. With 3 product owners we found we had quite a few meetings each week, some of which the development team did not always need to attend.
    • Keep eScrum work items up to date. Whichever tool you use, it is only as good as the information in it. Hence encourage your team to keep it up to date.

    eScrum and TFS

    As mentioned in an earlier TFS/eScrum post, not only did we switch to Scrum for this pilot project, but we also adopted some new tools namely:

    • TFS 2008 for source control and work item tracking
    • eScrum Process Template.

    Here's my brief thoughts:

    1) TFS Generally

    I like it. Once you get over the clunky, heavyweight feeling of the various MS products working together to give you what you want (SQL Server, Sharepoint, Reporting Services, TFS Web Services) and sorted out all the security goings on (you've essentially 3 products to set up security for), then you are away. The customisation is very flexible (especially once you have installed various power tools) and adopting a VM as a backup strategy has served us well. Well worth the move from VSS!

    2) eScrum 1.0 Process Template

    I looked at a few templates for managing the Scrum project (including Conchango's SFTS and MSFAgile) but in the end, eScrum had the best web interface for us. It is not without its short comings though.

    Here's some of my thoughts on the eScrum web interface:

    • The interface is fixed and "hard coded" as it runs as a separate web site (it does not use the generic Team System Web Access). The advantage of this is that is gives a focused interface, geared towards the eScrum template, but its drawback is that if you customise the template, add new fields etc, although they appear in TSWA and in Team Explorer on the client, they will not be seen in the eScrum web site. Shame.
    • You cannot add attachments through the web interface. Not a deal breaker for me, but as users often submit bugs in the form of "screen shots" this would make a useful addition.
    • No "show history of changes" option on a product backlog or sprint backlog item.
    • The "all items disappearing in sprint backlog" bug needs fixing. Opening a new browser session or switching projects brings them back for now.
    • The AJAX driven web interface is pretty lightweight/quick, especially compared to TSWA. Updating work items is fast and slick.
    • PBI and Sprint pages have too big a header and section at the top. I would like to be able to fit more viewable item lines per page. e.g. with the product backlog page, 2 thirds of the screen is taken up with a header, menu tabs, and first three sections which are rarely expanded once product set up. The bottom third is the bit we use all the time!

    Overall,  a nice interface but we are getting to a point where a version 2.0 is long overdue. I can't see this happening for a while though.... maybe MS should make it open source ;-)

    Merry Xmas
    Clarkey

     

  •