Test Automation using RFT

Still I’m in ma early  days of ma work at virtusa, I’m working on a IBM Project and to start with I have been asked to write test scripts to automate IBM Information Server using RFT (Rational Functional Tester). Which really is an intersting frame work. As usual I have been playing around with it for almost two or three days just to get the grip over it. And now I think I’m in the driving seat.

The frame work can be used to test any web page or any software’s GUI(Graphical User Interface). I really don’t know the possibility of checking CLI’s with it. So it’s upto you to check on and if inform me if there’s a possibility to do that as well.

At the heart of RFT is three main components namely appobjects, tasks and test cases. Where as tasks can be further sub devided into two important catagories UIChecker and UIOperations.

As a starting point I thought of using ony appobjects and do a simple automation that will open up your browser, go to google and perform a search operation on it to automatically fetch you the results.

If you are too interested buddy in this like me, first thing would be to download IBM RFT of which you should be able download a trial copy free of charge, cool..! and then launch your RFT which will look quite the same as an eclipse IDE if you have worked on it. Now all wot you need to do now is to start your new Project and write click on your root folder and select Add Empty Script. which will give you the file you gonna work with. below I will share my first code that does what I have mentioned above.

But before you do that you have to capture the search button object on the google website. Which you can do by double clicking on Private Test Object Map on the right side panel of your RFT workspace. And select Insert Object in the resulting window. You just need to drag the hand marked button and point the button on the google site at this point please note that same applies to the text input field as well. Then you right click on the object and select add to TestScript.YourProject. That’s it now back to businees end of life..

package appobjects;

import resources.appobjects.GoogleProjectHelper;

import com.rational.test.ft.*;
import com.rational.test.ft.object.interfaces.*;
import com.rational.test.ft.object.interfaces.SAP.*;
import com.rational.test.ft.object.interfaces.siebel.*;
import com.rational.test.ft.script.*;
import com.rational.test.ft.value.*;
import com.rational.test.ft.vp.*;

 * Description   : Functional Test Script
 * @author HHameem
public class GoogleProject extends GoogleProjectHelper
  * Script Name   : <b>GoogleProject</b>
  * Generated     : <b>Jul 11, 2008 6:03:08 PM</b>
  * Description   : Functional Test Script
  * Original Host : WinNT Version 5.1  Build 2600 (S)
  * @since  2008/07/11
  * @author HHameem
 public void testMain(Object[] args)
  text_q().setText(“Lonely Coder”);

Now you will be getting the same results page exactly as the one you get when you search “Lonely Coder” on google(Which is obviously my favourite search criteria on Google) manually. Hope you will find it interesting.

15 thoughts on “Test Automation using RFT

  1. kaladher says:


    can we directly do plugin RFT to Eclipse?
    Can we write the script directly without capturing the objects?
    if yes please let me know how? or how to write objects manually..


  2. Pratik Dam says:

    Since you mentioned about CLI , I thought that I would share this with you ….

    If you want to use a Telnet or SSH you can

    try out one of these Freely available 3party libraries having Expect like behavour . Here is JEXPECT

    Below is a sample snippet . .

    JExpect exp = new JExpect(“expectJ.log”, 20);
    String command = “telnet myhost”;
    SpawnedProcess sp = exp.spawn(command);
    System.out.println(“Expect Status ” + sp.isLastExpectTimeOut());
    if (sp.isLastExpectTimeOut()) {
    System.err.println(“Did not match”);
    sp.send(“rm /tmp/my.log\n”);
    System.out.println(“Started Interacting”);

    Another option would be to use another prog language libraries like Python
    /TCL/Perl . Python is my language of choice and there is something called Jython which lets you use Java code from Python and Vice-Versa .

  3. Abhishek says:

    Hi i am not able to inport sap and seibel on writing the below import
    import com.rational.test.ft.object.interfaces.SAP.*;
    import com.rational.test.ft.object.interfaces.siebel.*;
    i get error as sap and seibel interfaces cannot be resolved…
    does some1 has a solution…

  4. vikrant says:

    Hi ,

    I am new to RFT.I have got a script which is using following import statement
    import ibm.tools.ClassGenerator.

    Query:I do not have this ibm.tools.ClassGenerator !
    Can you please tell me from where can I get this

  5. sharad says:

    hi can any one let me know how i can configure the oracle application in RFT.

    from some post i just got below comments, it would be great if any one can give more details on the same.

    “Yes you can test Oracle Forms using RFT. for this you might need some proxy. Search for AppPoint proxy for RFT to test Oracle Application.”

  6. niranjan says:

    Thanks alot !!!
    I googled alot to find out the best way to automate telnet ..
    This seems to best way on systems which do not have EXPECT/PERL/PYTHON…

  7. Edwin Jacob Baby says:

    In Mainframe is it possible to copy the result of one screen and use as input to next screen. in the same script.. ?

  8. Teja says:

    Hi.. I need help regarding using datapool in the automated test in RFT.after the data pool is created.. how to traverse it?? where should the code for traversing be written?? in Tasks or test cases??

  9. Anna says:

    hi, do you know if it is possible to automate the android emulator with RFT, i tried to map the objects but only ctches the whole window, and i thought i could import the androis plugin to RFT, but i got an error msg…. does anybody knows something about this problem?? i will appreciate your help.

Comments are closed.