loadrunner java 缺少必要的导入包报错

loadrunner 运行从eclipse中做好的脚本,ctrl + A 复制到loadrunner中来,

添加参数化的的语句:verifyCode =    lr.eval_string ("<rand6>");

报错:

Notify: Found jdk version: 1.6.0. [MsgId: MMSG-22986]
Notify: classpath=E:performanceTest3-性能测试lr_hibox_script;c:program files (x86)hploadrunnerclassessrv;c:program files (x86)hploadrunnerclasses;.;C:Program Files (x86)Javajdk1.6.0_45lib ools.jar;C:Program Files (x86)Javajdk1.6.0_45libdt.jar;E:performanceTestjarfastjson-1.1.37.jar;E:performanceTestjarhibox_for_lr.jar;E:performanceTestjarprotobuf-java-2.5.0.jar;;;;c:program files (x86)hploadrunnerlibxstream-1.3.jar;c:program files (x86)hploadrunnerlibxpp3-1.1.4c.jar [MsgId: MMSG-22986]
Error: Compilation process failed. [MsgId: MERR-22997]
Warning: Extension java_int.dll reports error -1 on call to function ExtPerProcessInitialize [MsgId: MWAR-10485]
Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread. [MsgId: MERR-10176]

原来是复制过来,导致原本的语句 import lrapi.lr;被覆盖,缺少语句就会报错,在脚本顶部增加这条语句,就会运行正常

原文地址:https://www.cnblogs.com/testway/p/5971352.html