Wednesday, May 19, 2010

Prerequisite - To Enable Communications Between QuickTest Professional and Delphi Application

Hello Friends,

To test any Delphi application using QTP, there is prerequisite that we have re-compile our application with MicDelphiAgent.pas. This process enable the communication between our Application & QTP.

Detail steps are as follow:

We must use the MicDelphiAgent.pas module to enable communications between QuickTest Professional and each Delphi project we want to test. If  application includes the TwwDBGrid from InfoPower, we must also configure support for the grid. Linking to the MicDelphiAgent.pas Module to Enable Communications. We must perform the following steps for each application that we want to
test.

To link to the MicDelphiAgent.pas module:

1.       Add the \dat\Extensibility\Delphi folder to your Delphi project search path or copy the contents of the \dat\Extensibility\Delphi folder to our project folder.
2.       Add MicDelphiAgent to the Uses section of your application’s project file (project.dpr) as shown in the example below:

program flight;
uses
MicDelphiAgent,
Forms,
Windows;
($R*.RES)
begin
Application.Initialize
Application.Title :='Flight Reservation';
Application.Run;
end.

3.       Compile your Delphi project.

Note: If your application includes the TwwDBGrid from InfoPower, you must add support for this grid as described below.

Configuring Support for TwwDBGrid

If your application includes the TwwDBGrid from InfoPower, follow the following instructions to enable support for this grid.

1.       Add MicWWSupport to the Uses section of your application’s project file (project.dpr) after MicDelphiAgent, as shown in the example below:

program flight;
uses
MicDelphiAgent,
MicWWSupport,
Forms,
Windows;
($R*.RES)
begin
Application.Initialize
Application.Title :='Flight Reservation';
Application.Run;
end.

2.       Recompile your application.

You are now ready to create and run tests on Delphi applications.

Links to refer:


5 comments:

  1. Is there any way to test Delphi applications with out re-compiling them using the MicDelphiAgent.pas ?

    The vendor application we want to test is in Delphi and we cannot request them to change their code.

    ReplyDelete
  2. Nope as per my knowledge we have to recompile the code with agent code.. so that QTP can identify delphi object.

    Thanks,
    Deepak

    ReplyDelete
  3. Hi Deepak,
    Thankz for the post,i'm wondering still do we need to follow this same process for delphi projects? (recompile the code with agent code??),

    Regards - Murali

    ReplyDelete
  4. Hi Murali,

    I have done it for my project for delphi 5 version(As I remember) and while for delphi 7 we don;t have any option to work with QTP 10.0.

    As delphi is too old technology and not too much currently used in market hence QTP have not provide any better solution like add ins as like for .net, java,etc technology. so I don;t think HP will come with easy n best solution in future too.

    But yes I need to verify this future for QTP 11.0.

    Thanks,
    Deepak

    ReplyDelete
  5. Excellent Post!!! Your interview questions on QTP automation tool will assist freshers and experienced professionals to sharpen their skills and be successful in job interview. QTP training institute in Chennai

    ReplyDelete

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | JCpenney Printable Coupons