LoadRunner 使用過程中問題及解決辦法記錄
1.web_find()插入檢查點回放錯誤
Action.c(83): Error -27985: There is no context for HTML-based functions. A previous function may not have used "Mode=HTML" or downloaded only non-HTML page(s), or the context has been reset (e.g., due to a GUI-based function) [MsgId: MERR-27985]
Action.c(83): web_find highest severity level was "ERROR" [MsgId: MMSG-26391]
原因:web_find()僅支援基於HTML模式錄製的指令碼中,如果是基於url的指令碼插入後會有如上的錯誤
解決辦法:換成使用web_reg_find()函式即可
另外注意:LoadRunner回放預設是不勾選啟用檢查點的,需要在回放設定中手動勾選才生效
2.web_reg_find()函式中文查詢失敗
解決辦法:將執行設定-》preference的convert from/to UTF-8設定位yes即可
3.在場景中執行時,使用unique迭代方式的引數化出錯,如下:Insufficient records for parameter 'xxx' in table to provide the Vuser with unique data
原因是password引數與username引數數量不匹配,即password引數不夠為每個user分配唯一對應的密碼(如user有5個,password只有2個;即使password引數後面我沒有使用還是出現了部分報錯,估計是腳本里還有記錄)
解決辦法:
(1)將password引數補充與username一致的數量
(2)如果password沒有使用,在引數化列表中將該引數刪除