Thorough testing is required for any software offering, and Rational testing tools help you create tests, automate the testing process, and report on the outcome of the tests. This article explains how you can supplement the Rational Performance Tester and Rational Functional Tester capabilities with the database and data-generating capabilities of Optim to help you simplify the testing process and expand the depth of the performed tests. It describes, step-by-step, how you can use IBM® Optim™ features to create expansive and customized test databases and then import the data into IBM® Rational® Functional Tester or IBM® Rational® Performance Tester testing tools to incorporate the data into tests.
This article is written in a modular format to accommodate readers who have varying degrees of experience with Optim, Rational Functional Tester, and Rational Performance Tester software. You can skip sections depending on your interests and needs.
We explain the steps that are required to customize and import data from an actual database into Rational Performance Tester and Rational Functional Tester setups:
- First, we cover creating an infrastructure or an object model that starts with a request, access definition, and column maps for data extraction.
- Then we explain generation of a Comma-Separated Values (CSV) file that starts with a request, table maps, and column maps.
- Next, we tell you how to import the CSV file into the Rational Functional Tester or Rational Performance Tester data pool creation wizard.
- In the last section, we describe how Optim can ensure the integrity of a database that you are testing with Rational Performance Tester.
Software used in these examples and preparation
- IBM Optim Version 6.5.1
- IBM® DB2® Version 9.5
- IBM Rational Performance Tester Version 8.0.0
- IBM Rational Functional Tester Version 8.0.0
Follow instructions in the Appendix to download, install, and configure the software if you don’t already have it installed. You need only one of the testing products, either Rational Performance Tester or Rational Functional Tester.
IBM Optim software provides an array of database management features (see the link in Resources to learn more). In this article, however, we focus on the test-data management features. These features accelerate application deployment by streamlining the way that you create and manage test environments.
Optim integrated data management also helps in producing a referentially intact subset of data and migration data to build realistic and right-sized test databases. It helps you eliminate the expense and effort of maintaining multiple production clone databases. You can also alter confidential information to protect privacy. If you need further assistance or information, the Optim user information is a set of PDF documents that are installed in Your_Optim_Installation_Directory\RT\DOC.
This is a tool used to identify the presence and cause of system performance bottlenecks. Rational Performance Tester provides automated testing capabilities for functional testing, regression testing, GUI testing, and data-driven testing. See Resources for where to learn more.
Rational Functional Tester is an automated functional testing and regression testing tool. It provides automated testing capabilities for functional testing, regression testing, GUI testing, and data-driven testing. (See Resources.)
Creating the access definition
The next step is to create an access definition, which is the template or roadmap for data extraction. The access definition specifies a set of related data and metadata for Optim to process. Use the access definition to define relations for Optim procedures, such as restoring, archiving, moving, and comparing databases. This object is referred to every time that Optim reads the database sources.
To create the access definition:
- Open Optim by selecting Start > IBM Optim > Optim.
- Select Definitions > Access Definition to open the Access Definition Editor shown in Figure 1.
- Click the Table tab to open the Table page.
- On the Table page, specify the default qualifier. This is the alias and the ID of the user who created the table. This example uses
ALIAS.BEN. - Select the starting table. We use Customers for this example.
- Right-click the second row, and then click Add Tables.
- Select the Details table by selecting Ref Tbl. Although we do not use this table, it will be useful for exploring Optim.
- Save the access definition. This example uses
ben.accdef.
Figure 1. Access Definition Editor

The column map replicates columns from the source table in the destination table. You will use it when you convert the extracted data in the database to the new masked data with the masking definition that is contained in this file.
To create a column map:
- Select Definitions > Column Map to open the column map editor.
- Click New to create a new column map.
- Browse the drop-down menus for the Database Table Name fields, and select ALIAS.BEN.CUSTOMERS for the source and destination files as Figure 2 shows.
Figure 2. New column map window

- Change the salesman ID to
RAND(0,999999)to replace the ID with a random number. - Save the column map. This example uses the name
BEN.COLMAP.
Figure 3. Column Map Editor view

