Declare
Status
,
VBhnd
DeclareOnce
crun
=
0
,
ctest
=
0
,
pfState
=
"Passed"
if
GT_TotalFailCnt
>
0
Then
pfState
=
"Failed"
if
(
crun
>
0
)
&&
(
ctest
>
0
)
Then
ES_Create
VBhnd
,
0
ES_SetLanguage
VBhnd
,
`VBScript`
ES_AddCode VBhnd, 0
Function Answer (testsycl_id, rn_id, State)
Dim tdconnection
Set tdconnection = CreateObject("Tdapiole80.tdconnection")
tdconnection.InitConnectionEx "http://server:8080/qcbin/"
tdconnection.Login "****","****"
'msgbox tdconnection.LoggedIn
tdconnection.Connect "Quality_Center","Quality_Center"
Set com = tdconnection.Command
sqlstr = "Update run set RN_STATUS='" & State &"'" & " where rn_run_id = " & rn_id
'msgbox sqlstr
com.CommandText=sqlstr
com.execute
sqlstr = "Update testcycl set TC_STATUS='" & State &"'" & " where tc_testcycl_id = " & testsycl_id
com.CommandText=sqlstr
com.execute
Set com = nothing
If tdconnection.Connected Then
tdconnection.Disconnect
End If
Set tdconnection= nothing
End Function
ES_EndCode
ES_RunProcedure
Status
,
VBhnd
,
"Answer"
,
ctest
,
crun
,
pfState
ES_Delete
VBhnd
EndIf
; Let _RetStat = 0
; Let _RetVal = 0
End
;@DBG:NEST - 1 - @DBG:IsInJob; Exit Current Test