Re: Unable to Change Draft Run value as "N" while running from QTP (375 Views)
Reply
Occasional Contributor
Sivaraj-R
Posts: 7
Registered: ‎04-05-2012
Message 1 of 6 (785 Views)

Unable to Change Draft Run value as "N" while running from QTP

[ Edited ]

Hi,

I am having list of test cases in a test set. While running the test cases from QC ALM 11, the run instances has "Draft Run" value as "N" but While running the same test cases from QTP the "Draft Run" value is "Y".

Running Test Case from Draft Run  QC ALM 11 N QTP 11 Y OTA which uses QTP instance to run the test case Y

 

 

While trying to run the test cases using the following OTA API, I am getting the same result "Draft Run" as "Y".

 

If qtApp.TDConnection.IsConnected Then 
	qtApp.Open strTestCase, True 'Open the test in read-only mode
	Set qtTest = qtApp.Test
	Set qtResultsObj = CreateObject("QuickTest.RunResultsOptions") 'Create the Run Results Options object
	qtResultsObj.TDTestSet = strTestSet
	qtTest.Run qtResultsObj
	Result = qtApp.Test.LastRunResults.Status
	qtApp.TDConnection.Disconnect 'Disconnect from Quality Center
	qtApp.Quit
End If

 

Kindly let me know Is there any settings in QTP/QC has such that the "Draft Run" value should always be "N". or is there any piece of OTA API code to set "Draft Run" value as "N" while running from OTA API.

 

QTP Version : 11.0

QC ALM    : 11.0

 

Thanks in advance,

Siva.

Please use plain text.
Frequent Advisor
Sumit123
Posts: 34
Registered: ‎11-30-2011
Message 2 of 6 (770 Views)

Re: Unable to Change Draft Run value as "N" while running from QTP

Hello Shiva

 

I have not worked on QC 11, but can you please confirm if the draft run field is a system or user defined field in Project entities within Site Admin. If the draft run is a system defined field , then this can be updated through OTA API.

Please use plain text.
Occasional Contributor
Sivaraj-R
Posts: 7
Registered: ‎04-05-2012
Message 3 of 6 (768 Views)

Re: Unable to Change Draft Run value as "N" while running from QTP

Hi,

 

It should be System field. This feature is available in QC ALM 11 onwards. I am not able to find this in QC 10. please refer the following links to know about "Draft Run".

 

http://www.softwaretestinggenius.com/articalDetails.php?qry=1024

 HPApplication Lifecycle Management  Administrator Guide

HP ALM User Guide.

 

Thanks.

Please use plain text.
Frequent Advisor
Sumit123
Posts: 34
Registered: ‎11-30-2011
Message 4 of 6 (764 Views)

Re: Unable to Change Draft Run value as "N" while running from QTP

Correction in my previous statement. If the draft run is a system field, then this cannot be updated through OTA, else if it is a user defined filed then this can be updated through OTA. I am unable to find any admin guide for QC ALM 11 , hence cannot say if it is a system/user defined.

Please use plain text.
Member
D. Manoj Prabhakar
Posts: 2
Registered: ‎03-09-2011
Message 5 of 6 (375 Views)

Re: Unable to Change Draft Run value as "N" while running from QTP

Hi,

 

Recently we are also upgraded to QC 10 to 11 and we too facing the same issue. While the running the scripts from QC to QC the draft value is 'N' but running from QTP to QC the draft value setting as 'Y'.

 

Due to this the result is not posted in the Main window of the test set. It is showing Test Execution Status as 'No Run' and Launch Report button also disabled but the results are available in Test Instance Details - Runs History (Double click that 'No Run' Instance)

 

If we manually change the Draft value as 'N' the actual run execution status reflected in the main window.

 

I am using the following scripts to execute the QTP Test scripts and update the results in QC

 

Set objResults=CreateObject("QuickTest.RunResultsOptions") 'Set Result options


objResults.TDTestSet = strTestLabPath & "\" & strTestSetFolName & "\" & strTestSetName ' Test set name
objResults.TDTestInstance = "1" 'Test Instance
objQTP.Open "[QualityCenter] " & strTestPlanPath & "\" & strTestToRun, True
objQTP.Test.Run objResults

 

This was working fine with QTP 11 and QC 10 but not working with QTP 11 and QC 11.

 

Kindly let me know is there any way to update the 'Draft Run' value through vbs file.

 

Thanks

 

Please use plain text.
HP Expert
Ana_Noncheva
Posts: 245
Registered: ‎08-06-2013
Message 6 of 6 (360 Views)

Re: Unable to Change Draft Run value as "N" while running from QTP

Hello,

 

I found this is a known issue: http://support.openview.hp.com/selfsolve/document/FID/DOCUMENTUM_QCCR1J20198

 

Check following piece of code to add at the end of the QTP script:

If msgbox("Draft Run?", vbYesNo) = vbYes Then
QCUtil.CurrentRun.Field("RN_DRAFT") = "Y"
else
QCUtil.CurrentRun.Field("RN_DRAFT") = "N"
End If


Also add the following workflow in the ALM.

Run_Fields("RN_DRAFT").Value ="N"

In run_moveTo

Hope this helps!

 

Regards,

Ana

“HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation