|
提到的failed和errors应该是指场景执行中发生的次数吧,简单说说我的理解
首先LR定义事务结束的状态有四个:LR_PASS(执行成功)、LR_FAIL(执行失败)、LR_AUTO(自动)、LR_STOP(终止)
You can manually set the status of the transaction or you can allow the script to detect it automatically. To manually set the status, you perform a manual check within the code of your script (see example) evaluating the return code of a function. For the "succeed" return code, set the status to LR_PASS. For a "fail" return code, set the status to LR_FAIL. For an "aborted" return code, set the status to LR_STOP. If status is LR_AUTO, then the value of status is automatically assigned. By default, this value is LR_PASS signifying a successful transaction.
1.成功结束(包含手动置结果为LR_PASS、和LR_AUTO时成功返回响应的事务)——状态为passed
2.事务执行未结束,主动停止了事务(例如手动置状态为LR_STOP,但服务器等待超时不算主动停止) ——状态为stopped
3.事务执行未返回预期结果(如执行出错、超时等)、或手动置结果为LR_FAIL --状态为fail
以上是failed中会出现的可能,至于errors跟它并不是对应的
回放结果有3类messsage:nomal、warning、error
只要执行过程中出现了error类别的信息(可以是服务器返回的,也可以是你自己写的lr_error_message等等),就会计入1次errors统计 |
|