Apr 23

Introduction

Hi All,

In this post we explain how to detect Javascript Errors in firefox using selenium, watir webdriver and cucumber. If you are unfamiliar with these frameworks you can read up on our previous post about Web testing with cucumber.

Get JSErrorCollector

First, you need to get JSErrorCollector.xpi which you can get here. Then, store it under features/support/extensions in your cucumber project location.

Add JSErrorCollector.xpi to your browser profile

require 'rubygems'
require 'selenium-webdriver'
require 'watir-webdriver'
require 'logger'
 
#Start the logger
$log = Logger.new('log/selenium.log')
#Create a profile
profile = Selenium::WebDriver::Firefox::Profile.new
 
#Add JS error detection to the profile!
profile.add_extension "features/support/extensions/JSErrorCollector.xpi" rescue p "Cannot add JSErrorCollector.xpi to profile"

Launch a browser using the profile you created

Now you can launch a new browser instance using:

$BROWSER = Watir::Browser.new 'firefox', :profile => $profile
$BROWSER.goto "http://www.spritecloud.com"

When the JSErrorCollector is installed successfully, you will see the error collector counter in the bottom right of the launched browser as displayed in the image below.


Collect the JS errors

First off, we create a separate method to get the JS errors formatted how you want to display them when one or more JS errors are detected.

#Function that returns a string that presents the details of the occurred JS errors
def get_js_error_feedback()
  jserror_descriptions = ""
  begin
    jserrors = $BROWSER.execute_script("return window.JSErrorCollector_errors.pump()")
    jserrors.each do |jserror|
      $log.debug "ERROR: JS error detected:\n#{jserror["errorMessage"]} (#{jserror["sourceName"]}:#{jserror["lineNumber"]})"
 
      jserror_descriptions += "JS error detected:
   #{jserror["errorMessage"]} (#{jserror["sourceName"]}:#{jserror["lineNumber"]})
"
    end
  rescue Exception => e
    $log.debug "Checking for JS errors failed with: #{e.message}"
  end
  jserror_descriptions
end

Raise exception when JS error is detected

When using cucumber, you can create a hook after every teststep. In this hook we raise an exception when one or more JS errors are detected.

AfterStep do |scenario|
  raise get_js_error_feedback() unless get_js_error_feedback().empty?
end

Note that this is a Collector, so at the end of each execution, the JS errors of all the visited pages are collected. For speeding up the tests, you can do the check after the end of each scenario (use hook AfterScenario) and cleanup the list after that.

Good Luck!

Feb 20

I’m incredibly chuffed to announce that as of today, we’ve opened a subsidiary company Cambridge, UK. This has been a while in the making, and is a huge step for us. We consider this step to be the optimal solution to the growing and changing demands on our business:

  • Our customer base in the UK is growing. We’ve always operated internationally, but after the Netherlands, the UK has been the place we have been most active in. By opening an office here, we will be able to serve local demands much, much better.
  • Requests for development consultancy have been growing. While we primarily offer quality assurance services, our skillset includes specialization in mobile software development, high scalability server architecture and process consulting, and increasingly customers have asked for our help in these areas. By starting a new business unit dedicated to these services, we’re improving our focus, and will be able to pursue these activities with the dedication they deserve.
  • Synergy is not just a buzzword. When we previously spoke to customers about QA or development services, we did so in isolation, because we were thinking of ourselves as “a QA company that can do development”. Ironically, by giving full credit to each part separately, we’re in a much better position to offer the combined package to our customers.

You can reach the Cambridge office straight away on +44 (0) 1223 853863, or send an email to development@spritecloud.com. Our office/postal address is:

spriteCloud Ltd.
ideaSpace/Entrepreneurship Centre
3 Charles Babbage Road
Cambridge
CB3 0GT
United Kingdom

Feb 01

Some of us will be at this year’s FOSDEM conference, and we figured that’d be a great moment to run a witch hunt^W^Wcontest.

