WTA with Ruby - A high level view of how it works

You're most likely already familiar with manual testing and different tools and techniques, but manual testing (especially when done repetitive) becomes a very boring task very quick. Also it might be way more efficient to use test automation for repetitive tasks or the ones that are difficult to perform manually. So you want to look into test automation. What do you do? Where do you start?

Scripting/Programming Language

There are so many tools and languages to use that it's difficult to choose. Usually you start with what is already available in your company, or something that makes sense to use for your project. But if you can start from scratch and there is nothing available in your company and you have no preference for any programming/scripting language, why not start with Ruby. In my experience it was fairly easy to get used to, without to much programming knowledge.

Tools

Then there is still the task to choose a tool to script for. For website test automation there are so many tools available, it's still a forest of options (Just Google "website test automation tools"). The one I'm familiar with is Cucumber. Cucumber is a Business Driven Development tool. To explain this in short, this means that as a team you develop Acceptance Tests in form of user scenario's with clear precondition, interaction and validation statements (Given, When, Then). With a simple readable language/style called Gherkin even a manager should be able to understand what the test is about.

Frameworks

Cucumber has support for many different programming languages and framework integrations, and is therefore a widely known and used tool (see https://cucumber.io/docs#cucumber-implementations). With Ruby and Cucumber there are two frameworks that are widely known and used. Selenium and Watir are the two I'm talking about and the ones we'll be using in these series of blog posts.

Webdrivers and browsers

But we're not there yet, we still cannot mimic the user behavior on the browser. You need a so called (web)driver to send these mimic commands to the browser. The (web)driver has an API that you can talk to with your language, tool and framework. This Watir page explains in more detail how your tests makes it all the way to the browser.

I hope this helps you to understand the relation between all the different aspects on a high level. Just understanding this is already a big help when you're new to test automation. In the upcoming blog posts I'll go more into the details of installing and preparing everything we talked so far, which we need before we can actually start playing with this setup/suite. In case you really can't wait for me to finish the next blog, give it a go by following the instructions on this website: http://www.testautomation.info/

Comments

Popular posts from this blog

PowerShell - How to overcome Azure VM's fixed resolution limitation

TA Basics: Website Test Automation on mobile devices via Appium server

TA: How to get the Session Storage data from your browser