Development

iOS App Testing – Ad Hoc App Delivery Method

As I recently started using TestFlight for this, I thought I’d outline how the other way of delivering Apps to testers works – that is Ad Hoc Delivery.

Firstly, the UDID of your iOS Device(s) has to be known by the Developer delivering the App to you, otherwise this whole process won’t work. Here’s a handy guide to finding your device’s UDID.

Then, you need to follow these manual steps:

  • You will normally need to delete old versions of the App to be tested (not always necessary, so check first) from iTunes / your iOS device
  • Delivery of the App could be via email or Dropbox or similar method
  • The App will either be delivered as an .ipa file or a ZIP file
  • If necessary, unzip the ZIP file
  • If a Mobile Provisioning File has been supplied also, you will need to add this to your iTunes Library first. Also, the accompanying file will be named .app rather than .ipa
  • Depending on which type of delivery, add either the .app or .ipa file to your iTunes Library
  • Go to your iOS device in iTunes and look under Apps.
  • Find the new App – easiest way is to sort by Date
  • Click to select the new App to be tested
  • Then sync your iOS device
  • May also need to click Apply also

As you can see, this is a lot longer route than using TestFlight.

Here’s some extra info on the Ad Hoc delivery method.

http://www.camiloo.co.uk/install-your-app-iphoneipad/

http://www.wikihow.com/Install-Ad-hoc-iPhone-OS-Apps

Installing via Windows http://www.innerfence.com/howto/install-iphone-application-ad-hoc-distribution 

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.

 

Apps World 2012, Day 1, Tuesday 2 October 2012

 

Earls Court 2

Last Tuesday, I went to the first day of Apps World 2012, at Earls Court 2. I went along to see what I could find out about the latest Apps and App Technologies, plus also to do some networking.

Event photos from Apps World blog

Here’s my findings, in random order:

  • For Earls Court 2, use West Brompton tube station, which is just across the road. Earls Court tube station is about a 10-15 minute walk instead.
  • I noticed from the floorplan that the guys from BugFinders were there, so I met up with them on Day 2
  • It was the first time I’d heard of AQuA – the App Quality Alliance – which comprises some large companies including AT&T, Orange, Oracle, Samsung and Sony Mobile. They’ve also just launched their Quality App Directory. It all seems targeted at Android Apps, at least initially.
  • Compuware were at the event and on the sponsors list. I didn’t see a stand of theirs, but I did pass a meeting room which had their name on it, which was a bit unusual.
  • I attended several presentations at the Developer Zone. Some of these presentations are now available on the Apps World website, either as Audio and/or Slides downloads. The presentations I saw at the event included:
  • - Tizen, which was delivered by Cheng Luo of Samsung. Tizen is a different O/S for mobile phones, using HTML5.
  • - RhoMobile, delivered by Adam Blum, Product Manager of RhoMobile, now part of Motorola Solutions. A development platform to enable writing native apps for all platforms, using HTML5, Javascript and Ruby.
  • - GeoLocation Panel – This dealt with integrating location based services (LBS) into your apps. On the panel were people from Hailo, Telmap, runtastic and sensewhere.
  • Your Local M8 – User experience in your LBS mobile app. This was delivered by Shani Avnet, User Experience expert at Telmap, now part of Intel. This went over the LBS features in the M8 iOS App, also covered UI challenges and solutions when dealing with LBS in your App, plus also the potential for integration with other Apps.
  • - The Appsters – for best ‘Startup App’ – this was interesting, as several Startup App developers got a few minutes to pitch their new App and try and receive votes via Twitter, for that nights The Appsters Awards. #the_appsters
  • - Among those pitch their Startup Apps were My Guide (Social Travel), Goldstar Savings Bank, Brush DJ (thanks for the free toothbrush by the way!), Soundrop (Enabling social music discovery in Spotify) and Whats This (a photo based game)
As you can see from the above list, there was a lot to see and that was just in the afternoon.

 

TestFlight – iOS App Delivery for Testing

TestFlight » iOS beta testing on the fly

I’ve now started using TestFlight, which enables simple delivery for iOS Apps for testing.

