51Testing软件测试论坛

标题: loadrunner怎么设置日志才只能显示输出结果? [打印本页]

作者: soarsky629    时间: 2011-4-22 10:48
标题: loadrunner怎么设置日志才只能显示输出结果?
现在回放脚本时,日志显示:
添加了这个语句:lr_output_message("%s",lr_eval_string("{passengers}"));
输出日志如下:
Action.c(6): Found resource "http://127.0.0.1:1080/WebTours/images/button_next.gif" in HTML "http://127.0.0.1:1080/WebTours/reservations.pl"          [MsgId: MMSG-26659]
Action.c(6): web_submit_data("reservations.pl") was successful, 3065 body bytes, 417 header bytes          [MsgId: MMSG-26386]
Action.c(29): Submitting form to "http://127.0.0.1:1080/WebTours/reservations.pl", Target Frame=""          [MsgId: MMSG-27978]
Action.c(29): Resource "http://127.0.0.1:1080/WebTours/images/button_next.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(29): web_submit_form("reservations.pl_2") was successful, 8149 body bytes, 253 header bytes          [MsgId: MMSG-26386]
Action.c(36): 64
Ending action Action.
Ending iteration 1.
Starting iteration 2.
Starting action Action.
Action.c(6): Found resource "http://127.0.0.1:1080/WebTours/images/button_next.gif" in HTML "http://127.0.0.1:1080/WebTours/reservations.pl"          [MsgId: MMSG-26659]
Action.c(6): web_submit_data("reservations.pl") was successful, 3065 body bytes, 417 header bytes          [MsgId: MMSG-26386]
Action.c(29): Submitting form to "http://127.0.0.1:1080/WebTours/reservations.pl", Target Frame=""          [MsgId: MMSG-27978]
Action.c(29): Resource "http://127.0.0.1:1080/WebTours/images/button_next.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(29): web_submit_form("reservations.pl_2") was successful, 3184 body bytes, 253 header bytes          [MsgId: MMSG-26386]
Action.c(36): 10Ending action Action.
Ending iteration 2.
Starting iteration 3.
Starting action Action.
Action.c(6): Found resource "http://127.0.0.1:1080/WebTours/images/button_next.gif" in HTML "http://127.0.0.1:1080/WebTours/reservations.pl"          [MsgId: MMSG-26659]
Action.c(6): web_submit_data("reservations.pl") was successful, 3065 body bytes, 417 header bytes          [MsgId: MMSG-26386]
Action.c(29): Submitting form to "http://127.0.0.1:1080/WebTours/reservations.pl", Target Frame=""          [MsgId: MMSG-27978]
Action.c(29): Resource "http://127.0.0.1:1080/WebTours/images/button_next.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(29): web_submit_form("reservations.pl_2") was successful, 3116 body bytes, 253 header bytes          [MsgId: MMSG-26386]
Action.c(36): 12Ending action Action.
Ending iteration 3.
Starting iteration 4.
Starting action Action.
Action.c(6): Found resource "http://127.0.0.1:1080/WebTours/images/button_next.gif" in HTML "http://127.0.0.1:1080/WebTours/reservations.pl"          [MsgId: MMSG-26659]
Action.c(6): web_submit_data("reservations.pl") was successful, 3065 body bytes, 417 header bytes          [MsgId: MMSG-26386]
Action.c(29): Submitting form to "http://127.0.0.1:1080/WebTours/reservations.pl", Target Frame=""          [MsgId: MMSG-27978]
Action.c(29): Resource "http://127.0.0.1:1080/WebTours/images/button_next.gif" is in the cache already and will not be downloaded again          [MsgId: MMSG-26655]
Action.c(29): web_submit_form("reservations.pl_2") was successful, 3661 body bytes, 253 header bytes          [MsgId: MMSG-26386]
Action.c(36): 60Ending action Action.

而我想日志只要输入这个lr_output_message("%s",lr_eval_string("{passengers}"));的结果,其他过程在日志中都不显示,
期望显示为:
Action.c(36): 64
Action.c(36): 12
Action.c(36): 60
----这样看直观,一目了然
作者: patrick_1984    时间: 2011-4-22 10:54
回放选项里,把log disable就可以了。
作者: soarsky629    时间: 2011-4-22 11:22
回复 2# patrick_1984


   你好,我没有看到“log disable"这个选项呀?
作者: 云层    时间: 2011-4-22 11:33
你要一目了然用lr_error_message

记得用完了删掉




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2