loadrunner Error -27985问题

Posted LY2018

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了loadrunner Error -27985问题相关的知识,希望对你有一定的参考价值。

错误提示:
Error -27985: There is no context for html-based functions. A previous function may not have used "Mode=HTML" or downloaded only non-HTML page(s), or the context has been reset (e.g., due to a GUI-based function)

 

看了很多解决方法,有人认为是由于web_find只能只用在基于HTML模式录制的脚本中,但是我全部脚本中没有web_find()这中函数,而是用的web_reg_find(),不过即使只用web_reg_find()也有的会出现上述问题,其实真正的原因是由于:

Runtime Settings的Browse Emulation中设置了Simulate a new user on each iteration引起的。由于这个设置导致每次迭代时都会模拟一个新的用户,此时这个新的用户并没有执行init操作而失败了,也即是错误提示中的There is no context。

这里涉及到一个知识点就是在Rumtime Settings的迭代设置中,迭代运行次数只对Action部分有效,而Init部分和End部分还是只运行一次的。这时如果设置了“Simulate a new user on each iteration”,将出现上面的错误。

以上是关于loadrunner Error -27985问题的主要内容,如果未能解决你的问题,请参考以下文章

安装LoadRunner12.53 版本时出现Critical error的解决方法

LoadRunner性能测试过程中报Error(-17998):Failed to get [param not passed in call] thread TLS entry.

[loadrunner]Action.c(53): Error -27987: Requested image not found [MsgId: MERR-27987]

Loadrunner在场景中添加多个负载机报错:Action.c(38): Error -26488: Could not obtain information about submitted解决方法

loadrunner--27987

LoadRunner执行报错是啥原因