There are a few things you need to do to prepare for this tutorial:
- Install Rational Functional Tester.
- Install the Java Runtime Environment.
- Install this tutorial's sample Host Simulator.
- Create a test project.
You may be able to skip some of these steps if you already have the software installed. But, we'll walk through each of them in the following panels.
If you haven't already, install Functional Tester now. A fully functional trial version of Rational Functional Tester is available from developerWorks.
The Rational Functional Tester package includes both the Rational Functional Tester product (including the Extension for Terminal-Based Applications) as well as Rational Manual Tester. For this tutorial, you will only really need to download the two parts for Rational Functional Tester, but you may want to also download and evaluate Rational Manual Tester to see how it can help you organize and improve your manual testing as well.
Use the launchpad executable to get started installing. If you have not already installed a Rational product on your machine, the launchpad will start by installing the IBM Installation Manager which will then guide you through the rest of the installation.
On the screen where you are asked which packages to install, select only Rational Functional Tester. Complete the installation of Rational Functional Tester, then repeat the installation process and select Rational Functional Tester Extension for Terminal-Based Applications. The installation must be done in two passes in order to ensure proper installation.
Note again that if you intend to use Visual Basic .NET as a scripting language, Visual Studio .NET must be installed on your system before you install Functional Tester.
In this tutorial, you'll use the Java scripting language variant of Rational Functional Tester, but the Terminal-Based Application Extension works equally well with Visual Basic .NET scripting and Java scripting. Some of the menu paths will differ slightly if you are working with Visual Studio. Interestingly, the scripts created by Rational Functional Tester will be nearly identical in both languages. The only real difference is that Java is a semicolon-based language, so every Java command will end with a semicolon, whereas Visual Basic .NET commands will not.
As you'll soon see, Functional Tester creates logs to inform you of what has transpired during test execution. By default, these logs are HTML documents. However, to provide additional information, Functional Tester will launch an application called the comparator that highlights any differences between expected and actual results. In order for Functional Tester to run the comparator, the Java Runtime Environment must be installed and configured.
Is the Java Runtime Environment already installed on my machine?
It's quite possible that you have a Java Runtime Environment (JRE) on your machine. If you do, you'll see a Java configuration icon in your control panel. Select Start > Settings > Control Panel. If you see a Java Plug-in option in the list of applications, then the JRE is installed on your machine. You do not need to install a second JRE.
Installing the Java Runtime Environment
The Java Runtime Environment is available from Sun to download. Select the appropriate link for your environment.
Writing an evaluation guide for a terminal-based application testing tool has one significant challenge: it is difficult to package up a sample application. To simplify the process while still providing the most value, we've made a Host Simulator available for this tutorial to download.
To install it, walk through the following steps:
- Extract the HostSim.zip file into any directory of your choosing.
- Double-click the HostSim.bat file. This will launch a Windows command prompt window which will in turn launch two small Java applications. Each application is simulating a mainframe application, one on port 23, the other on port 24. You can minimize these two windows during the rest of the tutorial.
- To stop the simulators, simply close their Java console windows.
This Host Simulator is pretty simplistic. It provides a 3270E data stream that will serve as your application under test. Keep in mind that this Host Simulator is not a real application. You will find that it will progress from screen to screen in response to your keystroke commands, but these screens are static: the simulator does not actually analyze your keyboard input. It will work fine for the path outlined in this tutorial, but you cannot really deviate from that path. Stick to the script here and you will do fine. Once you have completed this tutorial, you will be ready to experiment with your own real terminal-based application.
Remember, this Host Simulator is only necessary to simulate a mainframe. At the end of this tutorial, in Clean-up, are instructions on how to remove or disable it from your system. You will never need the Host Simulator to test a real terminal-based application.
A test project is the location where Functional Tester will keep all of your scripts, along with expected and actual results. The format of the project is dictated by the environment you are using -- either Eclipse for Java scripting or Visual Studio .NET for Visual Basic .NET scripting. Again, you will be using Java scripting in this tutorial, but you can certainly use the Extension with Functional Tester Visual Basic .NET scripting.
- Start Functional Tester if it is not already running.
- Close the Welcome view, if it opens.
- You are now in the main editing environment for Functional Tester.
- Select File > New > Functional Test Project to create a new project.
- Name the project
RFT Extension Tutorialand click Finish to create your project.
- If you are using the evaluation version of Functional Tester, a window will appear indicating the number of days remaining on your trial license. Click OK to acknowledge the message.