• 軟件測試技術
  • 軟件測試博客
  • 軟件測試視頻
  • 開源軟件測試技術
  • 軟件測試論壇
  • 軟件測試沙龍
  • 軟件測試資料下載
  • 軟件測試雜志
  • 軟件測試人才招聘
    暫時沒有公告

字號: | 推薦給好友 上一篇 | 下一篇

調試消息函數lr_debug_message和lr_set_debug_message

發布: 2008-10-25 21:48 | 作者: 陽光 | 來源: 本站原創 | 查看: 504次 | 進入軟件測試論壇討論

領測軟件測試網 本文來自LR-VUG用戶手冊

MILY: 宋體; mso-bidi-font-family: 宋體; mso-font-kerning: 0pt; mso-hansi-font-family: 'Times New Roman'">可以使用 VuGen 的用戶界面添加調試消息或錯誤消息。對于調試消息,可以指

示文本消息的級別(只有當指定的級別與消息類匹配時才發出該消息)。使用

lr_set_debug_message 可以設置消息類。

要插入調試函數,請執行下列操作:

1 依次選擇“插入” > “新建步驟”。將打開“添加步驟”對話框。

2 選擇“調試消息”步驟,然后單擊“確定”。將打開“調試消息”對話框。

3 選擇消息級別:“簡要”或“擴展日志”。如果選擇了“擴展日志”,請指示要

記錄的信息的類型:“參數替換”、“結果數據”或“完全跟蹤”。

4 在“消息文本”框中鍵入消息。

5 單擊“確定”插入消息并關閉對話框。lr_debug_message 函數將插入到腳本的

當前點。

lr_debug_message基本用法

int lr_debug_message (unsigned int message_level, const char *format, ... );

message_level

One of the Mercury\LoadRunner\bin\vuser_utils_FuncRef.chm::/Message_Log_Run_Time_Settings.html">Message Log Run-Time Settings. Disabled does not apply.

format

A formatted string which is the message to be sent to the log file. You may use the standard Message Formatting that is available for printf.

The lr_debug_message function sends a debug message when the specified message level is active. If the specified message level is not active, a message is not issued. You can set the active message level to MSG_CLASS_BRIEF_LOG or MSG_CLASS_EXTENDED_LOG from the user interface or by using lr_set_debug_message. To determine the current level, use lr_get_debug_message.

Note that you can also specify multiple message levels with an OR separator ("|"). If any one of the levels are active (from the UI), the message is issued to the Output window. If none of the levels are active, the message is not issued.

The message is sent to the output window. To display the debug messages in the LoadRunner output window or Application Management agent log file, use the Expert Mode Settings. Activate Expert Mode (Tools > Expert Mode) and then choose Tools > Options > Debug Information and select the General check box.

例子:

In the following example, lr_debug_message issues a message to the log when either the Parameters Substitution or Result Data classes are set.

lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG, LR_SWITCH_ON);

. . .

rc = lrd_fetch(Csr1, 1, 1, 0, PrintRow3);

if (rc>2000)

lr_debug_message(LR_MSG_CLASS_RESULT_DATA |         LR_MSG_CLASS_PARAMETERS, "Operation failed.");

【全文結束】

延伸閱讀

文章來源于領測軟件測試網 http://www.anti-gravitydesign.com/

TAG: debug DEBUG Set set 調試 函數 message


關于領測軟件測試網 | 領測軟件測試網合作伙伴 | 廣告服務 | 投稿指南 | 聯系我們 | 網站地圖 | 友情鏈接
版權所有(C) 2003-2010 TestAge(領測軟件測試網)|領測國際科技(北京)有限公司|軟件測試工程師培訓網 All Rights Reserved
北京市海淀區中關村南大街9號北京理工科技大廈1402室 京ICP備10010545號-5
技術支持和業務聯系:info@testage.com.cn 電話:010-51297073

軟件測試 | 領測國際ISTQBISTQB官網TMMiTMMi認證國際軟件測試工程師認證領測軟件測試網

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97