51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 10957|回复: 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空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2009-2-19 17:26:18 | 只看该作者
看名字!
回复 支持 反对

使用道具 举报

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

    连续签到: 1 天

    [LV.1]测试小兵

    3#
    发表于 2009-2-19 17:36:54 | 只看该作者
    把那个删了,删了后就可以录制web(http/html)脚本,那个好像是由于另一个协议会用到,好像是 web services
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    4#
    发表于 2009-2-19 20:43:26 | 只看该作者
    For the Web(HTTP/HTML) protocol,

    globals.h is created to contain:

    #ifndef _GLOBALS_H
    #define _GLOBALS_H

    //--------------------------
    // Include Files
    #include "lrun.h"
    #include "web_api.h"
    #include "lrw_custom_body.h"
            // recorded for web_custom_request functions.
    //--------------------------
    // Global Variables

    #endif // _GLOBALS_H

    所以你删除了就可能出现一些问题
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    5#
     楼主| 发表于 2009-2-20 11:16:11 | 只看该作者
    各位老大,我到底是删还是不删啊
    这个globals.h是隐藏文件,我看一些教材上都没提到啊
    回复 支持 反对

    使用道具 举报

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

    连续签到: 1 天

    [LV.1]测试小兵

    6#
    发表于 2009-2-20 13:45:40 | 只看该作者
    一个字----删
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    7#
    发表于 2009-2-20 13:46:38 | 只看该作者
    可以不用管它。只要是不影响测试就行了,你也可以删除试试看,看看会发生什么情况,删除之前做好备份。
    回复 支持 反对

    使用道具 举报

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

    连续签到: 1 天

    [LV.1]测试小兵

    8#
    发表于 2009-2-20 14:03:05 | 只看该作者
    头包含文件
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    9#
     楼主| 发表于 2009-2-20 14:53:04 | 只看该作者
    各位高手,我运行时报错,
    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.
    删掉这个文件之后错误依旧,请大家帮我看看,谢谢!
    我是用web (http/html)协议来录的脚本,录制应该很成功,在回放的时候就出现这个错误,我找了好久,以前也有人遇到过,但是都没有最终的解决方案,拜求各位了,我前天刚刚学LR,不要让我这么受打击啊
    回复 支持 反对

    使用道具 举报

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

    连续签到: 1 天

    [LV.1]测试小兵

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

    使用道具 举报

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

    连续签到: 1 天

    [LV.1]测试小兵

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

    使用道具 举报

    该用户从未签到

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

    使用道具 举报

    该用户从未签到

    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("   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;
    }
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    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("   Logout",
                    "Text=   Logout",
                    "Snapshot=t3.inf",
                    LAST);

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

            return 0;
    }
    回复 支持 反对

    使用道具 举报

    该用户从未签到

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

    使用道具 举报

    该用户从未签到

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

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

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

    使用道具 举报

    该用户从未签到

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

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

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

    使用道具 举报

    该用户从未签到

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

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

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

    使用道具 举报

    该用户从未签到

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

    使用道具 举报

    该用户从未签到

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

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-9-21 15:46 , Processed in 0.087834 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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