web test LoadRunner error_list

http://bbs.51testing.com/thread-8644-1-1.html

  sckOutOfMemory 7 內存不足 
  sckInvalidPropertyValue 380 屬性值不效 
  sckGetNotSupported 394 屬性不可讀 
  sckGetNotSupported 383 屬性是隻讀的 
  sckBadState 40006 所請求的事務或請求本身的錯誤協議或者錯誤連接狀態 
  sckInvalidArg 40014 傳遞給函數的參數格式不確定,或者不在指定範圍內 
  sckSuccess 40017 成功 
  sckUnsupported 40018 不支持的變量類型 
  sckInvalidOp 40020 在當前狀態下的無效操作 
  sckOutOfRange 40021 參數越界 
  sckWrongProtocol 40026 所請求的事務或請求本身的錯誤協議 
  sckOpCanceled 10004 取消操作 
  sckInvalidArgument 10014 所請求的地址是廣播地址,但未設置標記 
  sckWouldBlock 10035 套接字不成塊,而指定操作將使之成塊 
  sckInProgress 10036 製造塊的Winsock操作在進行之中 
  sckAlreadyComplete 10037 完成操作。未進行製作塊的操作 
  sckNotSocket 10038 描述符不是套接字 
  sckMsgTooBig 10040 數據太大,不適於緩衝區的要求,因而被截斷 
  sckPortNotSupported 10043 不支持指定的端口 
  sckAddressInUse 10048 地址在使用中 
  sckAddressNotAvailable 10049 來自本地機器的不可用地址 
  sckNetworkSubsystemFailed 10050 網絡子系統失敗 
  sckNetworkUnreachable 10051 當前不能從主機到達網絡 
  sckNetReset 10052 在設置SO_KEEPALIVE時連接超時 
  sckConnectAborted 10053 由於超時或者其它失敗而中止接連 
  sckConnectionReset 10054 通過遠端重新設置連接 
  sckNoBufferSpace 10055 沒有可用的緩存空間 
  sckAlreadyConnected 10056 已連接的套接字 
  sckNotConnected 10057 未接連套接字 
  sckSockedShutdown 10058 已關閉套接字 
  sckTimedout 10060 套接字超時 
  sckConnectionRefused 10061 強行拒絕連接 
  sckNotInitialized 10093 套接字沒有初始化 
  sckHostNotFound 11001 授權應答:未找到主機 
  sckHostNotFoundTryAgain 11002 非授權應答:未找到主機,重試 
  sckNonRecoverableError 11003 不可恢復的錯誤 
  sckNoData 11004 無效名,對所請求的類型無數據記錄

 

 

問題描述   :lr11 BUG?Failed to send data by channels - post message failed.

解決方法 :http://bbs.51testing.com/thread-527804-1-1.html

HTTP協議的,windows server 2008+lr11+IE7 應該沒啥特殊操作,也不是每次跑都出現這個錯誤,之前也跑過8小時疲勞也正常出結果。
網上搜了一圈,看到個建議把controller中的Diagnotics-configure-Web Page Diagnotics默認的Enable關掉,重新試了幾次倒是正常了,現在也不確定是不是真的沒問題了。
估計是兼容性的問題吧

 

問題描述 :Error -27257: Pending web_reg_save_param/reg_find/create_html_param[_ex] request(s) detected and reset at the end of iteration number 1

http://www.mianwww.com/html/2011/11/11898.html
解決方法:
 web_reg_save_param位置放錯了,應該放到請求頁面前面。

 

問題描述 : Action.c(19): Error -27796: Failed to connect to server "preprice1.suning.cn:80": [10048] Address already in use

解決方法: Try changing the registry value 
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\TcpTimedWaitDelay to 30
and HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\MaxUserPort to 65534
and rebooting the machine

http://blog.csdn.net/alix_zhou/article/details/4488809

