Hi,
We are using testlink for our project.We wanted to integrate Testing tools like QTP and WinRunner to perform tests on the specified testplan .
testlink with Testing tools like QTP, WinRunner etc.
Re: testlink with Testing tools like QTP, WinRunner etc.
Hi, guys.Harsha wrote:Hi,
We are using testlink for our project.We wanted to integrate Testing tools like QTP and WinRunner to perform tests on the specified testplan .
Well, my solution in this case was not very smart, but quite easy to implement - it would be more elegant to do it via DB... But I am not that smart

Anyway - may be it will be helpful . Here is my workaround:
Everything is done with QTP itself. I will describe my approach with this fake-semi-code example:
Code: Select all
QTP_Action_Check_Something:
tcase=123 ' number of testcase in the TL, can be found in Print Test, or just in the browsers status bar when you mouseover the testcase name on the execution page.
problems = "" ' internal variable. Stores found problems' descriptions
do some_testing_steps
if error_found then
problems=problems + "Problem X appeared"
end if
save2temp (tcase, problems) ' saves testcase ID and a string value with found problems' description. Save it to some temp_file.
Code: Select all
QTP_Action_SaveToTL ' the last executed action in the script:
testcase_num= read (temp_file)
testcase_problems = read (temp_file)
' navigate to testlink execution page (you need to login to TL before - I skip it here.)
browser ("TestLink"). navigate "...testlink/lib/execute/execSetResults.php?build=BUILD_VERSION&id=testcase_num"
' If there were problems for this testcase - set Failed and add description.
if testcase_problems = "" then browser("TestLink").RadioButton ("Pass").click
else
browser("TestLink").RadioButton ("Failed").click
browser("TestLink").webedit ("description").set testcase_problems
end if
Hope this helps. If anybody needs more exact description, or actual code samples - feel free to ask.
Regards,
Vadim
Firstly I should thank you for the reply , though it is a long time since I posted this query.
Exactly my requirement is to :
1. I will create a test plan for my project and associate testcase,specifications etc to the same testplan . I developed a new GUI for integrating testlink with SCM like (cvs,svn) and able to check out code from it and build the project from the UI , and also we can deploy it on to the server.
But right now my requirement is to integrate it with QTP so that I can invoke the QTP testing from my testlink by giving the recorded file path or file as an input to QTP so that it will test the flow of the application depending on the input recorded file and set the errors to be associated with the testcases of the testplan and bugs need to be stored in to the bug tacking system .
Thanks In Advance,
Harsha
Exactly my requirement is to :
1. I will create a test plan for my project and associate testcase,specifications etc to the same testplan . I developed a new GUI for integrating testlink with SCM like (cvs,svn) and able to check out code from it and build the project from the UI , and also we can deploy it on to the server.
But right now my requirement is to integrate it with QTP so that I can invoke the QTP testing from my testlink by giving the recorded file path or file as an input to QTP so that it will test the flow of the application depending on the input recorded file and set the errors to be associated with the testcases of the testplan and bugs need to be stored in to the bug tacking system .
Thanks In Advance,
Harsha
How to launch QTP on a local box from IE:Harsha wrote:...
But right now my requirement is to integrate it with QTP so that I can invoke the QTP testing from my testlink by giving the recorded file path or file as an input to QTP so that it will test the flow of the application depending on the input recorded file ...
Add some web element to the TestLink's page that would call this (sample) JavaScript:
Code: Select all
<script language="JavaScript">
function run_qtp()
{
var pat, res_pat;
// you can obtain the path to your script from the TestLink's execution page, here it is hardcoded:
pat="C:\\Program Files\\Mercury Interactive\\QuickTest Professional\\Tests\\MyTest";
res_pat = "C:\\QTP_results\";
qtp_runner(pat, res_pat);
};
alert ("Completed!");
}
function qtp_runner(test_pat, res_pat)
{
var qtApp = new ActiveXObject("QuickTest.Application", 127.0.0.1); // Create the application object
qtApp.Launch(); // Start QuickTest
qtApp.Visible = true; // Make it visible
qtApp.Options.Run.CaptureForTestResults = "OnError";
qtApp.Options.Run.RunMode = "Fast";
qtApp.Open (test_pat, true);
var qtTest = qtApp.Test;
qtTest.Settings.Run.IterationMode = "rngIterations" ;
qtTest.Settings.Run.StartIteration = 1;
qtTest.Settings.Run.EndIteration = 2;
qtTest.Settings.Run.OnError = "NextStep" ;
var qtResultsOpt = new ActiveXObject("QuickTest.RunResultsOptions");
qtResultsOpt.ResultsLocation = res_pat;
qtTest.Run (qtResultsOpt);
qtTest.Close();
qtApp.Application.Quit();
}
</script>

You will need to wait for the promised update of TestLink or to create your own QTP framework for it like we did.Harsha wrote: and set the errors to be associated with the testcases of the testplan and bugs need to be stored in to the bug tacking system .
Hope it helps.
Regards,
Vadim