04-05-2012 02:33 AM - edited 04-05-2012 02:34 AM
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,
04-05-2012 11:02 PM
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.
04-05-2012 11:51 PM
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".
HPApplication Lifecycle Management Administrator Guide
HP ALM User Guide.
04-06-2012 12:59 AM
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.
12-23-2013 02:22 AM
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
objResults.TDTestSet = strTestLabPath & "\" & strTestSetFolName & "\" & strTestSetName ' Test set name
objResults.TDTestInstance = "1" 'Test Instance
objQTP.Open "[QualityCenter] " & strTestPlanPath & "\" & strTestToRun, True
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.
12-27-2013 02:51 AM
I found this is a known issue: http://support.openview.hp.com/selfsolve/document/
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"
QCUtil.CurrentRun.Field("RN_DRAFT") = "N"
Also add the following workflow in the ALM.
Hope this helps!
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”