2、HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/tcpip/Parameters/TcpTimedWaitDelay to 30
and HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/tcpip/Parameters/MaxUserPort to 65534
將TcpTimedWaitDelay to 30設置爲5s或者其它,同時增加了think time,需要重啓機器。

 

 

LoadRunner錯誤及解決方法總結

http://wenku.baidu.com/view/2879ff4e2b160b4e767fcf2f.html?from=rec&pos=0&weight=3&lastweight=1&count=5

 

 

LoadRunner SHUNRA\CloudServices

http://dax9527.blog.163.com/blog/static/3764789520100136832542/

在某次重啓以後突然發現公司的機器不能上網了,主要症狀是無法獲取IP,手動指定IP也不起作用,域用戶下也沒法聯網.域防火牆無法連接.系統設備中有一個網卡帶歎號,不能正常工作也沒法卸載掉.
      經過半天折騰,結果無意中發現本地連接屬性中有一個叫SHUNRA\Cloud WAN Emulator的服務是勾選狀態.
嘿,這東西跟那個帶歎號的網卡是一個名字啊,後來明白這是因爲我安裝了LoadRunner8.0工業級壓力測試軟件的原因,LR自動安裝並啓用了這個服務,不過卻是個閹割的東西,導致不能接入到局域網.去掉勾選,完美解決.

 

LoadRunner小技巧集錦

http://www.cnblogs.com/preftest/archive/2010/08/02/1790569.html

 

1、錄製腳本中包含中文,出現亂碼怎麼辦?

把錄製選項中的Support charset選中UTF-8

 

 

錄製腳本後,切換到樹視圖中,打開相應的腳本頁面。在右側的PageView中錄製的腳本呈現中文版式,但是當切換到Server Response中,所有的中文全部換成的亂碼,如“勌縗仫訆”。

 

原因是服務器端沒有把響應的編碼設置爲gb2312

 

在IIS中找到Web.Config文件,在<system.web>….</system.web>節加 入<globalization requestEncoding="gb2312" responseEncoding="gb2312" fileEncoding="gb2312"/>後再次錄製腳本,亂碼變中文。

 

2、錄製到的腳本是空白的

有可能是由於錄製的URL地址採用的是localhost的問題,改成分配的IP地址或127.0.0.1試試。

 

 

3、插入文本檢查點步驟時,使用web_reg_find,通常TextPfx和TextSfx中會包含雙引號,需要進行轉義(用斜槓),例如:

 

       web_reg_find("Search=Body",

              "SaveCount=Welcome",

              "TextPfx=歡迎<a class=\"drop\" id=\"viewpro\" onMouseOver=\"showMenu(this.id)\">",

              "TextSfx=</a>",

              LAST);

 

4、使用web_image_check插入圖片檢查點時需要主要設置Run-Time Setting中的Enable Image and text check選項:

 

 

使用web_find函數插入文本檢查點也一樣要做此設置

 

5、性能測試往往需要準備大批量的數據,大批量數據的生成方法有很多種,常見的有:

       (1)編寫SQL語句來插入數據

(2)使用DataFactory等專業的數據生成工具

       (3)通過LoadRunner錄製回放的方式重複執行生成大批量數據

 

Tips:

使用DataFactory插入nchar數據類型的數據時會出現空值的情況,可以先修改數據庫的數據類型設置,插完數據後再改回來

 

6、在錄製腳本的過程中插入註釋,錄製後查看和理解腳本會更加方便。

 

 

7、LoadRunner回放腳本時,在瀏覽器顯示的中文是亂碼

 

解決辦法(1):

首先設置Run-Time Settings – Browser – Browser Emulation – User-Agent

 

 

然後設置IE:

查看-編碼-鉤上“自動選擇”和Unicode(UTF-8)。

 

解決辦法(2):

使用lr_convert_string_encoding函數來轉換編碼

 

下面是一個使用的例子:

