java vuser学习

上一篇 / 下一篇  2009-07-28 14:25:07 / 个人分类:LoadRunner测试

今天学习了,LoadRunner创建Java Vuer脚本,用Eclipse编个非常简单的输出语句,然后在脚本中调用这个类文件的MAIN执行。

个人认为在脚本编写时,有两点要注意:

1)要将包名引入  import com.xx.xxx.*;

2)在Action中,要将main导入, 类名.main((String[])null);

感谢LR性能测试实战此书中的提示。

/*
 * LoadRunner Java script. (Build: 873)
 * Writer: lytal
 * Script. Description:
 * DATE: 07-28-09                 
 */

import lrapi.lr;
import com.lr.test.*;

public class Actions
{

 public int init() throws Throwable {
  return 0;
 }//end of init


 public int action() throws Throwable {
           Helloword.main((String[])null);
  return 0;
 }//end of action


 public int end() throws Throwable {
  return 0;
 }//end of end
}


TAG: import java LR Vuser vuser

 

评分:0

我来说两句

日历

« 2024-04-22  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 7606
  • 日志数: 12
  • 建立时间: 2008-08-21
  • 更新时间: 2009-09-11

RSS订阅

Open Toolbar