1.
採用自定義檢查點,檢查price*ticket
的**是否等於total,並用if語句寫出判定成功或者失敗後的reporter.reportevent報告語句。
dim tickets,price,total '
字串轉換
tickets=cdbl(window("flight reservation").winedit("tickets:").getroproperty("text")) '
去掉美元符號
price=cdbl(mid(window("flightreservation").winedit("price:").getroproperty("text"),2))
total=cdbl(mid(window("flightreservation").winedit("total:").getroproperty("text"),2)) '
比較price*ticket
的**是否等於
total
if tickets*price-total<0.000000001 then
reporter.reporteventmicpass,"price*ticket的**等於
total","price*ticket
的**等於
total"
else
reporter.reporteventmicpass,"price*ticket的**不等於
total","price*ticket
的**不等於
total"
end if
window("flight reservation").winbutton("insertorder").click
window("flight reservation").activate
Loadrunner錄製指令碼與編寫指令碼的區別
異同點 1 錄製的和編寫的指令碼質量上沒有區別 2 效能指令碼關心的是使用者和伺服器的資料互動,從這點上來看,錄製和編寫也沒有區別,手動編寫指令碼也可以寫出很真實的指令碼 3 能錄製的情況下,就錄製吧,誰每天閒著沒事自己手動寫指令碼呢。一般的頁面 http get型別的介面,都可以錄製。錄製生成指令...
Loadrunner 不能錄製指令碼的解決方法
方法一 若果被測試系統在本機上,訪問位址為 埠 程式名稱,需要將url改為 http localhost 埠 程式名稱,這樣就可以產生指令碼了。這個現象我也覺得很奇怪,不知道到底為什麼?但是,改成 http localhost 埠 程式名稱 的確可以產生指令碼了,呵呵!方法二 關閉loadrunne...
loadrunner指令碼錄製為空的解決方法
在玩loadrunner時經常性的出現指令碼錄製為空的情況,下面是我總結出的解決辦法 1.在用loadrunner錄製指令碼時發現指令碼錄製為空,查詢原因,我首先看。ie選項 連線 區域網設定 自動檢測不能選 3.原來關鍵在於我電腦上裝了ie瀏覽器和360瀏覽器,並且360瀏覽器為預設瀏覽器,只要把...