lr_convert_string_encoding(lr_eval_string("{ReplyContents}"),LR_ENC_SYSTEM_LOCALE,LR_ENC_UTF8,"ReplyMessage");

 

       web_submit_data("postreply.aspx_2",

              "Action=http://127.0.0.1/postreply.aspx?infloat=1&topicid=2&&inajax=1",

              "Method=POST",

              "EncType=multipart/form-data",

              "RecContentType=text/xml",

              "Referer=http://127.0.0.1/showtopic-2.aspx",

              "Snapshot=t9.inf",

              "Mode=HTML",

              ITEMDATA,

              "Name=iconid", "Value=0", ENDITEM,

              "Name=title", "Value=", ENDITEM,

              "Name=wysiwyg", "Value=0", ENDITEM,

              "Name=checkbox", "Value=0", ENDITEM,

              "Name=message", "Value=[localimg=180,112]1[/localimg]\r\n\r\n{ReplyMessage}", ENDITEM,

              "Name=e_mediatyperadio", "Value=on", ENDITEM,

              "Name=sl_attachdesc", "Value=", ENDITEM,

              "Name=attachid", "Value=", ENDITEM,

              "Name=attachdesc", "Value=", ENDITEM,

              "Name=localid", "Value=", ENDITEM,

              "Name=attachdesc", "Value=", ENDITEM,

              "Name=localid", "Value=1", ENDITEM,

              "Name=attachdesc", "Value=", ENDITEM,

              "Name=localid", "Value=2", ENDITEM,

              "Name=emailnotify", "Value=on", ENDITEM,

              "Name=postreplynotice", "Value=on", ENDITEM,

              "Name=postfile", "Value=", "File=Yes", ENDITEM,

              "Name=postfile", "Value=D:\\\\圖片收集\\\\It's about time.JPG", "File=Yes", ENDITEM,

              "Name=postfile", "Value=", "File=Yes", ENDITEM,

              "Name=uploadallowmax", "Value=10", ENDITEM,

              "Name=uploadallowtype", "Value=jpg,gif", ENDITEM,

              "Name=thumbwidth", "Value=300", ENDITEM,

              "Name=thumbheight", "Value=250", ENDITEM,

              "Name=noinsert", "Value=0", ENDITEM,

              LAST);

 

8、可以在LR測試腳本的目錄中找到參數文件,直接修改參數文件

The parameter file is stored in the script directory as .dat file extension.  It can be opened with a simple text editor like Notepad as it is stored in pure text format.  Therefore, you can manipulate the files via the Notepad.  You can also use office applications such as Microsoft Excel or OpenOffice.org Calc to work on the file.  This greatly the amount of work required for maintaining a long list of data.

 

9、LR9.x啓動VUGen時提示"Failed to connect to server"

After upgrading to LoadRunner 9.x I started getting a window popup which said "Failed to connect to server" every time I opened virtual user generator (vugen.exe).

 

 

The solution to this was to close virtual user generator and delete the [vugen.ini] file.

vugen.ini is found in the %systemroot% folder on your Windows PC (usually C:\WINDOWS or C:\WINNT).

 

Once you've deleted the file, virtual user generator will open without any issues and create a new vugen.ini file automatically.

 

 

 

10、怎樣抓取有相同左右邊界的動態value?

怎樣抓取有相同左右邊界的動態value?例如:

stateID="d7lg0ehmjkkm6uin3s4boei7oq">

stateID="cvopakp46ftsf8mh6l37ti3ubm">

stateID="bv9mja8gtgr39ddibm5t9163re">

web_reg_save_param裏的ORD應該怎樣設置?

 

 

 

 

ORD: Indicates the ordinal position or instance of the match. The default instance is 1. If you specify "All," it saves the parameter values in an array.

 

例子:

char outFlightParam[50]; // The name of the parameter for correlation

char outFlightParamVal[50]; // The formatted value of outFlightParam