Table maps map source tables to target tables. Optim can use these table maps to alter data in the column maps. These map files are referred to when masking the data and when converting the data to a CSV file.
To create a table map:
- Select Definitions > Table Map to start the Table Map Editor (Figure 4).
- Click New to create a new table map.
- Make sure that the access definition is accurate, and then proceed.
- To specify the destination tables, right-click the destination table, and then click Populate.
- Fill in the Qualifier box with a database alias.
- Add the column map that you created in the previous procedure.
- Save the table map.
Figure 4. Table map editor

In this step, you create an extraction request to define the extraction and then run the request. The extracted file is a binary-encoded file, which can and will be converted to a CSV file. If you want to repeat this step, be sure to save the extract request. Also, consider saving the extracted.xf file for data comparison in later steps.
- Select Actions > Extract to open the Extract Request Editor (Figure 5).
- Type a name for the extracted file.
- Select the access definition that you created previously.
- Save the extraction request.
- Click Run to extract the data.
- Verify that there are no errors in the report.
Figure 5. Extract request editor

Converting an .xf file to a CSV file
This procedure uses the column map to convert the extracted data into masked data. It then converts it into a CSV file, which can be imported into Rational testing software. This requested conversion process can be saved and reused. If you encounter a RUNSTATS error see DB2 Setup.
To convert an .xf file to a CSV file:
- Click Actions > Convert to open the Convert Request Editor (Figure 6).
- Select the table map that you created previously.
- Type the name of destination file. This is where the masked data will be stored until it is converted into a CSV file.
- Select the location for the control file.
- Run the conversion.
- Save the conversion request for future use.
Figure 6. The Convert Request Editor for the Customers table
- Click New to create a new conversion. The new conversion is the CSV file.
- Use the same control file as before, because it is overwritten over.
- Specify the source file for the .xf file that you just created by typing the source file name. This file will be the CSV file.
- Select the table map that you created previously.
- Click Create a Comma separated file to create a CSV file.
- Click the Comma Separated tab.
- Select Customers as the start table.
- Right-click the table name, and modify the column list so that it uses all of the columns.
- Run the conversion. Ignore the warning about the unused column map, because the column map was used in the first conversion.
Editing CVS files and creating data pools
Of course, you need to define how you are going to store your data.
Optim does not name the columns in the CSV file; therefore, you must give them names. Just add a row at the beginning of the CSV file to define the columns names. In the example in Figure 7, ID, Name, Address, City, State, and so on constitute the column names.
Figure 7. CSV file with column names
Creating data pools
To create a data pool, begin by importing a CSV file into a Rational testing product:
- Open Rational Performance Tester or Rational Functional Tester.
- Right-click in the Test Navigator, and click New > Datapool [sic].
- Name the data pool, and use the default dimensions (you will override these dimensions later).
- Select the CSV file, and select First Record is Variable Information, because you added those earlier.
- Click Finish, and open the editor to view your imported data.
Figure 8. Rational Performance Tester with an imported data pool
Using Optim to help maintain test database integrity
In addition to importing data into Rational Performance Tester, you can use Optim with Rational Performance Tester to test the integrity of the data that Rational Performance Tester saves on your server. If you saved the original data from the .xf file before you converted it to a CSV file, you can connect to the database of your test server and compare the server-based data to the original data, which is what should have been imported. This comparison helps you ensure that the data is being placed into your server database correctly.
The following procedure demonstrates this principal with the two .xf files used in earlier procedures: data.xf, which has the original salesman ID, and data2.xf, which has a random number rather than the salesman ID.
To compare database entries:
- Click Actions > Compare to open the Compare Request editor.
- Select the location for the comparison file to be saved.
- Click the Source tab.
- Specify the source files, Data.xf and Data2.xf.
- Run the comparison.
As Figure 9 shows, a report window shows the differences in the two files.
Figure 9. Detailed report of the differences between the files compared

