Author: Carl Nagle
UPDATED: Aug 03, 2012
Copyright (C) SAS Institute
General Public License: http://www.opensource.org/licenses/gpl-license.php
Remember: "RobotJ", "XDE Tester", and "Functional Tester" are names for the same IBM Rational Functional Tester tool. We historically referred to all of these as "RobotJ", or simply "RJ" in much of our documentation and class names.
The tool is now most often referred to as, Functional Tester or simply "RFT".
Configure for Execution , Use with TID , Configure for Development
These instructions assume the tester has already installed STAF and SAFS services via the SetupSAFS script (or alternative methods). If this is not the case, please refer to the SAFS for Windows Release Notes for information on the SAFS setup procedure.
Users are encouraged to install the *latest* SAFS Snapshot or Overlay available. Read and follow any additional instructions provided with the Snapshot or Overlay.
We will not attempt to duplicate information on setting up RFT for general testing. Information for creating a Project and other tool configuration information can be found in RFT's User's Guide and other references available from RFT's Help menu.
The RFT project in the SAFS 'DatastoreJ' subfolder is just a bare bones project that will NOT work for developing your own custom RFT-based scripts. It will work for pure SAFS/RFT testing with no custom scripts, however.
If you intend to have your own RFT scripts, or if you intend to use RFT Object Maps with your SAFS tests, then you must create a valid RFT Project then configure it as descibed below for your production testing.
With RFT V8 the project setup requirements are significantly simpler than previous versions of RFT.
If all you want to do is run the SAFS/RobotJ engine then preparing a RFT Project requires these steps which are discussed in more detail immediately following:
Note different versions of RFT behave very differently and have different project repository setup requirements. Unfortunately, it is not within the scope of this document to hit them all. We will focus on what works for RFT V8 below.
Assets provided by SAFS for an RFT project should be located in C:\SAFS\DatastoreJ or, in extreme circumstances, may need to be extracted from C:\SAFS\lib, SAFS.JAR, or SAFSRATIONAL_FT.JAR.
Note: TestScript.rftmap should be ensured to stay in <projectroot>\resources\ if SAFS-based scripts need to use RFT Object Map objects. Refer to Using RFT Object Maps with SAFS.
To execute your own SAFS tests, you run SAFSDRIVER with an argument, your SAFSDRIVER configuration file, in which various options are defined. Those information tells SAFS where and how to load the tests, launch SAFS/RobotJ engine and etc.
One of the options indicates the RFT datastore you created: [SAFS_ROBOTJ] DATASTORE=<projectroot>\DATASTOREJ (Here it is!)
C:\mySAFSTest\helloSafs.ini ------------------------------------------------------------------------------------------- [SAFS_DRIVER] DriverRoot="C:\safs" (SAFS's home) [SAFS_PROJECT] ProjectRoot="C:\mySAFSTest" (the root of your SAFS test project) [SAFS_TEST] TestName="helloSafs" (start from this SAFS script: helloSafs.CDD) TestLevel="Cycle" (Cycle file, suffixed with '.CDD') CycleSeparator="," (the delimiter to seperate different fields in a same line of SAFS script) CycleLogName="helloSafs" (the file name of the SAFS log produced by running this SAFS script, the log file shall be output to C:\mySAFSTest\Datapool\Logs) CycleLogMode="TEXTLOG" (the format of the SAFS log producted by running this SAFS script) [SAFS_ROBOTJ] AUTOLAUNCH=TRUE (autolaunch the hook of SAFS/RobotJ engine) DATASTORE=C:\mySAFSTest\DATASTOREJ (the RFT Datastore your test script intends to use) TESTDOMAINS="Java, Html" (domains to search) [SAFS_ENGINES] First=org.safs.tools.engines.SAFSROBOTJ (SAFS/RobotJ engine defined to be used) --------------------------------------------------------------------------------------------
java -Dsafs.project.config="C:\mySAFSTest\helloSafs.ini" org.safs.tools.drivers.SAFSDRIVER
Via above command, SAFS takes 'C:\mySAFSTest\DATASTOREJ' as the RFT datastore, and runs the SAFS tests in 'C:\mySAFSTest\Datapool\helloSafs.CDD'.
RFT may be configured to associate itself with Test Manager and a Test Manager repository. If you are not associating with a Test Manager repository and not using Test Manager logs then you may need to change Logging and Playback settings.
SAFS can now change these automatically, so you can skip these steps unless you have already encountered certain TSS Services ClassNotFoundExceptions.
OK TIDTest Services all present and working.
OK RFT ClearAppMapCache was successful.
Consult the documentation for the TID SAFSDRIVER for a more complete introduction to TID setup. You can also review sample TID configuration (.INI) and batch (.BAT) files in the C:\SAFS\Project directory.
The TID configuration file(s) would be a TIDTEST.INI and\or SAFSTID.INI file usually created and located in the root project directory as you can see in the C:\SAFS\Project samples. Below we show only those settings that may need editing relevant to the use of RFT. Other settings as required by the TID are not shown but are still necessary.
The documentation specific to the RFT interface to the TID can be found in org.safs.tools.engines.SAFSROBOTJ.
Sample TID INI settings:
[SAFS_ENGINES] First=org.safs.tools.engines.SAFSROBOTJ [SAFS_ROBOTJ] AUTOLAUNCH=TRUE DATASTORE=C:\SAFS\DatastoreJ (fullpath to the RFT Project root directory) TESTDOMAINS=Java,Html,Win,Net,Swt,Flex -- Enable your specific test domains only
There is also this SAFS Quick Start Guide for using RFT with SAFS.
Any RFT Project can be configured to run the engine, but each Project must be configured separately. To actually develop new code or keywords for RFT or other Java-based engines, or to debug RFT test execution the user would have to prepare the RFT Project for development. Note: The Eclipse and\or IBM Rational IDE for Java development does not use the System \ CLASSPATH to locate class files and other resources.
(You may have to 'Reset Java Build Path' in your RFT Project's Properties if RFT does NOT have its internal JARS listed in the Java Build Path.)
You can leave STAF and services running for additional
RFT TestScript executions, but you will eventually need to:
Existing build utilities like JARIT.BAT assume the project class files are stored in a \classes subdirectory off the project root directory. If you intend to use these build utilities then you will need to set your project Build Output accordingly:
If you are prompted to 'clean' and\or 'perform a new build' then you can do this.
Information for downloading from SourceForge CVS can be located via CVS info on SourceForge
More SAFSDEV-specific developer information:
Note: The RFT Engine has reserved the RFT script name "TestScript" for its internal use. This script is already compiled and stored in SAFSRATIONAL_FT.JAR and may have been copied into the RFT Project directory. The user should not attempt to create a new RFT script by this name as one may override the other.
Carl Nagle, SAS Project Manager, SAFSDEV Subscribe to appropriate Support Forums to review support archives and ask questons.