web_reg_save_param("outFlightVal",

        "LB=outboundFlight value=", "RB=>",

        "ORD=ALL",

        "SaveLen=18",

        LAST);

 

    web_submit_form("reservations.pl",

        "Snapshot=t4.inf",

        ITEMDATA,

        "Name=depart", "Value=London", ENDITEM,

        "Name=departDate", "Value=11/20/2003", ENDITEM,

        "Name=arrive", "Value=New York", ENDITEM,

        "Name=returnDate", "Value=11/21/2003", ENDITEM,

        "Name=numPassengers", "Value=1", ENDITEM,

        "Name=roundtrip", "Value=<OFF>", ENDITEM,

        "Name=seatPref", "Value=None", ENDITEM,

        "Name=seatType", "Value=Coach", ENDITEM,

        "Name=findFlights.x", "Value=83", ENDITEM,

        "Name=findFlights.y", "Value=16", ENDITEM,

        LAST);

 

    sprintf(outFlightParam, "{outFlightVal_%s}",

        lr_eval_string("{outFlightVal_count}"));

    sprintf(outFlightParamVal, "Value=%s",

        lr_eval_string(outFlightParam));

    lr_message("The value argument is : %s", outFlightParamVal);

 

    web_submit_form("reservations.pl_2",

        "Snapshot=t5.inf",

        ITEMDATA,

        "Name=outboundFlight",outFlightParamVal, ENDITEM,

        "Name=reserveFlights.x", "Value=92", ENDITEM,

        "Name=reserveFlights.y", "Value=10", ENDITEM,

        LAST);

 

 

 

11、運行場景時提示“Step download timeout (120 seconds) has expired when downloading resource(s)”

 

vuser_init.c(12): Error -27728: Step download timeout (120 seconds) has expired when downloading non-resource(s)(出現個別,可以忽略)

vuser_init.c(12): Error -27727: Step download timeout (120 seconds) has expired when downloading resource(s). Set the "Step Timeout caused by resources is a warning" Run-Time Setting to Yes/No to have this message as a warning/error, respectively

 

 

如果覺得下載一個頁面超過2分鐘不是錯誤的話,可以在Run-Time設置中選擇Preferences->Options,修改Step download timeout(sec)的時間

或者把“Step timeout caused by resources is a warning”設置爲Yes,這樣下載資源超時也只是作爲警告,不作爲錯誤提示,但是對於非資源的下載超時,則總是會提示錯誤的

 

12、用strtok函數分割字符串

需要在loadrunner裏面獲得“15”(下面紅色高亮的部分),並做成關聯參數。

//Body response 內容: <BODY><; PRE>//OK[8,7,5,15,6,5,0,4,0,3,0,3,2,0,0,0,1

 

用web_reg_save_param取出“8,7,5,15,6,5,0,4,0,3,0,3,2,0,0,0,1”這一段,然後用strtok函數切割出一個個數字,第四個數字就是要找的值

 

例如:

extern char * strtok(char * string, const char * delimiters ); // Explicit declaration

char separators[] = ",";

char * token;

lr_save_string("1,2,3,4,5,6","str");

token = (char *)strtok(lr_eval_string("{str}"), separators); // Get the first token

if (!token) {

        lr_output_message ("No tokens found in string!");

        return( -1 );

    }

while (token != NULL ) { // While valid tokens are returned

        lr_output_message ("%s", token );

        token = (char *)strtok(NULL, separators); // Get the next token

    }

 

 

 

 

13、LoadRunner沒有購買webservice協議的license,只有http的,可不可以完全用http協議模擬webservice?

 

可以,參考:

http://blog.testsautomation.com/2009/01/web-services-performance-using-loadrunner/

http://blog.testsautomation.com/2009/05/validating-web-service-response-with-xpath/

 

 

 

 

14、在場景設置中不忽略思考時間,但是在查看響應時間的時候怎樣讓LR自動在響應時間裏減去思考時間?

 

在analysis中找到了設置是否在報告中包含思考時間的地方做相應的設置即可:

 

 

 

 

 