This article outlined the procedure for using Optim to generate test data for Rational Performance Tester and Rational Functional Tester:
- You created a database alias to use to refer to your database.
- You created an access definition to define how to access the database for your purposes, and then created a column map and a table map to further define what you wanted to do with the data.
- After the definitions were completed, you extracted the data, converted the entries into a masked .xf file, and then converted the .xf file to a CSV file.
- You then edited the CSV file and imported it into Rational Performance Tester.
Note:
These could also have been easily imported into Rational Functional Tester.
With these steps, it is easy to see how you can easily and thoroughly create test data with Optim, Rational Performance Tester, and Rational Functional Tester. Most of the steps can be saved, so it is easy to repeat the process. Many of the files like the ones we used are already available if you are using Optim as your database management tool. Therefore, integration with Rational Performance Tester and Rational Functional Tester is fast and easy.
Appendix: Configuration and setup
Installation instructions follow for all of the various pieces of software used in this demonstration.
Rational Functional Tester and Rational Performance Tester
Use the IBM Installation Manager to install Rational Functional Tester or Rational Performance Tester. This wizard leads you through a simple process to download and install the necessary files. Prepare by downloading the software:
- Download the IBM Installation Manager.
- Download Rational Functional Tester or Rational Performance Tester.
- Start IBM Installation Manager and select Install.
- Select the product to be installed, and then click Next.
Figure 10. Selecting Rational Functional Tester for installation

- Verify the installation directory, and then click Next.
- If you would like to use an existing version of Eclipse, specify it here by checking
the Extend an existing Eclipse box and provide the path. Then click Next.
- Select the language for the installation, and then click Next.
- Select all of the features that you want to install with Rational Functional Tester or Rational Performance Tester.
- Select how you would like to access support, and then click Next.
- Review the summary of packages to be installed, and then click Next.
- The Installation Manager will now proceed to download and install the products.
Having the IBM® DB2® database on your computer is a prerequisite for Optim. You might need to set up a sample database manually if you did not specify one to be created during the wizard installation. We will use this database in the article.
You can create the sample database with the DB2 First Steps wizard:
Note:
if you already specified that you wanted to create a sample database during the DB2 installation, skip these steps.
- Go to http://www-01.ibm.com/software/data/db2/9/ and get a copy of IBM DB2 Version 9.5 Express-C.
- Extract the files and run setup.exe or the respective setup file.
- Review any prerequisite information and migration instructions that are included.
- Select Install a product and then click Install new.
- Follow the wizard instructions to completion to set up DB2 to your specifications.
You need to configure Optim before you use it. Follow these steps to set it up for the examples in this article:
- Select Options > Sign Optim Exit. Choose to sign the default option exit, and then click Next.
- Select Tasks > Configure the First Workstation, and then click Next.
Note that Optim can be set up in a server configuration, but for this example, we will install it on one workstation. - Type or paste in your license key. You can find the 30-day trial key in the readme.txt file.
- Create a New Optim Directory and Registry Entry (see Figure 11). You will use OPTIMDIR to work with the example in this article.
- Then click Proceed.
Figure 11. Creating the Optim directory

- Select the check box to keep the data in Unicode format, and then click Proceed.
- Type the database information. For the example in this article, use
DB2 v9.5. - Provide the information to connect to your database. In this article, connect to the DB2 sample database with the connection string
SAMPLE, as Figure 12 shows. - Provide the user ID and password. This authenticates with an account on the operating system.
- Then click Proceed.
Figure 12. Database connection information

