How to update execution result in QC-test lab using OTA

4,599 views
Skip to first unread message

JOHN MATHEW

unread,
Dec 14, 2010, 7:08:58 AM12/14/10
to mercuryqtp
I have my test result updated in an excel sheet. I want to update QC test lab execution status based on excel sheet pass/fail result.

Help me to resolve this issue.

With Best Regards
John Mathew
Mobile : + 91 9447915392

Ganesh muralidharan

unread,
Dec 14, 2010, 7:21:57 AM12/14/10
to mercu...@googlegroups.com
I think Reporter.ReportEvent can be used to send Failed or Passed
status to a QC Test run. If you want to pass detailed design steps
from QTP to QC, it can be done via OTA QCUtil. Please refer to the OTA
reference material.

> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to Mercu...@googlegroups.com
> To unsubscribe from this group, send email to
> MercuryQTP+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en

--
Regards,


Ganesh Muralidharan
'God Never Forgets'

JOHN MATHEW

unread,
Dec 14, 2010, 7:55:59 AM12/14/10
to mercu...@googlegroups.com
We tried the below code. we are able to get the test case design step values, but we are not able to do the updation to the status columns.

Could you please provide some suggestions..


TestId="131447"
   Set qtpapp = CreateObject("QuickTest.Application")
   Set tdconnection = CreateObject("TDApiOle80.TDConnection.1")
   Set testSetFolderF = qtpapp.tdconnection.TDOTA.TestSetTreeManager
   Set tstSetFolder = testSetFolderF.NodeByPath("Root\Trash")
   Set TestSetsList = tstSetFolder.TestSetFactory.NewList("")


For each Testset in TestSetsList   
       Set TestCollection = Testset.TSTestFactory.NewList("")      
       For each Test in TestCollection
       TestId = Test.TestID
       Set myTest = QCUtil.QCConnection.TestFactory.NewList("SELECT * FROM TEST WHERE TS_TEST_ID ="&TestId)
       Set StepsCollection = myTest(1).DesignStepFactory.NewList("")
       Print StepsCollection.Count
     'Print StepsCollection.Value
       For Each test2 In StepsCollection
           MsgBox test2.Field("DS_STEP_NAME")   

                      MsgBox test2.Field("DS_DESCRIPTION")  
                                          MsgBox test2.Field("DS_EXPECTED")
                  Next
        Next
Next

       Set StepsCollection = Nothing
       Set myTest = Nothing
       Set TestCollection = Nothing
       Set TestSetCollection = Nothing


With Best Regards
John Mathew
Mobile : + 91 9447915392


Ganesh muralidharan

unread,
Dec 14, 2010, 8:19:45 AM12/14/10
to mercu...@googlegroups.com
dim objSfact
dim objOrun
dim mystep

Set objOrun = QCutil.CurrentRun

Set objSfact = objOrun.StepFactory
Set att = objSfact.AddItem(null)
att.name = aStepname
att.post

Set steplist = objSfact.NewList("SELECT * FROM Step WHERE
ST_STEP_NAME='" & aStepname & "'")
For each mystep in steplist
mystep.Status = aStatus
myStep.Field("ST_DESCRIPTION") = aDesc
myStep.Field("ST_EXPECTED") = aExpected
mystep.Field("ST_ACTUAL") = aActual

If mystep.Status = "Failed" then
objOrun.Status = "Failed"
end if

mystep.Post
Next

Set objSfact = Nothing
Set objOrun = Nothing

JOHN MATHEW

unread,
Dec 15, 2010, 8:05:13 AM12/15/10
to mercu...@googlegroups.com
Thanks Ganesh.. This code is working for us..


With Best Regards
John Mathew
Mobile : + 91 9447915392


NEERJA nawani

unread,
May 18, 2012, 11:58:23 AM5/18/12
to mercu...@googlegroups.com
Hi, 
   I want to execute all test cases available in specified testset in test lab. Using currentrun object I can update only current running test. Is there any method which I can use to execute all test cases? Please help me.

Thanks,
Neerja
---
Thanks and Regards
Neerja Nawani

Ganesh muralidharan

unread,
May 18, 2012, 12:10:38 PM5/18/12
to mercu...@googlegroups.com

NEERJA nawani

unread,
May 18, 2012, 12:24:09 PM5/18/12
to mercu...@googlegroups.com
Hi,
  Thanks for the reply, but first I want to read the steps, description after that want to update the status.
Can i do it with runfactory?
Regards,
Neerja

Ganesh muralidharan

unread,
May 18, 2012, 12:27:03 PM5/18/12
to mercu...@googlegroups.com
You can try that.

NEERJA nawani

unread,
May 18, 2012, 12:38:32 PM5/18/12
to mercu...@googlegroups.com
Yes I am trying, can you pls tell me how to read steps?

Chandan Kumar

unread,
Apr 25, 2014, 5:17:04 PM4/25/14
to mercu...@googlegroups.com, mercuryqtp
Hi,

I am also facing the same issue. Kindly do mail me or call me if the issue you got resolved.

Mob: 9971971122

Thanks,
Chandan

gokul krishna

unread,
Apr 29, 2014, 12:39:15 PM4/29/14
to mercu...@googlegroups.com
neeraj 

why do you want to read the steps of the test before exeuction ?

Regards,
Gokul.


--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mercuryqtp+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Gokul Krishna.
Reply all
Reply to author
Forward
0 new messages