open source

Apps World 2012, Day 2, Wednesday 3 October 2012

Last Wednesday, I went along to Day 2 of Apps World 2012, at Earls Court 2. I went for the full day, as there was more of interest during the morning session, especially around the area of Mobile Testing.

My photos from the day are below, some of dodgy quality as all are via my iPhone. There’s also the official photos available at Apps World blog

Here’s my findings, on the days events:

  • I saw several presentations at the Developer Zone and some of these presentations are now available on the Apps World website, either as Audio and/or Slides downloads. The ones I saw on the day included the following:
  • - At 1040, the presentation on Mobile Testing, by Becky Wetherill of Borland. This dealt with both areas of Mobile Testing and also Borland’s Silk Mobile testing product. One of the interesting points was that due to the number of different devices, screen sizes and O/S combinations, there’s over 100,000 possible device combinations – obviously impossible to test all of those! Therefore, the Edge Strategy is used, to test minimum and maximum O/S versions, on different devices, with minimum and maximum device screen sizes. There all also many factors which affect an Apps performance and behaviour, including O/S Versions, Screen Size and Chipsets.
  • - At 1110, the Applicasa presentation was interesting and eye-catching – their idea being to take Zombie users out of developers Apps and turn them into active/paying users
  • - At 1120, Tim King, the CTO of 5app, gave his forthright presentation on the amount of cowboys in the world of App development.
  • - At 1130, there was a presentation from Grant Skinner, on Building the Atari Arcade in HTML5 & CreateJS. His company got this projects from Microsoft and Atari and was a way of showcasing HTML5, in this case for games.
  • - After lunch, at 1300, there was then a panel from AQuA – the App Quality Alliance –  which is a non-profit organisation created by Sony, Orange, Oracle, Samsung and many others with the aim of promoting App Quality, mainly in the Android area.
  • - At 1330, there was a presentation from PayPal, on simplifying the payment experience. Part of this covered the Mobile Payments Library (MPL) for iOS and Android, which allows developers to build PayPal payments functionality right into their Apps. Another interesting fact I picked up was that PayPal provide a global test platform at developer.paypal.com where developers and testers can test the whole payment process – including multi-currencies and multi-countries. This allows all use cases to be tested before going live. Dev resources can be found at x.com/mobile and x.com/developers/paypal. Tech support is also available at paypal.com/mts.

 

The whole area of Mobile Payments is an interesting and intriguing one, as it seems to be where everything is heading more and more. With so many competing Mobile Payments technologies it will be interesting to see who’ll be left standing after the coming period of consolidation – surely it won’t just be PayPal? I think testing these different types of Mobile Payments is an interesting challenge, made more difficult by the sheer variety of payment options.

At Apps World, I talked to the following Mobile Payments companies briefly, some of which I’d heard of, some of which I hadn’t:

  • Zooz – they provide an SDK to developers, so they can then choose which payment options to enable for their users. They provide a sandbox for testing.
  • iZettle – similar to Square, they use a dongle to read card details and an App on the Mobile device to do the payment processing.
  • Payoneer – they provide global payment solutions, where payments are made to a prepaid Mastercard, ideal for international freelancers etc who need to be paid for their work via different online work platforms.

Overall, Apps World was well worth attending, a good way of networking and finding out the latest trends and news in the Apps World, with areas of interest for both developers and testers.

 

Webinar – Intro to Mobile Web App Testing with Selenium & Sauce

I recently attended this webinar, given by Jonathan Lipps of Sauce Labs. You can check out the webinar on YouTube.

I’ll briefly outline the main points, for future reference.

Webinar Intro

  • Almost as easy to test web apps with Sauce / Selenium as it is to test websites
  • Automated Testing – can be run every time you check in code for example, also when you refactor code in your library or when you need to regression test

Functional Testing with Selenium

  • Closely analogous to manual QA
  • Likened it to a robot-controlled browser
  • Selenium controls a real web browser with real web interactions
  • Good at showing up cross-browser issues
  • Available as a library in most languages

Writing Selenium Scripts

  • Selenium RC – is the original version
  • Now superseded by Selenium WebDriver
  • WebDriver recommended to use for any new work
  • Much faster than RC
  • WebDriver is client-server architecture

Script, Selenium Web server, Browser Combination

Script-Selenium-Browser

The item to the left in the above screenshot represents a script (in Python, PHP etc) and this interacts with the Selenium Web server, shown in the middle, which in turn interacts with the browser (Chrome, IE, Safari, Firefox etc)

Running Tests on Sauce Labs Platforms

If using Sauce Labs as the test platform, the model now changes. The script (in Python, PHP etc) now interacts directly with Sauce Labs cloud, using Sauce Connect, which allows Sauce Labs cloud to connect to your local host development machine (which is normally detached from the outside world)

Specific Mobile Issues with Selenium

  • Different screen real estate (and different on iPhone and Android and tablets etc)
  • Different devices have different ways of handling text (so your tests have to cope with this – eg iOS capitalises first character in text input)
  • Objects not visible when you expect them to be
  • Advised to do some manual testing when writing automated tests, so you can see how it looks on device

Selenium and Hybrid Apps and Native Apps

  • Selenium currently can be used to test websites and mobile web apps
  • Selenium does not currently work with Hybrid Apps (web apps wrapped inside a native app) or Native Apps.
  • They are hoping to soon be able to test Hybrid Apps and Native Apps from Selenium.

