On Sep 18, 11:45 am, [EMAIL PROTECTED] (Siva Prasad) wrote:
> Hi Gurus,
>
> I have to develop a test harness that is used to do end-end testing of a
> application.
>
> The gui test harness is already in place. Which is developed in QTP TOOL?
>
> The back end automation should be developed perl and this should call the
> QTP scripts.
>
> Is there any way that I can call QTP from perl.
>
> Thanks,
>
> Perlpra

Check this module it will call QTP test from perl
Below is the part of code attached , details get from link
http://www.softwareinquisition.com/2006/08/integrating-qtp-with-non-mercury-products-some-code

# Tell the QTP object to launch the application according to the
scrubbed
    #  data from above
    $self->{qtp}->Open(
            $testDetails->{'Path'},
            $testDetails->{'RO'},
            $testDetails->{'Arg'} );
    $self->{qtp}->Launch;

    # Make the application visible or invisible
    $self->{qtp}->{Visible} = $self->{visible};

    # RunResultsOptions is a separate COM object.
    #  No later reference to it is needed, so we instantiate it here
and let it die.
    #  This object allows us to set the Test Results path to whatever
we need it to be
    my $qtResultsOpt = Win32::OLE->new( 'QuickTest.RunResultsOptions',
'Quit' );
    $qtResultsOpt->{ResultsLocation} = '<results path>'; # TODO

    # Execute the test
    $self->{qtp}->Test->Run($qtResultsOpt);

    # capture the test run results for later use
    $self->{last_status} = $self->{qtp}->Test->LastRunResults-
>{Status};

    return $self;


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to