How to connect RFT script to iSeries DB2

Occasionally, we need to retrieve DB2 data from within our automated script. This is necessary for the parameterization of our automated tests and it will make them data independent. For example, sometimes you need to verify the existence of a created record in the DB and you want to verify that automatically in your scripts. To do that we need a third party to connect RFT to the system DB. This third party is the iSeries ODBC driver. Here are the steps for configuring the iSeries ODBC driver:

1.Install the iSeries Navigator with its DB components. Your Admin can do that.
2.In windows, go to Control Panel->Administrative Tools->Data Source (ODBC)


3.Click Add
4.Select iSeries Access ODBC Driver. Then click Finish.


5.In the General Tab, in Data Source Name field type an arbitrary DB Name of your choice


6.In the Server tab change the SQL Default Library to DB library name


7.In the Packages Tab change the Package Library to DB library name then press ok.


8.Now you’re ready to connect RFT scripts to
9.From within your RFT script, you need to establish a connection between RFT and system DB. The following example code will show you how to do that:

//establish a connection try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");} catch(ClassNotFoundException c){ logError(c.getLocalizedMessage());} //sample query try{ Connection db_connection = DriverManager.getConnection("jdbc:odbc:DB_NAME","username","password"); Statement stm2 = db_connection.createStatement(); stm2.executeQuery("select * from table1");} catch( SQLException x ){ logError(x.getLocalizedMessage().toString());}

10. It’s recommended that you parameterize the database name, username and password by prompting the user in the begging of the script. This will save you the headache of refactoring the script when those credentials change.

11. Sometimes your script needs to do insert statements. You need to make sure that the authenticated user is having the enough privilege. Otherwise your script will crash.

To run terminal application automated test scripts under RFT, we need a third party that will help RFT recognize objects of green screen UI. For this purpose we use Terminal Extension component.

Up till now, Terminal Extension works only with RFT 6.1 under windows xp. There is an updated version that works with higher version of RFT and under windows Vista or Windows 7. However, I don’t have them. So I am obliged to use the extension under windows XP and with RFT 6.1.

After your administrator installs the extension, you will see its icon in the Rational Tester Perspective; as the figure shows:

1. Click on the terminal icon as shown in the figure.


2. Fill in the required fields as follows:
Host: Server name, this is the current server name.
Terminal Type: TN5250

3. Save the connection as .conn file for later use.
4. Now click Connect! You’re now connected to the system from within RFT. Now you’re ready to record, edit and playback your automated scripts.

CVS Repository is a free solution that facilitates scripts editing and sharing within a team. The following are the steps to install and configure CVS with RFT:

1. Ask your system administrator to install CVS server component. This location will be used as your scripts repository.

2. Now open Rational Functional Tester

3. Go to RFT->Window->Open Perspective ->CVS Repository Exploring

4. Click on Add CVS Repository icon

5. The following windows displays

1. Fill in the required fields. Here’s an example:
HOST: server name
Repository Path: /fill in the path
User: domain\username
Password: *********

2. Click finish

3. Now the repository is created

4. Right click on the repository and select: Refresh Branches. This will connect you with the branches you check from the retrieved list.

5. To checkout a project to your workspace, right click on a folder, and then click Check Out. An instance of the project will be checked out to the workspace. Usually the workspace is located in the following path: C:\Documents and Settings\username\IBM

6. To connect to the check out project, change the perspective to Functional Test (Default)

7. Now go to File->Connect to a Functional Test Project

8. Select the checked out folder

9. Click ok

10. Now you’re connected to the project and you can edit it.

11. Once you’re done editing, you need to sync your changes to the repository. Change the perspective to Team Synchronization

12. Right click on the project Folder and click Synchronize

13. Your changes now are saved on the server.

14. If you want to work offline, you can check in a project. Then you need to change the folder name of the project in the workspace. And go to File->Connect to a Functional Test Project. And choose the copied folder, and work offline.

5 Reasons Why Software Certifications Suck

Software certification is a certificate that you receive as a result of passing an exam which is designed to measure how good you are in a certain programming or software or an IT skill ...etc.
10 years go, certifications maybe had some meaning, but now I truly believe that software certification is becoming a waste of time and effort. And these are my top 5 Reasons:

1.
Anybody Can Pass!

Software certifications are losing their credibility. The web is flooding with sample tests that are almost identical to the exam questions. And the monsters behind those tests (like Microsoft, IBM and Sun ... etc) are not doing their best to update those questions. Of course they have a very good reason for not doing so: the more people passing those exam, the more others would like to take them. So this is more money for them.


2.
Google Does Care Not!

Top companies in silicon valley do not give a damn about what certification you have when they consider you for an interview. I have been interviewed for a vacancy in Microsoft Ireland and what the interviewer cared about is my basic logical thinking and fundamental programming skills and the way i approach fairly complex problems. As for Google, they really really don't care about your certification.



3.
Injustice

Software certifications is a cause of professional injustice.
If you are a real geek and you got shortlisted with another wannabe who has like 10 certifications, he'll be hired!


4.
Software Certification is a Creativity Zapper.
When you fall into the trap of certifications, you will become obsessed in taking more and more certifications, thinking that this would make you a guru in your field. Where in reality, you are just becoming useless rusty piece of junk. And in a while you will be dwarfed by the skill of those who worked on solving the real problems.



5.
The Best are Not Certified.

By a simple look at top programmers and IT pros, the vast majority of them are not certified. They simply have no time for it. I wonder if Steve Gibson or Wozniak were ever certified


You still consider getting a certification?!

Solution for Dynamic Id Generation in GWT Applications

I have been using Selenium to create automated regression testing and compatibility testing on multiple browsers for a GWT application. In GWT, the object id in the page (the DOM) is dynamically generated each time the page renders. Although Selenium provides a powerful mechanism for testing GWT applications, the painful part is locating the objects in the page.

At first, the workaround for this was to use a locater other than the object id. Other locators include dom, xpath, link, and css.

Although this workaround made testing possible, recording and tweaking the recorded commands in the script became a lengthy process. After recording the script with the dynamic objects , you have to get the name xpath and css and define the object using a different combination of these three locators.

Fortunately , life was made easier when I discovered the following approach that allows you to set a static id for UI elements in the DOM:

DOM.setElementProperty(uiObject.getElement(),"id", "desiredId")

Using this, you do not have to rewrite the recorded code to include the locators. In addition to saving time, this method makes the recorded script both readable and maintainable.