51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 10955|回复: 27
打印 上一主题 下一主题

[求助] 脚本中globals.h是干什么的?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2009-2-19 14:44:45 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
脚本中globals.h是干什么的?因为我在回放脚本时报错,不知道跟这个有没有关系?
下面是错误:
Error: Exception was raised when calling per-process-init function in extension lrwreplaymain.dll: System Exceptions: EXCEPTION_ACCESS_VIOLATION
Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

28#
发表于 2012-11-14 17:25:51 | 只看该作者
<!DOCTYPE html>
<html>
<head>
<title>JS弹出div层,可自定义div层尺寸,双击关闭层丨小鱼网页特效丨CsrCode.Cn</title>
<style>
body {margin:0px}
#Loading {position:absolute;z-index:10;left:10px;top:10px;border:1px #666666 solid;background:#eeeeee;width:10px;height:10px}
</style>
<script LANGUAGE="JavaScript">
<!--
function $(){return document.getElementById?document.getElementById(arguments[0]):eval(arguments[0]);}
var OverH,OverW,ChangeDesc,ChangeH=50,ChangeW=50;
function OpenDiv(_Dw,_Dh,_Desc) {
$("Loading").innerHTML="";
OverH=_Dh;OverW=_Dw;ChangeDesc=_Desc;
$("Loading").style.display='';
if(_Dw>_Dh){ChangeH=Math.ceil((_Dh-10)/((_Dw-10)/50))}else if(_Dw<_Dh){ChangeW=Math.ceil((_Dw-10)/((_Dh-10)/50))}
$("Loading").style.top=(document.documentElement.clientHeight-10)/2+"px";
$("Loading").style.left=(document.documentElement.clientWidth-10)/2+"px";
OpenNow()
}
var Nw=10,Nh=10;
function OpenNow() {
if (Nw>OverW-ChangeW)ChangeW=2;
if (Nh>OverH-ChangeH)ChangeH=2;
Nw=Nw+ChangeW;Nh=Nh+ChangeH;

if(OverW>Nw||OverH>Nh) {
if(OverW>Nw) {
$("Loading").style.width=Nw+"px";
$("Loading").style.left=(document.documentElement.clientWidth-Nw)/2+"px";
}
if(OverH>Nh) {
$("Loading").style.height=Nh+"px";
$("Loading").style.top=(document.documentElement.clientHeight-Nh)/2+"px"
}
window.setTimeout("OpenNow()",10)
}else{
Nw=10;Nh=10;ChangeH=50;ChangeW=50;
$("Loading").innerHTML=ChangeDesc;
}
}
//-->
</script>
</head>
<body>
<a href="javascript:OpenDiv(500,300,'层1<br>双击关闭')">层1 500*300</a><br><br>
<a href="javascript:OpenDiv(500,200,'层2<br>双击关闭')">层2 500*200</a><br><br>
<a href="javascript:OpenDiv(200,500,'层3<br>双击关闭')">层3 200*500</a><br><br>
<a href="javascript:OpenDiv(500,500,'层4<br>双击关闭')">层4 500*500</a>
<a href="javascript:OpenDiv(500,500,'层5<br>双击关闭')">层5 500*500</a>
<div id="Loading" style="display:none" ondblclick="this.style.display='none'"></div>
</body>
</html>
回复 支持 反对

使用道具 举报

该用户从未签到

27#
发表于 2012-11-14 17:21:31 | 只看该作者
<p></p>
回复 支持 反对

使用道具 举报

该用户从未签到

26#
发表于 2012-11-14 17:21:05 | 只看该作者
><; <H3>
回复 支持 反对

使用道具 举报

该用户从未签到

25#
发表于 2012-11-14 17:20:43 | 只看该作者
;
回复 支持 反对

使用道具 举报

该用户从未签到

24#
发表于 2012-11-14 15:42:44 | 只看该作者
回复 7# zynuage


    回放的时候就报错。我的是web协议的,
但是我把download non-html 那个钩钩给去掉了。。。所以就这样子、
回复 支持 反对