Final Thoughts on Sauce Labs and Selenium

  • Sauce Labs currently use Emulators but plan to use real devices in the future
  • Mobile Test Automation is quite a new area – but gaining in momentum
  • Mobile Test Summit is on 1 November 2012, in San Francisco – where lots of like-minded people will gather together and discuss/debate to push mobile testing forward – especially in area of testing native apps with Selenium.

 

 

Webinar – Intro to Selenium2Library & Robot Framework (also Cucumber & Gherkin)

I recently attended a webinar on the uTest platform, which was titled “Intro to Selenium2Library & Robot Framework”. I hadn’t heard of Selenium2Library or the Robot Framework, so this was a really useful intro to both of these at once. Also there was some information on Cucumber and Gherkin, as used in Acceptance Testing. You can check out the webinar on YouTube.

I’ll briefly outline what I learnt here, for future reference.

Robot Framework

Selenium2Library

  • Python implementation of Selenium WebDriver, for use with Google Robot Framework
  • Uses Open Browser commands and BuiltIn library

Installation on Mac OSX

Robot Framework installation:

  • Requires Python – already on most Macs
  • To install Robot Framework – use pip install robotframework
  • To check its been installed – type pybot –version

Selenium2Library installation:

  • Use github
  • or use easy_install

Cucumber & Gherkin

  • Cucumber is a tool for automated Acceptance Tests
  • Gherkin is used in Acceptance Testing and is the language used in Cucumber
  • Natural language format, similar to user stories
  • Agile way of specifying software requirements
  • Often specified by business and then given to developers

Example Keywords in Gherkin

  • Scenario …
  • Given …
  • When …
  • Then …
  • AND …
  • BUT …

Gherkin Example

Given I have an existing blog account
When I login as user Bert
Then I can see blog welcome page

My Observations on the Robot Framework

  • Robot Framework coding looks a lot like Python coding, with the same indents and spacing – so easy to read, if you know Python.
  • The Robot Framework files shown in the webinar had the format of:
  • Settings
  • Variables
  • Keywords
  • Was described as a good tool to enable non-technical testers to write Gherkin tests – with developers then adding keywords (and processing coding) that the non-technical testers may need for their tests.

Learning Selenium… Selenium IDE

Selenium IDE is a Firefox add-on, which allows simple record and playback of browser interaction. Tests are recorded as scripts in Selenese, a special test scripting language for Selenium.

The easiest way to understand how Selenium IDE works is to download it and install it in Firefox. Once installed, you turn it on via the Firefox Tools menu, Selenium IDE option. The IDE will then appear, as shown below.

Selenium IDE Screenshot

The main parts of this window are:

  • The Menu options – File, Edit, Actions, Options, Help
  • The Base URL input
  • The Playback and Record buttons row
  • Then under this, to the left, the Test Case list
  • To the right, the Command window, listing the Commands in the current script, with focus on the current Command also shown
  • Then at the bottom, the Log/Reference/UI-Element/Rollup area

Selenium IDE – Recording

To start recording a script, first set the Base URL e.g. http://www.bbc.co.uk/
Then press the big red Record button to the right.
From this point, any actions made within the Firefox Browser will be saved and added to your script. To end recording, press the same red Record button.

 

Selenium IDE – Playback

To playback a script, you can either playback the current script, using the ‘Play current test case’ button or use the same option name in the Action menu. The script will playback and the resulting actions will be performed in the Firefox browser and results shown on the IDE screen (e.g. any errors highlighted in red)

 

Selenium IDE – Commands Window

The actions you made while in the Firefox browser, will then be added to the Commands window list, as Selenese commands.
These Selenese commands are represented with three separate elements – Command, Target and Value.
Some example entries:-
Command             Target                Value
open                /search 
clickAndWait        css=span.tl > h3.r > a.l
verifyTextPresent   verifyTextPresent

In the Command list, you can edit the entries as required and also use the self-explanatory right-click options Insert New Command and Insert New Comment.

Selenium IDE – File Menu Options

Using the File menu, you can save Test Cases and Test Suites (a collection of Test Cases) to HTML files.

A great option is Export Test Case As… which allows you to export your Test Case commands out to which ever programming language / scripting language you’re using, including Java, Python, C# and Ruby.

Selenium IDE – Example Script Output

Below is a simple script in HTML format (basically a HTML table) and followed by the same script in Python.

Selenium IDE – HTML Format Script Output

Selenium IDE – Python Format Script Output

 

 

Who needs Visio, when you can use Dia

In some of my jobs I’ve used MS Visio to create diagrams of all types, such as system diagrams and processing flow diagrams. It’s always been a good tool for creating these diagrams but is not part of MS Office package, therefore requires a separate purchase, which isn’t always possible.

Recently, I discovered a great open source (thus free) program called Dia. This provides almost all the features of Visio that I actually used and is highly recommended. According to their homepage, it runs on GNU/Linux, Mac OS X, Unix and Windows – I’ve used the Windows version with no problems. You can see some screenshots here.

I’ve been using Dia to create a Software Testing diagram, so that I can visualise the various stages of Software Testing, as covered in the ISEB/ISTQB Foundation certification that I’m currently studying. Below is an example of a diagram I’m working on, created in Dia.

Dia saves in its own .dia format but you can Export to all sorts of formats, including .png which is the format of the diagram example above.

Dia also looks useful for producing UML diagrams, as it has a specific set of UML drawing tools that can be selected. That feature alone could save users a fortune as many UML-specific programs can be very expensive.

Hopefully, next on the list for Dia’s creators will be an XML Spy style app.