【发布时间】:2012-08-17 07:13:28
【问题描述】:
Quality Center 中的一个简单需求。
背景:
在 HP 质量中心 -> 测试实验室中,您可以创建一个包含许多测试用例的测试集。您可以通过单击 Run(启动 Test Run Scheduler)来运行测试集或单个测试用例。考虑到测试用例存在一个测试脚本(考虑到 Python),当单击运行时,会看到一个自动运行器弹出窗口,其中包含三列:
测试名称、在主机上运行、状态
我知道 OTA API 对于编写测试脚本非常有用。
我的问题是如何通过测试脚本(和 OTA API)修改自动运行器上看到的最终状态。
我有这个要求,因为当我的以下测试脚本被调用时,我希望显示一条消息 - 'Testcase Finished' 而不是 'Error: Failed to Post Run'。显示第二条消息是因为我的测试脚本故意取消了运行。这是脚本:
def Test_Main(Debug, CurrentTestSet, CurrentTSTest, CurrentRun):
TDOutput.Print('Do something before cancel')
CurrentRun.CancelRun()
TDOutput.Print('Do something after cancel')
【问题讨论】: