0


Quality Center での単純な必要性。

背景:
HP Quality Center -> Test Lab で、多数のテストケースを含むテストセットを作成できます。[実行] をクリックすると、テストセットまたは個々のテストケースを実行できます (テスト実行スケジューラが起動します)。テストケース用のテスト スクリプト (Python を考慮) が存在することを考慮すると、[実行] をクリックすると、[テスト名
]、[ホストで実行]、[ステータス] の3 つの列がある [自動ランナー] ポップアップが表示され

ます。テストスクリプトを書きます。

私の質問は、testscript (および OTA API) を介して自動ランナーに表示される最終ステータスを変更するにはどうすればよいかということです。


次のテストスクリプトが呼び出されたときに、「エラー: 実行の投稿に失敗しました」ではなく「テストケースが終了しました」というメッセージを表示したいので、この要件があります。テストスクリプトが意図的に実行をキャンセルするため、2 番目のメッセージが表示されます。スクリプトは次のとおりです。

def Test_Main(Debug, CurrentTestSet, CurrentTSTest, CurrentRun):
    TDOutput.Print('Do something before cancel')
    CurrentRun.CancelRun()
    TDOutput.Print('Do something after cancel')
4

1 に答える 1

0

The answer to this question is that.... it cannot be done!! The reason being, QC has its own way of knowing if the testscript passed successfully, it will make the status Passed. Like in the case of...

def Test_Main(Debug, CurrentTestSet, CurrentTSTest, CurrentRun):
    """
    """

    TDOutput.Print("Bye")

The status is Passed.

If any Traceback was caught in the script, it will show the error message and change the status to Failed or Not Complete. I guess QC did not make this tweak-able.

Only thing what we can do is store the output shown on the prompt and attach it to the Run.

于 2012-08-16T23:13:28.530 に答える