blog

Let's talk about test automation

Cucumber Basics: Gherkin and Files

This entry is part 8 of 11 in the series Test Automation

Introduction

In last week’s post, we provided a complete setup guide for cucumber and related packages on Windows. This week, we’re going to cover the basics of cucumber. You’ll learn about what each file in a test suite means, and you will write test scenarios in Gherkin structured English.

Continue Reading »

API Framework Requirements

In Web API Versioning we mentioned in passing that we’ve been developing our own, miniature web application framework specifically for easily building web APIs. Today, we’d like to present the rationale and feature set in more detail.

If you build a new web-based application, chances are you’re going to reach for Rails or Express, because they’ll get you started quickly. But there’s are a number of drawbacks with doing that, which tend to manifest themselves only partway into your project.

Continue Reading »

Easy debugging of your test automation watir-webdriver scripts

This entry is part 5 of 11 in the series Test Automation

Hi All,

When you are using watir-webdriver for web testautomation, you might encounter problems that are not be easy to debug. For example interaction with page elements such as links or buttons that are hidden. Or locating elements in other iframes. One easy way to see what is going on is by interacting with your web browser through the command line!

Continue Reading »

Mobile test automation in 3 simple steps

This entry is part 4 of 11 in the series Test Automation

Introduction

 

Hi Again,

In this post we would like to explain a bit more about the mobile test automation that we are using here at spriteCloud. The past years we have seen that the mix of cucumber with selenium webdriver has been extremely powerful. This setup allows for test automation that is, besides easy to setup and maintain once you get the hang of it, understandable and easy to expand for any stakeholder in your project. We are using this same setup now for testing native mobile applications and it works like a charm!

We will start with mobile test automation for android. For this test automation we are using calabash-android which is basically a mix of cucumber with robotium under the hood…

Continue Reading »

Complete setup guide for Ruby, Cucumber and Watir or Selenium webdriver on Windows

This entry is part 3 of 11 in the series Test Automation
This blog post is outdated. Please refer to our updated setup guide instead.

Hi All,

We have seen quite some people having trouble getting a proper test automation setup using cucumber and watir-webdriver or selenium-webdriver. Here we describe the minimum number of steps to get your cucumber with watir/selenium-webdriver up and running.

Continue Reading »

Cucumber Testing in Cross-Functional Teams

This entry is part 2 of 11 in the series Test Automation

Here at spriteCloud we love cucumber. It’s a test framework for behaviour driven development (BDD), that is a development practice that includes testing during development.

BDD is slightly different from other test methodologies in that it’s designed to be used in cross-functional teams. In this post I will briefly touch on these differences, and then proceed to explain how you would change your approach to writing test code in accordance with the BDD philosophy with the help of an example.

The target audience of this blog post is test engineers first and product managers second. Note that I use these terms as roles rather than job descriptions; a test engineer is anyone writing test code, and a product manager is anyone thinking up features for the software. You could be both of them at once.

Continue Reading »

Web testing with Cucumber

This entry is part 1 of 11 in the series Test Automation

Agile testing methods

One of the keys to a successful agile software project is considering testing from the beginning. While in some projects, especially web projects, testing is sometimes an afterthought, one member of the team clicking away on the site for a while before deployment to production, which is not really a sustainable way of operation. At least not in a website that is used for something else then blogging. There’s nothing wrong with blogging, mind you, it’s just that the software is typically “ready” for use and people just change the content or posts. One way of achieving this goal is to use test driven development (TDD) or behavior driven development (BDD).

Continue Reading »

Ruby in Web test automation – The Questions

How come Ruby ?

 
There are several important Ruby projects, which are also increasing the popularity of the Ruby language in general:

http://www.ruby-lang.org/en/libraries/top-projects/

The most interesting projects from my (and this blog posts) point of view are Watir and Ruby on Rails, the former from a testers point of view, the latter from web developers.

Good projects don’t just come from nowhere, either. The language itself is very elegant and enjoyable to use. Having a programming language that works for you instead of against you is going to leave more time for innovation and thinking about the next big features for your product. The Ruby community is very active and provides very nice modules (=gems), which provide a specific functionality and usually do it very well.

What is Watir?

 
Watir stands for Web Application Testing in Ruby, http://watir.com. It’s a framework, which drives the browser programmatically. Currently the officially supported browsers are IE and Firefox, but gems also exists for Chrome and Safari. Also Opera is working on a port of their own, which they are using in their own development (http://my.opera.com/core/blog/2009/03/06/test-automation-with-operawatir). Unfortunately, it is not available for outsiders yet, which makes guaranteeing websites work on Opera more difficult than it should be.

What about Ruby on Rails?

 
The single most important reason for Ruby gaining a lot of attraction in the recent years is the Ruby on Rails web development framework, http://rubyonrails.org. The framework enables quicker web development with it’s inbuilt support for database access. It’s actually not just support, but ActiveRecord is one of the fundamental technologies behind RoR and makes it especially suited for database driven applications.

How is that related to testing?

 
Watir is great for web automation, and we have used it in extensive automation projects. There is lots of documentation available for the basic usage, but as always, best practices for implementing automation test projects in different types of situations are more difficult to find and require some trial and error to find the best approach.

Typically, one of the main points to consider is how easy the test cases will be to maintain. Writing one or ten test cases is easy without any structure, but scaling the automation suite for hundreds or thousands of test cases requires careful planning. Many of the same rules apply as for any software development project. As most of the testers do not have a developer background, this can be a challenge in the beginning.

There’s is nothing stopping testers taking advantage of the already well thought out features of Ruby on Rails what comes to database access (ActiveRecord) and for sending email (ActionMailer). Database access can be used to verify that a form actually posted the values and they were stored correctly in the database. Email can be, for example, used for sending test reports directly from test automation. There are clear synergies in understanding both of these technologies when aiming the create good test automation projects. And when using the already available gems for the tasks, you’ll save time for actual automation work.

We will cover several of these topics in a series of blog posts.

 
Marko

Reputation. Meet spriteCloud

Find out today why startups, SMBs, enterprises, brands, digital agencies, e-commerce, and mobile clients turn to spriteCloud to help improve their customer experiences. And their reputation. With complete range of QA services, we provide a full service that includes test planning, functional testing, test automation, performance testing, consultancy, mobile testing, and security testing. We even have a test lab — open to all our clients to use — with a full range of devices and platforms.

Discover how our process can boost your reputation.