我这里有一个非常简单的问题。我想在 Python 中实现以下 VB 脚本代码:-
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
特别是,我不能在 Python 中执行此操作 - mystep.Field("ST_ACTUAL") = aActual ; 因为我收到以下错误-“SyntaxError:无法分配给函数调用”有什么帮助吗?谢谢,阿米特
更新:请在此处找到 python 脚本... 从外部 Python 脚本将测试用例结果添加到 Quality Center Run