差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
rf:rf:reducelog [2016/03/04 17:46] tony [設定Retry/Wait Keyword的Log Level] |
rf:rf:reducelog [2023/06/25 09:48] (目前版本) |
||
---|---|---|---|
行 1: | 行 1: | ||
====== 減少產生不必要的Log ====== | ====== 減少產生不必要的Log ====== | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | 隨著testcases越來越多,我們這陣子開始有報表無法出現的問題。後來發現是由於output.xml就有46~50MB的大小,在產生報表時會發生out of memory。這大小光要透過編輯器打開就很吃力了。後來暫時解決方式是透過commandline自行產生報表: | + | 隨著testcases越來越多,我們這陣子開始有報表無法出現的問題。後來發現是由於output.xml就有46~50MB的大小,在產生報表時會發生out of memory。這大小光要透過編輯器打開就很吃力了;後來暫時解決方式是透過commandline自行產生報表: |
<code bash> | <code bash> | ||
java -jar robotframework.jar rebot output.xml | java -jar robotframework.jar rebot output.xml | ||
行 49: | 行 49: | ||
這部分可參考另外一篇: | 這部分可參考另外一篇: | ||
* [[rf:rf:unnecessaryLog|設定某些Keyword的Log Level]] @TODO@ | * [[rf:rf:unnecessaryLog|設定某些Keyword的Log Level]] @TODO@ | ||
+ | ==== Set Log Level ==== | ||
+ | 在某些retry動作內有包含log keyword時,可以在使用前透過Set Log Level為NONE去避免不必要的LOG,然後在teardown在回復成INFO。 | ||
+ | ==== 使用--RemoveKeywords參數 ==== | ||
+ | 以**Wait Until Keyword Succeeds**來說,Robot設計者已考量到大量log產生問題,因此可以在robot參數加入以下參數,去濾掉不必要的報表內容: | ||
+ | <code bash> | ||
+ | --RemoveKeywords WUKS | ||
+ | </code> | ||
+ | PS. output.xml中依然會有這些東西,但report.html中是被濾掉的。 | ||
===== Reference ===== | ===== Reference ===== | ||
* [[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#standalone-jar-distribution|RobotFrameworkUserGuide.html#standalone-jar-distribution]] | * [[http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#standalone-jar-distribution|RobotFrameworkUserGuide.html#standalone-jar-distribution]] |