The rules are simple:

  1. Spot any of us at FOSDEM, and take a picture as proof. For the purposes of this competition, the whole of Brussels counts as “at FOSDEM”, at least from 02/02/2012 to 05/02/2012 (CET timezone).
  2. Send the image to fosdem@spritecloud.com. No entries arriving past the 29th of February 2012 will be accepted (CET timezone). Please include your name, email address, and whether or not you want either of them published. We reserve the right to publish your image submission anonymously, though.
  3. We’ll judge which pictures are best. Bonus points if you include yourself, make it funny, or manage to connect it to a particular FOSS project, etc. Offensive submissions will be disqualified. We’re impervious to bribery, but we may take whatever freebies you offer anyway.
  4. The three best entries get a guest blog post here, on any subject related to FOSS and/or testing or writing software. It goes without saying, really, but offensive content will be rejected even if it’s relevant.
  5. The best entry also gets a free T-shirt.

We’d love to give away more swag, but we’re unprepared – this whole thing has been somewhat spontaneous. If it’s a success, we’ll do it again next year, but bigger. So be sure to participate!

P.S.: Here’s the boring legalese:

  1. The contest is open to anyone except employees and the families of employees of spriteCloud B.V. By entering this contest, contestants agree that spriteCloud B.V. may use all images created for the contest for promotional purposes.
  2. All entries and all rights relating there become property of spriteCloud B.V.
  3. By entering, all entrants agree to release spriteCloud B.V. and their employees from all liability and claims relating to participation in the contest. No substitutions or transfer of prizes or cash redemptions permitted by winners.
  4. spriteCloud B.V. reserves the right, in its sole discretion, to cancel, suspend or alter the rules & parameters of the contest. spriteCloud B.V. also reserves the right to substitute a prize or prizes as it deems suitable in the event that the prize is unavailable for any reason whatsoever.
  5. Winners under the age of 18 (as of win announcement) must have their parents’ and/or legal guardians’ consent to accept prizes. Winners, by acceptance of prizes, agree to release spriteCloud B.V. from any and all liability claims or actions of any kind whatsoever for damages.
  6. Offer void where prohibited, regulated or restricted by law in a manner inconsistent with the purposes and rules hereof.
Nov 24

Interviews at The Power of One (1 of 2) from BlueVia on Vimeo.

Jump to ca. 1:45 if you want to see my ugly mug. Unfortunately they didn’t show the main bits when I was talking about QA, and got my name wrong. But it’s all good in the end!

Tagged with:
Nov 14

spriteCloud was participating at the Website of the Year Awards 2011, and quite an event it was.

Here you can find the pictures of the event. The winner of the one and only ‘Website of the Year 2011′ Award was Tweakers.net.

Below you will find the results of all the sub categories:

Populairste site Beste site
Automotive Marktplaats Auto’s Renault
Carrière Nationale Vacaturebank Unique Uitzendbureau
Communities Facebook Gathering of Tweakers
Daten Relatieplanet Paiq
Educatie Kennisnet NHA
Entertainment YouTube.nl De Speld
Financieel ING ASN Bank
Games Zylom Zylom
Gezondheid & Welzijn Receptenweb Receptenweb
Goede Doelen CliniClowns KWF Kankerbestrijding
Huisvesting & Interieur Funda IKEA
Nieuws & Informatie Nu.nl Tweakers.net
Overheid Belastingdienst Consuwijzer
Vrije tijd & Reizen Vakantieveilingen Wintersporters
E-commerce iBood iBood
Sport PSV.nl PSV.nl
Telecom Ziggo ZeelandNet
TV & Radio UitzendingGemist Radio 3FM
Vergelijking Tweakers.net Pricewatch Tweakers.net Pricewatch
Weer & Verkeer Buienradar Google Maps
Zoeken en Vinden Google Google
Mobiele Website Buienradar Mobiel Nu.nl Mobiel
Sep 08

Viral
Wouldn’t this almost be a great viral campaign? This new campaign of one of the world’s leading companies only works properly in Internet Explorer 9.0. In other browsers this is what the Wallmart Video Download service looked like right after launch.

Even though errors like this don’t occur that much anymore most Chrome and Safari users know that there are still quite some annoying bugs when surfing the internet.