15、LoadRunner在運行過程中停掉1半虛擬用戶

 

Another issue that I’m facing from time to time is that LoadRunner stops 50% of running users without any notification, issue, error message etc. I’ve find out that it happens only when running with log level set to ‘always send a message’. Because of that, I suggest to run with log level set to ‘Send message only when error occur’.

 

 

 

16、LoadRunner錄製不了任何東西

 

Sometimes LoadRunner is not recording anything while browsing using IE. I have no idea why but the fastest solution is to restart whole LR. Maybe some of you have good explanation for that?

 

 

 

 

17、測試RTMP協議應該在LoadRunner選擇什麼協議來錄製?

 

用flex協議

 

有這幾個函數可用:

flex_rtmp_connect  Connects a client to an RTMP server and sets connection options. 

flex_rtmp_disconnect  Disconnects a client from an RTMP server. 

flex_rtmp_send  Sends messages to an RTMP server. 

flex_rtmp_receive  Receives responses from an RTMP server

 

Flex can record and replay scripts involving RTMP (Real Time Messaging Protocol). In order to enable RTMP simulation, you must configure the recording options for the Flex protocol.

To enable RTMP:

1 Open the Recording Options dialog box by selecting Tools > Recording Options or clicking the Options button in the Start Recording dialog box.

2 In the Network > Port Mapping node click Options.

3 Set the Send-Receive buffer size threshold to 1500.

 

 

 

18、如何在LoadRunner中運行QTP腳本?

  1、運行準備:

  1)勾選QTP的Tools--Options--Run的"Alow other Mercury products to run tests and components"

  2)錄製需要在lr中運行的QTP腳本,並且在QTP腳本中設置事務,Services.StartTransaction "start"與Services.EndTransaction "start"

  2、運行QTP腳本

  在LR中運行時選擇QTP腳本,爲QTP腳本存放目錄下文件擴展名爲.usr的文件。

  注:LR中運行QTP腳本時,只能有一個Vuser,否則將報錯:

  The load generator is currently running the maximum number of Vusers of this type

 

 

 

 

19、在LR中如何忽略Socket接收數據的驗證

在LR中對Socket進行性能測試時,LR會自己判斷lrs_receive回來的數據的長度,而如果長度不符的話會有時間延遲的情況(這是性能測試完全不能接受的事情),如果做到這一點呢,經過反覆嘗試,發現一種簡單的方法(用*代替具體的長度):

 

類似於將:

recv buf1 12

"Hello, Denny"

 

改爲:

recv buf1 *

"Hello, Denny"

 

一切OK。

 

 

 

20、LoadRunner9.5的Controller中不能添加Apache的監控

 

 

在C:\Program Files\HP\LoadRunner\dat\online_graphs中找到online_resource_graphs.rmd文件,修改[Apache]部分中的EnableInUI爲1

參考:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1274450165814+28353475&threadId=1229523

 

 

21、VB Vuser開發ADO腳本,提示“user-defined type not defined”

想在VB Vuser寫入模擬數據操作的過程,然後在VB Vuser裏定義了這個全局變量

Private m_Conn As ADODB.Connection '連接對象

Private m_Reco As ADODB.Recordset  '結果集

但是在VB Vuser中不識別這個對象,報出user-defined type not defined

 

 

需要在Run-Time 設置中的VBA部分把ADO的庫選上

如果用VB Script虛擬用戶來開發就不要,直接用CreateObject來創建ADO對象即可

 

 

22、loadrunner9.5錄製腳本時出現c:\PROGRA~1\MICROS~1\office12\Grooveutil.DLL時出錯內存位置訪問無效

 

Office2007的問題,IE加載項禁用Groove  GFSBrowser Helper 組件

 

 

23、LR自帶的例子端口號怎麼修改?

LR自帶的例子端口號是1080,我怎麼樣把這個端口設置我自己想用的端口號8088,在什麼地方設置

 

 

