Tuesday, August 24, 2010

Setup test environment

This article will not be too long because installation of this framework is not time consuming task and easy enough. In general, the only information I used to prepare the environment was documentation located at their official site.

The installation by itself consists of 3 separate areas: Selenium Core, Selenium-RC and Selenium IDE. I downloaded most recent stable data (selenium-core-1.0.1.zip, selenium-remote-control-1.0.3.zip and selenium-ide-1.0.7.xpi correspondingly) from the Downloads page.
 
With Selenium Core and Selenium-RC I had no problems at all. For Selenium Core I copied core folder under Tomcat 6 (as it described in install-readme.txt from selenium-core-1.0.1.zip). Selenium-RC was configured basing on the article from the following page. There are two ways described on how to configure this component. One way is for Eclipse. Another one is for IntelliJ. You are free to use any way you want, but personally I prefer the second.
 
With Selenium IDE I have had few issues to resolve. One of the key requirements defined for the whole activity is that UI-Element should be included to. I red an article about this extension and found it very useful. It gives many benefits and corresponds to what we call "good programming practice". In UI-Element Locator article from extensions list I downloaded selenium-ide-ui-current.zip and tried to install it as Selenium IDE with UI Element Locator included to. Unfortunately, I have got some errors. From the article I found that the archive currently included is not up to date because it is based on some earlier release and the component should be rebuilt using most recent sources. Jumpstart: See UI-Element In Action article from the blog describes everything you need to get actual Selenium IDE with the feature included. However it is not enough to make it working. Unfortunately, current version of FireFox browser does not support this version of Selenium IDE (at least on the moment I was writing this post). Therefore, to solve this problem FireFox should be downgraded up to 3.5.*. After these modifications I’ve got working environment.

Eventually, we are ready to start recording our first test case. Also, please note, the application is being tested should be installed and configured in the environment as well;)

Wednesday, August 18, 2010

Planning our activity

Any activity begins from a plan. So let’s do so to have a clear understanding of how it should look like and which requirements it should achieve. Here is a brief list and preliminary order of steps we will go closely with. Also, I assume it is to be updated (corrected) in the future once we have any changes in the direction.
  1. Setup test environment;
  2. Record simple test case in Selenium IDE (excluding check and verification points);
  3. Prepare objects repository using Selenium UI-Element feature and update the test case accordingly;
  4. Specify basic scenario and define objects to be used in respective use case;
  5. Wrap up commands that represent a logic action into separate procedure. Update the test case accordingly;
  6. Make the test case repeatable;
  7. Migrate the test case to Selenium RC and make it workable;
  8. Run the test case included into a test suite from command line;
  9. Check an ability to run the test case under different browsers (such as FireFox, IE, Chrome);
  10. Add output control mechanism (insert check and verification points);
  11. Integrate the automated testing into continuous integration;
  12. Add meaningful test case in order to perform sanity testing.
Using this plan we'll try to cover meaningful areas of what the automation consists of. You may see that there are no verifications made at the very beginning. It is made intentionally. I have some thoughts about which I explain later.

Monday, August 9, 2010

Introduction

It is a secret to nobody that the success of the application depends largely on the quality of it. In other words: if it is fairly stable and its behavior is predictable - people will use it in their work, and will do this with gusto. Many people would agree that automated testing - an integral part of a successful product. That is why we all are wondering and trying to make this process as much convenient as possible and useful to work with.

As a guinea-pig, I took an application, developed by our programmers. One of the few weaknesses of this product is pour automation of the testing process or absent at all:). That is why my choice fell on it. I have been testing software last 6 years, and during that time managed to get acquainted with some products, which help to QA and Test-engineers very much in our arduous labor. Saying “arduous labor” I meant automated testing. Here are some of them: QTP, Rational Robot, Jmeter.

So, here is a task – implement automated testing for the application. A few weeks ago I was thinking about tool that would be useful for this activity, and came to the conclusion that the most suitable candidate for this is Selenium. Here are several reasons of it:
  • It is open-sourced tool;
  • More or less stable;
  • And the most important. I am new in the Selenium, therefore it is a good challenge to me:).

Eventually, we got to the main. There was an idea not only to setup the testing process from the very beginning but also to describe the whole process (including success and failures) and make it accessible on the public curt. I think it may be interesting for many people, especially for those who just started using Selenium suite. Also, feedback, comments, suggestions will be very much appreciated. Any suggestions are welcomed.

To be continued. Better details you will find in the future posts.