Pages

Thursday, May 23, 2013

Master Selenium: Selenium IDE - Part-II




In the previous article "Master Selenium: Selenium IDE - Part-I", we learned how to created how to create a simple test case with Selenium.
In this part we will make it a little bit more complex :).

We will create a test case that will:
1- Opens the Delicious home page.
2- Searches by the keyword 'Selenium'.
3- Reads the number of bookmarks from the result page.

Now, this may not look like a test case for you but it will  but it's just an exercise that will surely apply in a real test case.


PREREQUISITES:

Downloading and installing Selenium RC
Selenium RC is a Java based command line server that starts browsers and runs commands you pass from your tests.
1. First make sure you have a Java runtime installed on your machine.
2. Download Selenium RC.
3. After extracting the files from the archive copy the ‘selenium-server.jar’ file to any directory you feel appropriate. I copied it to my PHP installations bin directory.
4. Start the Selenium RC server from the command-line by issuing the following command:
java -jar selenium-server.jar
This will start the server on port 4444.
5. Now the server is ready to accept test commands from your PHP script. Make sure you keep this server running till you finish testing.
Installing PHPUnit
1. An easy way to install PHPUnit is to use the PEAR installer. The PEAR channel (pear.phpunit.de) is used to distribute PHPUnit so make sure that it is registered with your local PEAR environment:
pear channel-discover pear.phpunit.de
After the channel is registered install PHPUnit:
pear install phpunit/PHPUnit

So let's get started!!


Sunday, May 19, 2013

Master Selenium: Selenium IDE - Part-I




In a previous article "Pick your Test Automation Tool" i talked about the best approach a test automation engineer should follow to pick a tool that covers all his testing needs.

Selenium is one of the test automation tools on the market; free, easy to use and has the potential to live up to all your testing expectations.
With a set of 4 tools (Selenium IDE, Selenium RC, Selenium WebDriver and Selenium Grid) the power web automation giant makes it easy for an automation tester to record scripts, debug, playback and many other features that will make your job easier.

In this article we will see the basics of Selenium IDE, most importantly how to record scripts with Selenium IDE.

What is Selenium IDE?

Selenium IDE is a Firefox extension that allows recording, editing and debugging tests.
To get started, you have to download and install Selenium IDE: http://seleniumhq.org/download/

Record a test with Selenium IDE.

Start Selenium IDE (Web Developer → Selenium IDE or by clicking the launch button).
The following window should appear:
Selenium IDE main window





















After starting, Selenium IDE will already be in the recording mode (red button is pressed, previous picture). Now you can begin writing your first test:

1- Browse to «google.com»
2- Enter «Hello, World!» in the search
3- Click «I'm Feeling Lucky» button

After performing the steps described above, click on the red round button to stop test recording.

The Poka-Yoke Technique



I recently came across an article talking about a testing technique invented by a japanese engineer named Shigeo Shingo.
I did a little research about this and i wanted to share this amazing story with all quality assurance geeks like me.

I can affirmatively say that Shigeo Shingo is the Walter A. Shewhart of Japan (W. A. Shewhart is an american physicist, mathematician and engineer known as the father of statistical quality control).

This man (Shigeo Shingo) who invented the Single-Minute Exchange of Die (a method for reducing waste in a manufacturing process) while working at Toyota came with an idea that reduces the circle of the testing scope; which mean decrease the probability of finding mistakes and defects during the testing phase.

Doesn't necessary make a QA Consultant be thrilled after hearing this!

Shigeo Shingo called this technique The Poka Yoke Technique.


What is Poka-Yoke?


In Japanese language, the term Poka means "mistake" and the Yoke means "prevent". This technique means mistake preventing or mistake proofing.

The purpose of Poka-Yoke is to develop processes to reduce defects by avoiding or correcting (design to show alerts or warning messages to user) mistakes in early design and development phases.

Pick the best Test Automation Tool



As a QA Consultant, test automation is a daily task for me. With several test automation tools out there on the market, it will take a lot of time and energy to decide what tools should i use to perform this task effectively.
First, in my opinion, the main question here is "What determines what is the best test automation tool for me to use"?

The easiest way anyone can think of, which i admit it was my decision maker in several occasions, is googling the words and picking the 1st that comes up.
Now i wouldn't say it isn't effective most of the times, but in a million dollar project that needs testing, i wouldn't recommend google.

What is your budget!

The Cost will not be a game changer in this topic.


Many small companies tend to care much about the cost. but in my opinion small projects doesn't necessary need test automation. And big companies with big budgets, will.
but either ways most of IT companies purchase payed test automation tools.
From my personal experience i would say payed test automation tools are better than most of the free ones, with some exceptions of course.
Now, i don't want to be that guy that is using a free tool and be stuck in something with a needy boss on my throat and a deadline on my back waiting for a 14 year-old freelancer from the other half of the planet to fix