使用道具 举报

该用户从未签到

23#
 楼主| 发表于 2009-7-13 10:30:50 | 只看该作者
现在 解决了吗?到底是什么问题啊,mercury的人出来!
回复 支持 反对

使用道具 举报

该用户从未签到

22#
发表于 2009-4-23 09:58:41 | 只看该作者
楼上的有人解决了这个问题了吗?我看网上游人说在C盘里创建个Temp文件夹,然后改了下环境变量里的TEMP的地址,改成C:/Temp。发现还是会报出一样的错误。
有人解决了吗?求教啊
回复 支持 反对

使用道具 举报

该用户从未签到

21#
发表于 2009-4-21 11:08:21 | 只看该作者
有些脚本是不必要的,可以屏蔽掉。
回复 支持 反对

使用道具 举报

该用户从未签到

20#
发表于 2009-4-19 01:10:37 | 只看该作者
.h 头文件吗   就像C语言里似的。
回复 支持 反对

使用道具 举报

该用户从未签到

19#
发表于 2009-4-18 17:22:40 | 只看该作者
globals.h是用来定义头文件和全局变量的
你的错误和这个文件无关,可能是系统的问题,换个lr试试
回复 支持 反对

使用道具 举报

该用户从未签到

18#
发表于 2009-4-17 09:57:46 | 只看该作者

楼主,你的问题解决了吗,我也遇到同样的问题

我也同意问题,怎么办
回复 支持 反对

使用道具 举报

该用户从未签到

17#
发表于 2009-3-26 09:53:06 | 只看该作者

楼主,你的问题解决了吗,我也遇到同样的问题

楼主,你的问题解决了吗,我也遇到同样的问题
回复 支持 反对

使用道具 举报

该用户从未签到

16#
发表于 2009-3-26 09:51:41 | 只看该作者

楼主,你的问题解决了吗,我也遇到同样的问题

楼主,你的问题解决了吗,我也遇到同样的问题
回复 支持 反对

使用道具 举报

该用户从未签到

15#
发表于 2009-3-3 12:54:41 | 只看该作者
楼主,你的问题解决了吗,我也遇到同样的问题,如有解决办法请支援一下,不胜感激
回复 支持 反对

使用道具 举报

该用户从未签到

14#
 楼主| 发表于 2009-2-23 10:15:13 | 只看该作者
上面是用url-based录制的脚本,这是用html-based录制的脚本,发生的错误是一样的,我只是用action 录制,脚本如下:

Action()
{

        web_url("index.jsp",
                "URL=http://localhost:8080/tms/index.jsp",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);

        lr_think_time(9);

        web_submit_data("userManager.do",
                "Action=http://localhost:8080/tms/admin/userManager.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=name", "Value=admin", ENDITEM,
                "Name=password", "Value=5468321", ENDITEM,
                "Name=selectLang", "Value=en_US", ENDITEM,
                "Name=button", "Value=Login", ENDITEM,
                "Name=method", "Value=login", ENDITEM,
                "Name=request-id", "Value=0.7339455498276033", ENDITEM,
                LAST);

        lr_think_time(9);

        web_link("&nbsp;&nbsp;&nbsp;Logout",
                "Text=&nbsp;&nbsp;&nbsp;Logout",
                "Snapshot=t3.inf",
                LAST);

        web_submit_form("userManager.do_2",
                "Snapshot=t4.inf",
                ITEMDATA,
                LAST);

        return 0;
}
回复 支持 反对

使用道具 举报

该用户从未签到

13#
 楼主| 发表于 2009-2-23 10:02:28 | 只看该作者
