Below function shld serve ur purpose.
'********************************************************************************
'Function Name : TDStep
'Description : this function is used to generate step in TD results
'Input Parameters : Step name, Status, Description, Expected message, Actual
message
'Output Parameters: None
'********************************************************************************
Public Function TDStep(aStepname,aStatus,aDesc,aExpected,aActual)
'Display the message only when no unexpected error has occured
If Err.Number = 0 Then
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
Environment.Value("StepName") = Environment.Value("StepName") + 1
End If
End Function
On 11/15/08, Prattipati gangadhar <[EMAIL PROTECTED]> wrote:
>
> Hi ganesh, Thanks for your reply.
> Reporter.reportevent will not solve my problem.
> and about TDConnection-- can you please let me know which are the
> Objects that will handle the tests in the testSet and what are the methods.
> thank you.
>
> On Sat, Nov 15, 2008 at 11:23 AM, Ganesh muralidharan <[EMAIL PROTECTED]
> > wrote:
>
>> Reporter.ReportEvent can be used to pass "Passed"; or "Failed" messages to
>> QTP.
>>
>> If you are planning to create design steps as in normal manual test cases
>> then you should use Tdconnection and its associated objects.
>>
>>
>> On 11/13/08, Prattipati gangadhar <[EMAIL PROTECTED]> wrote:
>>
>>> Hi all, The issue here is :-
>>> I have the script for executing more than 300 TCs in the single script.
>>> I get the data ie inputs and outputs form database using webservices.
>>> I run QTP scripts in multiple PCs without using QC.
>>> We have QC also and these TCs are loaded in the QC from requirements to
>>> test sets, but they are manual.By manual I mean they only have step and
>>> test description.
>>> I have to pass these TCs in the QC(Test set) from QTP.
>>>
>>>
>>> Hope I am clear,
>>>
>>>
>>> Please help me in getting the solution.
>>> Clue could be there should be some Stored procedure in the SQL server ie
>>> the BackEnd of the QC.
>>>
>>>
>>>
>>>
>>> On Thu, Nov 13, 2008 at 2:52 PM, Sreedhar Mallipeddi <
>>> [EMAIL PROTECTED]> wrote:
>>>
>>>> Hi Pavan,
>>>>
>>>> one thing i can think is....u can do it from QC itself
>>>>
>>>> create a test set and assign the test scripts what u have mentioned and
>>>> other 2 in execution grid.
>>>> Then in execution flow apply conditions, if it is passed, then execute
>>>> this test script1 else if the test script is finished, then execute test
>>>> script 2
>>>> hope, this sloves ur problem.....
>>>>
>>>> Sreedhar
>>>>
>>>>
>>>>
>>>> On Wed, Nov 12, 2008 at 9:30 AM, Pavan Turlapati <
>>>> [EMAIL PROTECTED]> wrote:
>>>>
>>>>> Hi All,
>>>>> Need a small help from you folks.
>>>>> *Requirement:
>>>>>
>>>>> *1) Have to update the status of Test Case as Passed/Failed
>>>>> Automatically in QC depending on the result of the Test Script executed
>>>>> through QTP.
>>>>> Eg:
>>>>>
>>>>> If Browser("abc").Page("abc").Frame("abc").webedit("abc").exist(7)
>>>>> Then
>>>>> Reporter.reportevent micPass,"Text Box check","Text Box
>>>>> exists"
>>>>> * <---Here I need a script which will Pass a Test Case located
>>>>> in QC--->*
>>>>> Else
>>>>> Reporter.reportevent micfail,"Text Box check","Text Box does
>>>>> not exist"
>>>>> * <---Here I need a script which will Fail a Test Case located
>>>>> in QC--->*
>>>>> End If
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Mallipeddi Sreedhar
>>>> 91-9848871279
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Regards,
>>> Gangadhar Prattipati
>>> +91 988 5464 104
>>>
>>>
>
>
> --
> --
> Regards,
> Gangadhar Prattipati
> +91 988 5464 104
>
> >
>
--
Ganesh Muralidharan
Wipro Technologies
Mob. : 9341023574
'God Never Forgets'
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---