The truth is in the numbers
Does this means that developers still can’t be bothered to do cross browser testing? Does it means that companies don’t demand that their web applications work on all browsers? The truth is in the numbers;

Source: StatCounter Global Stats – Browser Market Share

IE 6.0, 7.0, 8.0, 9.0, Firefox 3.6, 4.0, 3.5, 5.0, Chrome 12.0, 8.0, 10.0, Safari 5.0 and so on. What works great in IE 9.0 doesn’t automatically work in IE7. Ok. That shouldn’t be hard to find out.

Source: StatCounter Global Stats – Browser Version Market Share

The top 4 is: Chrome 13, IE 8.0, Firefox 6, IE9. Only thing is, they add up to about 70%.

One hundred percent
In testing 100% is impossible. For cross browser testing this is no different. Let’s say you want to test on the browsers used by at least 85% of all people. This means you’d have to have at least 12 dedicated systems running, and being maintained. Not everyone wants this, which is why we have it. As well as a hosted test environment. We have everything running here in our test lab. Almost everything. From IE x.x, Chrome x, Mozilla, and up

Mobile
When testing mobile web applications you need to be able to test on mobile handsets. We have a wide coverage of handsets for the big mobile operating systems popular today.

Pleased
Having all the handsets; hosted test environments; a test lab based on an official Microsoft Developers Network (MSDN) subscription are just some of the reasons why our customer base, including high profile Digital Agencies, are very pleased with the testing we currently perform for them.

At spriteCloud we are domain experts in AGILE software Quality Assurance and software testing, particularly for web consumer service companies and digital agencies.

Aug 19

More or less by chance I had an opportunity to attend the first day of gamescom this year, Europe’s biggest video game related trade show. The entertainment area where consumers get a glimpse of new games was a blast, as expected. But the business area open only to trade visitors was particularly interesting to me, because there were a fair amount of test companies present.

It seems as if the games industry on the whole takes their testing a lot more seriously than many other sectors of the software world. That shouldn’t be particular surprising, given that games are probably the most abundantly distributed shrink-wrap software still in existence. When you cannot rely on online updates being available to your customers, testing becomes a crucial part of your business — and the stakes are high in video gaming.

Continue reading »

Tagged with:
Jul 22

Alright, that’s a provocative title right there, I admit it. I couldn’t resist.

A short while ago, I was perusing the July 2011 issue of the Communications of the ACM, when I came across an interview article with some of the people behind a massive retro-documentation project at Microsoft. Microsoft had to document much of the client-server communications of their existing software to allow third parties to implement interoperable software. The article is succinctly called “Microsoft’s Protocol Documentation Program: Interoperability Testing at Scale”. Definitely worth a read.

The sentence that struck me, and that is repeated in sentiment in the remainder of the article is this: “First and foremost, a team would be required to test documentation, not software, which is the inversion of the normal QA process; (…)”.

I’m not sure I agree with that statement. And to be fair, that statement isn’t the point of the CACM article, either. But it presents a good launch pad for something that concerns me a little.

Continue reading »

Jun 29

It feels like ages that I blogged about the place of QA in software development. Granted, in internet years, it has been a while. But the topic never seems to quite go away.

Since I wrote that other blog post, a lot of things have happened here at spriteCloud. In the meantime, we’ve been involved in the testing process with quite a few more customers (yay!). One thing that emerged over time is that many companies don’t exactly come to us for testing alone, but also for answering the question of how to fit testing into the development and release process.

When you try to answer that question, it quite often happens that you discover that the reason these companies didn’t know how to fit testing into their process is that there is not much of a process in place to fit testing into. To us QA-minded people, that may come as a surprise, but it really shouldn’t be.

As one young developer at one of our clients put it to me (slightly paraphrased): “They should really teach release management in university. Programming is easy enough to pick up, but this stuff is hard to figure out on your own.” I sympathize with that, as it mirrors my own experience from some ten years or so ago when I started out on my development career.

Before you can teach anything about development processes, though, it is essential that one understands the software lifecycle.

Continue reading »

Tagged with:
Jun 02
preload preload preload