RIATest 3 – Professional Flex Test Automation

I remember RIATest tool when it was young, starting solution with many bugs, configuration issues etc. but very promising at all. There were milestone v1 and v2 and at the end, the version number three which appears to be a worthy tool for enterprise-class. I will try to check it, write simple flex application and write test cases to verify GUI features. Let’s start…

Simple downloadable installation, easy install – several clicks.

Test it
If we install paid tool we should expect that quickly and efficiently, within a few minutes, we begin to fully benefit from the purchased functionality. I will try to see if you can quickly begin to recover the money spent in terms of saved time. Now we create simple gui flex application.

  • Open FlexBuilder, create new Flex Web Project, configure path, servers etc.
  • Copy RIATestLoader to root folder of our application, three files in RiaTest installation path\loader\sdk*.* – use proper sdk version !
  • Use designer, add simple controls, to get typical workflow: text field, add button, delete button and list of items. Assign id’s – it is important step !
  • Add some code, functions: add, delete – see attached project.

We now ready to test our application. There are 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

Run RiaTest3, add new project, save it to our flex project folder. Click configure and set:

  • loading type : In browser, using remote loader
  • application swf file url: use path from flex project
  • remote loader url:  root folder + loader html path

Click “Launch application under test” in main toolbar, default internet browser should appear and application should be loaded inside RIALoader. Now we can see RiaTestLoader buttons at right, bottom corner: Record, Inspect and Verify.
Click “Record” and normal use application: add three items to list, then delete first and last one. Click Record again to switch off the process. Great, now have ready to use test script in our RiaTest3 application. Please save the script and add it to test run by clicking right mouse button on project, choose add existing script, select file and ok.

Beautiful: three minutes of work and our first test case is ready to use. Click Play in main toolbar and see how automation do the job for you.

As we can see RiaTest have some kind of semi object oriented script language:

  • FlexButton(“Add”)=>click();
  • FlexTextArea(“newItemText”)=>keyPress(KEY_BACKSPACE);
  • FlexTextArea(“newItemText”)=>textSelectionChange(0,6);

rather simple and easy to understand.

At this point it is worth recalling automationName and other problems locating components with Flex Automation.
Fortunately, with the assistance comes to our special class Locator:

“new Locator({automationClassName:”FlexButton”, automationName: “OK”})”

This was the record and playback method, but how to add manually some test script lines ? Let’s add some missing functionality:

  • 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

Everyone who struggled handling dialog, message boxes, alerts when test automation is now smiling 🙂 How to do it? – unexpected but again very simple, add this code:

var alert1 = FlexAlert(“index:6”);
verifyEqual(isPresent(alert1), true);

Use object inspector to obtain alert id (index), great, so simple and easy. Complete solution are in attached zip file.

RIATest 3 is a great, enterprise ready test tool. Very easy to start without complicated configuration, installation and settings – it is very important. There is a ANT build integration so you can run complete continuous integration build. You can buy it from 499$, not cheap but if you calculate time spent on testing and configuring other free test solution with many problems, it is worth the money.
If you tested RIATest in more complicated environment and application please do a comment, share your expertise with others.
There are not roadmap for next releases, feel free to ask for new features – product is based on your feedback !

Example RIATestProject.zip – source code included.
What is new – http://www.riatest.com/products/whatsnew.html
RIATest Documentation – http://www.riatest.com/onlinedocs/v3/Contents.html
RIATest Forum – http://www.riatest.com/forums.html


4 comments for “RIATest 3 – Professional Flex Test Automation”

  1. Thanks. This is what I was looking for

    Posted by SMiGL | December 22, 2009, 8:27 pm
  2. […] RIATest3 […]

    Posted by Behavior Driven Development in Flex – Were we are? | Test And Try | January 11, 2010, 2:00 pm
  3. […] RIATest 3 – Professional Flex Test Automation | Test And Try […]

    Posted by Get Paid To Test Games | Games Testing Ground | January 17, 2010, 6:21 am
  4. We had a short window in which to find an automation tool that would help us automate our Flex/AIR client application. Thinking that QTP was the best on the market I first pursued that tool but we were unable to get it working. At the same time my team was evaluating QTP I found RIATest; I downloaded it and had my dev compile the RIATest liabraries into the app and the tool worked great. We since dropped looking at QTP and we’re now a couple of month’s into the development cycle and RIATest is working better than expected. One of my testers has a coding background and with the ease of use of the RIATest language was able to excell really fast in coding of the application. Right now the only thing holding us back is the development of the applicatoin.

    Bottom line: If you are working with a Flex/AIR application don’t even bother looking at other tools – the cost of the tool is nominal compared to the other tools and the language is easy to pick up. My team has completed a range of boundary and acceptance testing using the tool and we’ve only scratched the service of what we plan to accomplish.

    As side note: We also looked at Flex Monkey but it required an experienced ‘Action Script’ developer to code it.

    Posted by Michael Johnson | February 8, 2010, 6:15 am

Post a comment