感谢大家的支持,我的配置是 windows xp , loadrunner 9.0,  IE7的,我在tomcat上部署的application, 下面是脚本,我是把所有的脚本都放在action里面的,脚本里应该没定义变量,不过我以前的其他的脚本定义过,不过不管是不是定义过变量的脚本,一直是报这个错误,而且是一开始就报错。请各位帮帮忙!谢谢!
Action()
{

        web_url("index.jsp",
                "URL=http://localhost:8080/tms/index.jsp",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTTP",
                LAST);

        web_concurrent_start(NULL);

        web_url("command.js",
                "URL=http://localhost:8080/tms/scripts/command.js",
                "Resource=1",
                "RecContentType=text/javascript",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t2.inf",
                LAST);

        web_url("common.js",
                "URL=http://localhost:8080/tms/scripts/common.js",
                "Resource=1",
                "RecContentType=text/javascript",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t3.inf",
                LAST);

        web_url("CheckData.js",
                "URL=http://localhost:8080/tms/scripts/CheckData.js",
                "Resource=1",
                "RecContentType=text/javascript",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t4.inf",
                LAST);

        web_url("ublic.js",
                "URL=http://localhost:8080/tms/scripts/Public.js",
                "Resource=1",
                "RecContentType=text/javascript",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t5.inf",
                LAST);

        web_url("calendar-win2k-cold-1.css",
                "URL=http://localhost:8080/tms/scripts/jscalendarcss/calendar-win2k-cold-1.css",
                "Resource=1",
                "RecContentType=text/css",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t6.inf",
                LAST);

        web_url("jscalendar.js",
                "URL=http://localhost:8080/tms/scripts/jscalendar.js",
                "Resource=1",
                "RecContentType=text/javascript",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t7.inf",
                LAST);

        web_url("tms.css",
                "URL=http://localhost:8080/tms/styles/tms.css",
                "Resource=1",
                "RecContentType=text/css",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t8.inf",
                LAST);

        web_url("calendar-en.js",
                "URL=http://localhost:8080/tms/scripts/lang/calendar-en.js",
                "Resource=1",
                "RecContentType=text/javascript",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t9.inf",
                LAST);

        web_url("calendar-setup.js",
                "URL=http://localhost:8080/tms/scripts/calendar-setup.js",
                "Resource=1",
                "RecContentType=text/javascript",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t10.inf",
                LAST);

        web_url("formsValidation.js",
                "URL=http://localhost:8080/tms/scripts/formsValidation.js",
                "Resource=1",
                "RecContentType=text/javascript",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t11.inf",
                LAST);

        web_url("tms_login.jpg",
                "URL=http://localhost:8080/tms/images/tms_login.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t12.inf",
                LAST);

        web_concurrent_end(NULL);

        lr_think_time(12);

        web_submit_data("userManager.do",
                "Action=http://localhost:8080/tms/admin/userManager.do",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://localhost:8080/tms/index.jsp",
                "Snapshot=t13.inf",
                "Mode=HTTP",
                ITEMDATA,
                "Name=name", "Value=admin", ENDITEM,
                "Name=password", "Value=5468321", ENDITEM,
                "Name=selectLang", "Value=en_US", ENDITEM,
                "Name=button", "Value=Login", ENDITEM,
                "Name=method", "Value=login", ENDITEM,
                "Name=request-id", "Value=0.5010057153414529", ENDITEM,
                LAST);

        web_concurrent_start(NULL);

        web_url("main_top.jsp",
                "URL=http://localhost:8080/tms/main_top.jsp",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:8080/tms/admin/userManager.do",
                "Snapshot=t14.inf",
                "Mode=HTTP",
                LAST);

        web_url("main_left.jsp",
                "URL=http://localhost:8080/tms/main_left.jsp",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:8080/tms/admin/userManager.do",
                "Snapshot=t15.inf",
                "Mode=HTTP",
                LAST);

        web_url("desktop.jsp",
                "URL=http://localhost:8080/tms/desktop.jsp",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:8080/tms/admin/userManager.do",
                "Snapshot=t16.inf",
                "Mode=HTTP",
                LAST);

        web_concurrent_end(NULL);

        web_concurrent_start(NULL);

        web_url("BB_title_1024.jpg",
                "URL=http://localhost:8080/tms/images/BB_title_1024.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://localhost:8080/tms/main_top.jsp",
                "Snapshot=t17.inf",
                LAST);

        web_url("BB_title_800.jpg",
                "URL=http://localhost:8080/tms/images/BB_title_800.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://localhost:8080/tms/main_top.jsp",
                "Snapshot=t18.inf",
                LAST);

        web_url("BB_title_1280.jpg",
                "URL=http://localhost:8080/tms/images/BB_title_1280.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://localhost:8080/tms/main_top.jsp",
                "Snapshot=t19.inf",
                LAST);

        web_concurrent_end(NULL);

        web_concurrent_start(NULL);

        web_url("global.css",
                "URL=http://localhost:8080/tms/styles/global.css",
                "Resource=1",
                "RecContentType=text/css",
                "Referer=http://localhost:8080/tms/main_left.jsp",
                "Snapshot=t20.inf",
                LAST);

        web_url("plus_folder.jpg",
                "URL=http://localhost:8080/tms/images/menu/plus_folder.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://localhost:8080/tms/main_left.jsp",
                "Snapshot=t21.inf",
                LAST);

        web_url("minus_folder.jpg",
                "URL=http://localhost:8080/tms/images/menu/minus_folder.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://localhost:8080/tms/main_left.jsp",
                "Snapshot=t22.inf",
                LAST);

        web_url("leaf.jpg",
                "URL=http://localhost:8080/tms/images/menu/leaf.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://localhost:8080/tms/main_left.jsp",
                "Snapshot=t23.inf",
                LAST);

        web_concurrent_end(NULL);

        web_concurrent_start(NULL);

        web_url("scrolling_table_body.js",
                "URL=http://localhost:8080/tms/scripts/scrolling_table_body.js",
                "Resource=1",
                "RecContentType=text/javascript",
                "Referer=http://localhost:8080/tms/desktop.jsp",
                "Snapshot=t24.inf",
                LAST);

        web_url("menu_tracker_off.jpg",
                "URL=http://localhost:8080/tms/images/menu_tracker_off.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://localhost:8080/tms/desktop.jsp",
                "Snapshot=t25.inf",
                LAST);

        web_url("tms_overview.gif",
                "URL=http://localhost:8080/tms/images/tms_overview.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://localhost:8080/tms/desktop.jsp",
                "Snapshot=t26.inf",
                LAST);

        web_url("shera.jpg",
                "URL=http://localhost:8080/tms/images/shera.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://localhost:8080/tms/desktop.jsp",
                "Snapshot=t27.inf",
                LAST);

        web_concurrent_end(NULL);

        lr_think_time(7);

        web_url("&nbsp;&nbsp;&nbsp;Logout",
                "URL=http://localhost:8080/tms/admin/logout.jsp",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:8080/tms/main_left.jsp",
                "Snapshot=t28.inf",
                "Mode=HTTP",
                LAST);

        web_submit_data("userManager.do_2",
                "Action=http://localhost:8080/tms/admin/userManager.do",
                "Method=GET",
                "EncType=",
                "RecContentType=text/html",
                "Referer=http://localhost:8080/tms/admin/logout.jsp",
                "Snapshot=t29.inf",
                "Mode=HTTP",
                ITEMDATA,
                "Name=method", "Value=logout", ENDITEM,
                LAST);

        return 0;
}
回复 支持 反对

使用道具 举报

该用户从未签到

12#
发表于 2009-2-20 18:06:34 | 只看该作者
教本里面有没有自己定义过的变量?把变量定义放到globals.h里面去。
回复 支持 反对

使用道具 举报

  • TA的每日心情
    开心
    2016-12-31 10:44
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    11#
    发表于 2009-2-20 17:36:56 | 只看该作者
    你这是第几次录制脚本啊?LR是什么版本的?对了,LR不支持vistart和IE7
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2014-10-24 09:36
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    10#
    发表于 2009-2-20 15:25:28 | 只看该作者
    环境是什么?最好把脚本也贴出来,只给这样的信息,怕是帮不了你
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-9-21 13:33 , Processed in 0.081216 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表