在LR安裝目錄下,找到Xitami.config文件,找到portbase,可以修改它(默認是1000);

默認的端口號是portbase+80;

要把端口號改成8088,就把portionbase改爲8008,保存之後就是了(8088=8008+80)。

 

24、用Web_reg_find查找中文字符串時查找不到

 

腳本文件裏有個default.cfg ,裏面有個參數是 UTF8InputOutput ,將其值改爲0

 

 

 

25、替代IP Wizard的腳本

 

http://hi.baidu.com/higkoo/blog/item/39bbb21bc33d76dcac6e751c.html

 

LoadRunner自帶的“IP Wizard”用起來非常麻煩,要不停的點,重要的是最後還必須重啓系統生效。

於是乎寫個腳本替代之:

1. 假設客戶端IP爲 192.168.10.31

2. 假設服務端IP爲 192.168.10.10

3. 需要模擬的IP爲 110.119.120.122

 

那麼,客戶端提供添加虛擬IP的BAT腳本:

netsh    interface    ip    add    address    本地連接    110.119.120.122    255.255.0.0

對應的刪除設置爲:

netsh    interface    ip    del    address    本地連接    110.119.120.122

 

對應服務器添加虛擬路由的Shell腳本:

route add -host 110.119.120.122 gw 192.168.10.31

刪除路由的腳本:

route del -host 110.119.120.122 gw 192.168.10.31

 

這樣就非常方便了,不用重啓任何機器,執行腳本就生效,再執行腳本就取消。

 

 

26、如何從命令行調用LoadRunner腳本?

 

Here is the command line that you need to execute to run a VuGen script from the command prompt:

   <LoadRunner>\bin\mmdrv.exe -usr <path to usr file> 

Note:
In order to get all the other options that go with the command, run mmdrv.exe from the command prompt without any options.

 

 

27、請問"int64這個類型,在LR中怎麼表示"。我將一段C的代碼放在LR中,LR不認int64這個類型,怎麼解決?

 

把那段C代碼做成DLL,然後在LR中調用

 

 

28、LoadRunner監控遠程機器Windows資源,提示“net use failed”

 

解決辦法 :

在被監控機器上更改本地帳戶的共享和安全模式爲經典模式。控制面板->管理工具->本地安全策略->網絡訪問:本地帳戶的共享和安全模式->經典模式。

 

監視連接前的準備工作 :

首先保證被監視的windows系統開啓以下二個服務Remote Procedure Call(RPC) 和Remote Registry Service

被監視的WINDOWS機器:右擊我的電腦,選擇管理->共享文件夾->共享 在這裏面要有C$這個共享文件夾,(要是沒有自己手動加)

然後保證在安裝LR的機器上使用運行.輸入\\被監視機器IP\C$ 然後輸入管理員帳號和密碼,如果能看到被監視機器的C盤了,就說明你得到了那臺機器的管理員權限,可以使用LR去連接了

 

Analysislog.log

Analysis Error log: <2012-11-1 9:26:41>
無法更新;當前被鎖定。
SQL: Insert into Breakdown_meter select * FROM [Text; database=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\].101179031Breakdown_meter.txt;

loadrunner收集結果失敗

 

loadrunner 11.0 + JDK 1.7 環境異常

 

