IBM Functional Tester
Lecturer

Dan Yahav
Yael Grumbach
Eitan Kovacs

Presentation

IBM Functional Tester

Abstract

These days, due to the fact that software application development becomes more complex, we need to invest more time in software testing.
The problem - Manual testing is time consuming and efforts are needed from testers. a proposed solution is to use automated testing instead of manual testing using automated software tools.

Test automation saves a lot of effort needed for rigorous testing of the system. It also ensures uniformity in the testing process each time the test is executed. Using automation, tests can be run faster, in a consistent manner, and over and over again with fewer overheads. Automation is used to replace or supplement manual testing with a suite of test programs. Manual testing never goes away, but these efforts could now be focused on more rigorous tests.

There are two general testing types:
  • Black box testing - the testing is performing against the specification, indicating what part of the specification has not been fulfilled.
  • White box testing - the testing is performing against the implementation.

First of all we have to understand the advantages and disadvantages of each type of testing.

White box testing
Advantages:
  • Wise input can help in testing the application effectively.
  • Helps in optimizing the code.
  • Helps in removing the extra lines of code.
Disadvantages:
  • Requires a skilled tester.
  • Cannot look into every bit of code to find out hidden errors.


Black box testing
Advantages:
  • The tester does not need knowledge of any specific programming languages.
  • Test cases can be designed as soon as the specifications are complete.
  • The test is unbiased because the designer and the tester are independent of each other.
Disadvantages:
  • The test can be redundant if the software designer has already run a test case.
  • Testing every possible input stream is unrealistic because it would take an inordinate amount of time.
  • Difficult to design without clear specifications.

Our presentation was focused on black-box testing which also known as functional testing.
In the presentation we introduced very common software in the industry for automated testing called IBM Rational Functional Tester.

Here are the features of IBM Rational Tester:
  • Support for testing of Java, Web, Visual Studio .NET WinForm-based applications and Siebel.
  • Choice of language - Java or Visual Basic .NET - for test script customization.
  • Native Java and Visual Basic .NET editor and debugger for advanced testers.
  • ScriptAssure technology to accommodate frequent UI modifications.
  • Automated data-driven testing eliminates need for manual coding.
  • Multiple verification points with regular expression pattern matching support.
  • Advanced object map maintenance capabilities.
  • Ships with IBM Rational ClearCase LT for automated version control.
  • Support for recording user interactions with Java, Web, and Visual Studio .NET WinForm-based applications.

After we listed the features of IBM Rational Functional Tetster, here is a comparison among the three leading software vendors for automated testing.
  • Compuware TestPartner - appropriate for teams with both non-technical and semi-technical users and a relatively diverse portfolio of apps to test.
  • IBM Rational Functional Tester - is the right choice for users who have strong programming skills and for users who work closely with development teams.
  • Mercury QuickTest Professional - best for centralized testing teams that work on a wide range of apps and include team members with varying levels of programming skill.
References

IBM Rational Tester
QA Center
Mercury QuickTest
Compuware TestPartner

Demo
Overview

The demo given here is to show you how to begin writing java tests using IBM Functional Tester.

There are 2 demo programs :

  • Calculator demo project - for showing how to write a java test script for testing GUI applications written in Swing.
    This test script will test a calculator. which will test the initial GUI and its layout using a verification point.
    Then we will continue and test all the numbers buttons by pressing them and comparing the value in the calculator screen to the number pressed.
    The next thing that we will check in the calculator is the addition function using random input and comparing the result with the value in the calculator screen.
    Note: that all tests and tests results will be written to the log.


  • WebApp demo project - will show you how to test a web site and what is a data pool and how to use it.
    We will test a registration page in our web site. our test script will register many users automatically.
    For registering the users we will use a data pool which allows us to separate the java code from the user data (the users details).
    All users, inserted to the site, will be written to the log as information messages.

All these tests are all done automatically by our java test scripts and can be re-run for regression tests without user intervention.


Files

  • Download the Demo - The zip file contains the entire workspace for IBM Functional Tester.
    There are 2 demo projects -
    1) Calculator - a project for testing a calculator.
    2) WebApp - a project for testing a web site.


Installation Instructions

We assume that the demo will run on a Windows XP machine.
You will need to run a Calculator program for the calculator test.
You will need to run a web site for the webApp test.
For running our site you need to install a web-server and a database.

  • Installing Java SDK -

    • Install a java 1.4.2_10 SDK you can download it from here.
  • Installing IBM Functional Tester -

    • Install IBM functional tester you can download it from here. you will need to register IBM site for downloading IBM functional tester it's free.

    • Launch the setup file and proceed the installation according to the instructions and the screenshots below:

1) Choose the first option to install IBM Functional Tester , if you want to install the feature of VB .Net scripting you will need to install Microsoft .Net framework before step 1.

2) Press next.

3) Choose the installation directory.

4) choose what components you will install. you can choose Java / .Net scripting.

5) Press next.

6) Installing . . .

  • Installing PostgreSQL database -

    • Download postgreSQL from here.
    • Launch the setup file and proceed the installation according to the screenshots below:

1) Select the language English.

2) Press next.

3) Press next.

4) Press next with the default options selected .

5) Enter in the account password - matrix (the password is matrix).

6) In the password type - matrix (the password is matrix).

7) From now on you need to press next and leave the default values until the end of the installation.

  • Installing tomcat web server 5.5.15 -

    • Download tomcat core package from here.
    • Download tomcat compatibility package for java 1.4.2 from here.
    • Extract the main file apache-tomcat-5.5.15.zip
    • Extract the tomcat-compat to the same directory above and overwrite files as needed.
    • Edit the file server.xml in the directory conf under tomcat main directory and change the port from 8080 to 8084 (just search in the file 8080 and change it to 8084) Or download the server.xml file and replace it.
    • Copy the WebApplication.war file to the webapps directory under tomcat main directory.
    • Create an environment variable JAVA_HOME which points to your java directory (java sdk) on windows
    • Start the web server by executing startup.bat in the bin directory under tomcat main directory.
    • Enter the web site URL in internet explorer: http://localhost:8084/WebApplication now the web site has started.
  • Starting the Calculator application -

    • Download the calculator application from here.
    • Extract the zip file and start it by executing run.bat.

Now you can run IBM Functional Tester and choose the project you wish to run, calculator or webapp and run it.


Features & Comments

In our demo programs there are several important features :

  • A verification point - this is a point in our test script that we check our tested application for a certain GUI state. we do this by choosing the Swing objects we want to test and highlight the swing properties to check. of course we can check several things to test the data Or Swing properties.

  • Test objects - these are the objects in our application that we want to perform actions on them. we insert these objects under test objects in out test script and can use them in our code by writing their name and access all their methods.

  • Datapool - this is a way we can separate our java code and the data we want to use in our tested application. we can create a new datapool in our test script or import an external csv file. then we can access this data in our test script using special datapool  methods.

  • Test script log - this is a very important feature when we test our application. all things are done automatically and the only way to see all tests and test results is through the log. we can write log messages in our test script code.

Extending our demo

This demo can be extended easily and will help you learn the features presented here. the calculator demo can be extended to test more function such as multiply divide etc. this can be done in the same manner as the addition test.

The web site demo can be extended to test the other pages in the web site. for example, after registering the users, one can test the login page with the registered users.

Additional information

If you are interested in learning more features and advanced features you are welcome to read the help in IBM Functional Tester. there are code snippets and examples and there are fairly easy to understand.


we welcome you to the interesting world of a java QA developer :-)