The idea behind it is that iOS App developers setup a project that testers can be added to. The testers can then access the latest builds of the App as and when required and then download the App to their device for testing.

This gets around the usual manual process of 1) supplying UDID of your device(s)   2) App distribution via Dropbox/email 3) manual installation via iTunes.

TestFlight Setup

To get setup with TestFlight you do the following:-

  • Using your iOS device, visit URL supplied by developer
  • Sign up, supplying your email details and password etc
  • Register your iOS device
  • Install TestFlight Profile
  • When all done, you end up with a TestFlight App on your iOS device

I’ve only just started using it, so will provide some more info when I’ve been using it for a while.

 

 

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

 

 

Excel automation with Python

Having looked into the many uses people have found for Python, I can see why its such a popular language.

One of these uses is to control an Excel XLS, which could then be used for data-driven testing, with the aim of reading data from each row of the XLS and then using this as input data and expected results.

A quick search on Google and I found several examples of using Python to control an Excel XLS and also CSV files. One of the most useful pages was from scienceoss.com.

The basic steps are:

  • Install the xlrd package
  • In your Python script, import xlrd
  • You can then make use of xlrd for Excel XLS interactions
  • A quick and easy example is shown below. This opens a workbook named ‘Test1.xls’ then gets the first sheet, then prints out each row of the contents, using a for loop through the rows.
# Import the xlrd package
import xlrd
# Open an .xls file
book = xlrd.open_workbook("Test1.xls")
# Get the first sheet
sheet = book.sheet_by_index(0)
for rownum in range(sheet.nrows):
    print sheet.row_values(rownum)
  • Another example is shown below, with Python comments.
  • This example  does things in smaller steps than the first example and is useful for seeing how you can access columns and individual cells.
  • You can then place the values from the cells into variables in your Python script.
# Import the xlrd package
import xlrd
# Open an .xls file
book = xlrd.open_workbook("Test1.xls")
# Get the first sheet
sheet = book.sheet_by_index(0)
# get columns 1,2,3,4
first_column = sheet.col_values(0)
print first_column
second_column = sheet.col_values(1)
print second_column
third_column = sheet.col_values(2)
print third_column
# get some cells
cell_A1 = sheet.cell(0,0).value
print cell_A1
cell_A5 = sheet.cell(4,0).value
print cell_A5

 

 

Learning Python

I’m currently learning Python, with the aim of adding to my scripting skills and seeing how Python can be used within general projects and testing projects.

Initially, I’m learning via the web site version of ‘Learn Python The Hard Way‘, which actually provides a gentle introduction to Python if you’re a developer. It works in the form of small exercises which introduce something new and then asks you to type the code into a text editor (Notepad++ suggested) and then run it in a Python environment. It’s really written for someone who needs an introduction to coding and Python, but the slow pace means its easy to follow and you can experiment easily with the example scripts.

By exercise 33, we’ve already covered quite a lot of Python’s commands, structures and elements – including variables, strings, input, using files, functions, logic operators, if-elif-else, while loops, for loops and lists.

Even at this early stage, I can see that Python looks a very powerful language for scripting and – so far at least – it’s easy to read and follow the code.

Now an ISEB/ISTQB Certified Software Tester, Foundation Level

Update: Friday 13 July – Now received my certificate from ISEB/BCS. Full title is ISTQB – ISEB Certified Tester Foundation Level (CTFL). Well pleased with my score, which was 37 out of 40, 92.5% – so all the study and practice was worthwhile.

The other day – last Friday 6 July – I passed my ISEB/ISTQB certification exam, Foundation Level. The exam was an online one, at a VUE Pearson test centre, near Aldgate East tube. The test lasts for an hour and at the end you get a printout telling you if you passed the exam. I passed it and am now awaiting the full results, which will be sent in the post to me, by ISEB.

The book I’ve mentioned before on DevBlog – ‘Software Testing: An ISTQB-ISEB Foundation Guide’ – was very useful in learning the syllabus and getting through the exam. Also, the example tests available from ISTQB and other places also really helped.