- Leave the default settings to bind the plans, and then click Proceed.
- Click Proceed. Optim stores your database information.
- Skip the options for some of the additional functions until prompted about the user options file.
- Create the user options file with the default options and then continue to the end of the setup.
You need to create a database alias so that Optim can connect to your database. For this example, DB2 has been installed with the sample data. This is the data that you will extract.
To create a database alias:
- Start the Optim configuration tool by clicking Start > IBM Optim > Optim Configuration.
- Click Tasks > Create/Update DB Alias to open the database alias editor shown in Figure 13.
- Select to use the existing Optim Directory and Registry Entry,
OPTIMDIR. Then click Proceed. - Select the Create/Update DB Alias check box, and then click Proceed.
- Click Create New, and type
ALIASin the Name field. - Ensure that the DBMS specifications are automatically entered correctly.
- Connect to the database.
- Use the default values in the Bind/Drop Plans window.
Figure 13. Database alias and Blind/Drop Plans values
- Skip always requiring a password. Do not share the database information.
- Click Proceed to finalize the database connection.
- You do not need to create the primary keys, sample tables, and the privacy tables.
- Do not select the option to create another database alias.
- Click Proceed to finish.
The first time that you start Optim, you will need to specify settings folders. You can create these folders in the IBM Optim folder, where the other Optim files are located.
During the Optim demonstration, you might encounter a RUNSTATS error when converting the database to a CSV fie.
To avoid this error, open the DB2 command window, and manually enter the RUNSTATS command to correct the table that is prompting errors:
- Open the DB2 command window.
- Type
db2to open the interactive mode. - Type connect
to sampleto connect to the sample database. - Type
RUNSTATS ON TABLEtable_name to perform RUNSTATS manually on the table that is prompting the error, where table_name is the name of your table.
Users need to open the DB2 command window and manually perform the RUNSTATS command to correct table prompting errors.
Figure 14. RUNSTATS action in progress on corresponding tables
Learn
- Discover IBM Optim integrated data management, an integrated, modular environment to design, develop, deploy, operate, optimize and govern enterprise data.
- Explore the Rational Functional Tester Information Center, where you can also take a short video tour.
- Visit the Rational
Functional Tester area on developerWorks for introductory to in-depth information.
- Investigate Rational
Functional Tester Plus, which is a software application testing bundle.
- Explore the Rational Performance Tester page on IBM® developerWorks® for links to technical information for software developers and testers and to related IBM software.
- Explore the Browse the Rational Performance Tester Information Center.
- Learn about other applications in the IBM Rational Software Delivery Platform, including collaboration tools for parallel development and geographically dispersed teams, plus specialized software for architecture management, asset management, change and release management, integrated requirements management, process and portfolio management, and quality management.
-
Visit the Rational software area on developerWorks for technical resources and best practices for Rational Software Delivery Platform products.
- Learn about other applications in the IBM Rational Software Delivery Platform, including collaboration tools for parallel development and geographically dispersed teams, plus specialized software for architecture management, asset management, change and release management, integrated requirements management, process and portfolio management, and quality management.
- Learn more on the Rational Performance Tester product page.
- Visit the Rational software area on developerWorks for technical resources and best practices for Rational Software Delivery Platform products.
-
Explore Rational computer-based, Web-based, and instructor-led online courses. Hone your skills and learn more about Rational tools with these courses, which range from introductory to advanced. The courses on this catalog are available for purchase through computer-based training or Web-based training. Additionally, some "Getting Started" courses are available free of charge.
-
Subscribe to the Rational Edge newsletter for articles on the concepts behind effective software development.
-
Subscribe to the IBM developerWorks newsletter, a weekly update on the best of developerWorks tutorials, articles, downloads, community activities, webcasts and events.
-
Browse the technology bookstore for books on these and other technical topics.
Get products and technologies
- Download trial versions of IBM Rational software.
- Download these IBM product evaluation versions and get your hands on application development tools and middleware products from DB2®, Lotus®, Tivoli®, and WebSphere®.
Discuss
- Get involved in the developerWorks Functional and GUI Testing discussion forum where you can discuss and ask questions about Rational Functional Tester and general testing topics.
- Join the Performance Testing forum, where you can share you questions and knowledge about IBM performance testing products, including IBM Rational Performance Tester (now integrated with IBM Performance Optimization Toolkit). General performance testing, VU scripting, and load testing topics are also discussed in this forum.
- Check out
developerWorks blogs and get involved in the developerWorks community.







