簡體   English   中英

"ROBOT FRAMEWORK:如何僅在測試用例失敗時才執行測試拆卸?"

[英]ROBOT FRAMEWORK: How to make test teardown execute only if test case fails?

我可以在標題中使用“TEST TEARDOWN”關鍵字,但這會在每個測試用例之后執行。 有什么方法可以在代碼中執行,使其僅在測試用例失敗時執行,否則跳過?

"

為該案例創建了關鍵字Run Keyword If Test Failed<\/a> 。 最好隨時准備好 Robotframework 文檔(並至少瀏覽一次)。

這里有一個關於它的特別說明:

This keyword can only be used in a test teardown. Trying to use it anywhere else results in an error.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM