软件测试设计题复习.docxVIP

  • 4
  • 0
  • 约3.61千字
  • 约 3页
  • 2023-05-05 发布于上海
  • 举报
2. 如何利用 LoadRunner 判断 HTTP 服务器的返回状态。 解:可以利用LR的内置函数web_get_int_property判断HTTP服务器的返回状态。例如: #include web_api.h Action() { int HttpRetCode; web_url(my_home,URL=http://myhomeurl,TargetFrame=_TOP, LAST); HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE); if (HttpRetCode == 200) lr_log_message(The scrīpt successfully accessed the My_home home page); else lr_log_message(The scrīpt failed to access the My_home home page ); return 0; } 7.什么是驱动模块和桩模块?为下面的函数构造一个驱动模块。int divide(int a, int b) { int c; if (b==0) {printf(除数不能为 0); return 0;} c=a/b; return c; } 解:驱动模块是用以模拟被测模块的上级模块,它接收测试数据,传送数据给被测模块,

文档评论(0)

1亿VIP精品文档

相关文档