Examples

Covers Everything? – Ranorex Automation Tool Review

Still looking for the ideal solution for automated tests, you probably also have this problem. It is possible to find it ? I do not think so. Test automation tools are rather young solutions and in conjunction with these days fast growing technologies (Flex, Silverlight, Ajax) have problems to cover all needed functionality. In my opinion we cannot expect rapid changes in this topic. We must therefore find the best approximation for our needs, my blog reviews are trying to help.

Ranorex is not very popular tool when looking at google search results, I have asked many of my testing friends and they do not use it or hear about. Why ? I do not know, maybe price ? marketing issues ?

Let’s take a look at Ranorex home site and check main features:

  • Excellent GUI Object Recognition
  • Object-Based Capture/Replay
  • GUI Object Repository Browser
  • Ranorex Studio – Test Development Environment
  • Smart Test Automation Code – code and gui components separation
  • Multiple technologies !

The last point is very interesting, simply Ranorex is not attached to the selected technology, we can test almost everything. Great ! but I will focus on Flex automation because it is common issue.  Complete source code and project files for this example can be downloaded from links section.

I will use my famous :), simple Flex testing application example with two main requirements to test:

  • when user clicks add button, text from textinput should become new list item
  • when user select item of the list and clicks delete item should be deleted

with two conditions:

  • item should be added only when textInput is not empty, if is empty message box with proper info should appear;
  • item on list should be selected before clicking delete button, if no selection is done messagebox should appear

Test It !
When I first run Ranorex tool I thought, for a moment that I mistakenly executed the Microsoft Visual Studio. I had thought that this is a VS plugin, but later I checked, that it is based on the SharpDevelop environment. I think that VS is the best IDE nowadays, Ranorex/SharpDevelop is very similar, big plus for this idea. Another surprise was when I saw the previously known and popular C# syntax. I felt little worried 🙂  but let us go further.

After creating new solution we must establish and configure Flex application, I assume that we have compiled swf file in webserver folder. There are, as always, two ways of preparing:

  • compile time library
  • loader, copy RanorexTestProject.swf from installation folder to web folder and address the application by RanorexLoader.swf?rxtarget=YourSWF.swf

I chose loader because it is simpler solution and you can test application without asking developers or external company to do some builds for you.


Creating a test script is extremely simple, we have the standard Record and Play options. However with recorded test script we get some interesting underlying architecture of the storage and subsequent processing of the tests.

  • program.cs – C# .net style – application starter
  • recordings – recorded user activity, script file + designer view
  • repository – repository of detected components and actions

I will not describe at the moment, what is the role of the individual components of the project, you may want to read the documentation that is complete and understandable. I have to admit that it is a very interesting concept. I felt that the tester can be appreciated almost as a programmer. Great 🙂

The only thing that gave me trouble was starting up the browser with the given url, how to do it from program.cs ? I have made a little investigation inside examples and found line below:

System.Diagnostics.Process.Start(“http://localhost/ranorex/RanorexTest/RanorexLoader.swf?rxtarget=RanorexTestProject.swf”);

Ask what about the pop-up windows, here this is not a problem, just click, and then eventually use repository object to play with. Can we abstract from the code using Ranorex and rely only on the record and playback? I do not know.

Plus

  • great documentation and user guide
  • visual studio style environment
  • c# language
  • vb.net , python syntax
  • includes image recognition
  • visual studio integration with plugin
  • build integration

Minus

  • little complicated for starters
  • should have separate solutions or templates for web/forms/flex projects

Summary
I have seen many tools for automated tests, Ranorex certainly stands out from this group. It is characterized by a slightly different approach, which brings it into Highend products areas. Price is not knocking, I would recommend this tool to check, can be a good shot in your testing requirements.
If you want me to check how Ranorex works with other technologies, write and I will try to meet your requests.

Links
Complete Review Example (ZIP)

Ranorex Homepage

Ranorex Blog
Ranorex Screencasts

Discussion

No comments for “Covers Everything? – Ranorex Automation Tool Review”

Post a comment