Java代碼  收藏代碼
  1. Notify: Found jdk version: 1.7.0.    [MsgId: MMSG-22986]  
  2. Warning: Warning: Failed to find Classes.zip entry in Classpath.  
  3.     [MsgId: MWAR-22986]  
  4. Notify: classpath=D:\TestCase\20121025_wuliu\WuLiu_TC_01_GPSCollecter\;c:\program files\hp\loadrunner\classes\srv;c:\program files\hp\loadrunner\classes;;.;C:\Program Files\Java\jdk1.7.0_10\jre\lib\rt.jar;C:\Program Files\HP\LoadRunner\classes\snf-data-cache-aio-1.1.0.jar;;;c:\program files\hp\loadrunner\lib\xstream-1.3.jar;c:\program files\hp\loadrunner\lib\xpp3-1.1.4c.jar    [MsgId: MMSG-22986]  
  5. Notify: Path=C:\PROGRA~1\HP\LOADRU~1\bin;C:\PROGRA~1\HP\LOADRU~1\bin\gecko;C:\PROGRA~1\HP\LOADRU~1\bin\tulip\bin;.;C:\Program Files\Java\jdk1.7.0_10\bin;C:\Program Files\Common Files\NetSarang;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\strawberry\c\bin;C:\strawberry\perl\bin;C:\Documents and Settings\Administrator\WINDOWS;    [MsgId: MMSG-22986]  
  6. Notify: VM Params: .    [MsgId: MMSG-22986]  
  7. Error: Java VM internal error:Error Loading javai.dll.  
  8. .    [MsgId: MERR-22995]  
  9. Warning: Extension java_int.dll reports error -1 on call to function ExtPerProcessInitialize    [MsgId: MWAR-10485]  
  10. Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread.    [MsgId: MERR-10176]  

 

LoadRunner與JDK的安裝問題

http://www.cnblogs.com/xiaochuncha/archive/2008/07/22/1248599.html

Louis-KB-20080722-T001
我在安裝LoadRunner9.1版本的時候,取得的license是Java協議,需要在服務器上安裝JDK。首先服務器是Microsoft Windows Server 2003 R2 Enterprise Edition Service Pack2(x64),安裝的LoadRunner9.1默認是在C盤的Program Files中,按照這樣來說,就需要安裝64爲的JDK,我即安裝jdk-1_5_0_16-windows-amd64.exe,但是在安裝成功後,運行寫好的Java協議腳本,會出現如下的錯誤:

Java代碼  收藏代碼
  1. Error: Failed to find javac.exe Java Compiler in Path and JDK installation folder in registry.  [MsgId: MERR-22981]  
  2. Error: Failed to find java.exe.  
  3. Please add the <JDK>\bin to the path and try again.   [MsgId: MERR-22968]  
  4. Warning: Extension java_int.dll reports error -1 on call to function ExtPerProcessInitialize    [MsgId: MWAR-10485]  
  5. Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread. [MsgId: MERR-10176]  

 

在檢測JDK安裝是否成功時,JDK能夠正常運行,LoadRunner的安裝也沒有任何問題,這樣的問題就定位到二者的結合的問題上,首先在Vuser->Run-Time Setting中的Java Environment Settings->ClassPath中能夠識別環境變量中的ClassPath,但是還是會報以上的錯誤。
在找問題所在的時候,我發現LoadRunner9.1沒有任何說明此版本是64位軟件,如何沒有任何說明,則默認應該是32位軟件,而對應的JDK應該也是32位的JDK,64位操作系統是兼容32位軟件,我馬上安裝了32位的JDK,重啓server,刪除Vuser->Run-Time Setting中的Java Environment Settings->ClassPath中所有變量,重新運行腳本,發現錯誤消失。
寫此文章就是想告訴大家,32位的軟件和64位軟件還是有很多不兼容,出現的報錯信息也是五花八門,希望能對大家有幫助。
---------------------------------------------------------------------------
Louis Yan
Beijing, China
Mail:[email protected]
MSN:[email protected]

 

 

loadrunner 8.0 / 8.1 + JDK 1.5 環境異常

問題:Failed to find Classes.zip entry in Classpath.

http://blog.sina.com.cn/s/blog_69735aa50100vgtn.html

 今天寫了一個JavaUser的LR的測試腳本,

編譯時報錯:Failed to find Classes.zip entry in Classpath.
解決:

http://download.csdn.net/download/foreignli/2560453
LR8.0或者8.1+JDK1.5版需要打一個補丁名字叫做:java_protocol_fixes_Feb_05,打上之後重啓機器就ok了。

 

 

 

end

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章