51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 8766|回复: 32
打印 上一主题 下一主题

[原创] 用LR录制SharePoint上的Web操作,回放失败,应如何解决?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2004-12-31 16:47:54 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请问:我用LR录制SharePoint架构上的Web操作,录制表单操作,保存时,LR提示要做关联.我选择关联到脚本中,但是在回放时,就出现操作失败,请问我应该如何处理啊?失败时它的执行日志里写的是:
Action.c(7): 错误 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");          [MsgId: MERR-26547]
Action.c(7): 错误 -26630: 对于“http://fwq/personal/yongh/Lists/Test/AllItems.aspx”,HTTP 状态代码=401 (Unauthorized)          [MsgId: MERR-26630]
Action.c(7): 警告 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");          [MsgId: MWAR-26547]
Action.c(7): 警告 -26630: 对于“http://fwq/_layouts/images/topgrad.gif”,HTTP 状态代码=401 (Unauthorized)          [MsgId: MWAR-26630]
Action.c(7): 警告 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");          [MsgId: MWAR-26547]
Action.c(7): 警告 -26630: 对于“http://fwq/_layouts/images/dot_ruleper.gif”,HTTP 状态代码=401 (Unauthorized)          [MsgId: MWAR-26630]
Action.c(7): 警告 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");          [MsgId: MWAR-26547]
Action.c(7): 警告 -26630: 对于“http://fwq/_layouts/images/mysitebg.gif”,HTTP 状态代码=401 (Unauthorized)          [MsgId: MWAR-26630]
Action.c(7): 警告 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");          [MsgId: MWAR-26547]
Action.c(7): 警告 -26630: 对于“http://fwq/_layouts/images/toolgrad.gif”,HTTP 状态代码=401 (Unauthorized)          [MsgId: MWAR-26630]
Action.c(7): 警告 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");          [MsgId: MWAR-26547]
Action.c(7): 警告 -26630: 对于“http://fwq/_layouts/images/imnhdr.gif”,HTTP 状态代码=401 (Unauthorized)          [MsgId: MWAR-26630]
Action.c(7): web_url 最高严重级别为“ERROR”,9936 个正文字节,1536 个标头字节          [MsgId: MMSG-27178]

[ Last edited by Apostle on 2005-2-1 at 15:00 ]
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏

该用户从未签到

2#
 楼主| 发表于 2004-12-31 16:53:50 | 只看该作者
它的那个身份认证应该如何做啊,能详细说明一下吗?
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2005-1-17 16:40:52 | 只看该作者
55555......
那个高手可以说一下吗,点解没人有反应?
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2005-1-17 18:09:40 | 只看该作者
现在用SharePoint做的Web很多吗?这个好像是微软的新产品
回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2005-1-18 10:38:06 | 只看该作者
LoadRunner supports the following types of user authentication:

Basic
NTLM
Digest
When a Web server requests Basic authentication, VuGen automatically inserts a web_set_user function with the recorded arguments into the script.

However, when the Web server demands the more secure NTLM or Digest authentication, VuGen is unable to insert the required information. If it could, these methods would not be secure. In these two cases, you must manually insert web_set_user into the script, including user and password information, to authenticate the Vuser to the Web server.

With NTLM authentication, you must prepend the domain name and a double backslash to the user name: "[domain_name]\\[username]". For example:

web_set_user("spark\\peter", "XYZ", "spark:80");
回复 支持 反对

使用道具 举报

该用户从未签到

6#
发表于 2005-1-18 10:39:15 | 只看该作者

Example: web_set_user

Example 1

The following function was recorded by VuGen when a user logged on to the server called mansfield, using the standard HTTP port:

C Language

web_set_user("mercury","mercury","mansfield:80");

Java and Java Script

lrapi.web.set_user("mercury","mercury","mansfield:80");

Visual Basic and VB Script

web.set_user "mercury","mercury","mansfield:80"

Example 2

In the following example, the web_set_user function specifies a login string for user "Private1" using the password "secret":

C Language

web_set_user("Private1", "secret", "www.myhost.com:8080");

Java and Java Script

lrapi.web.set_user("Private1", "secret", "www.myhost.com:8080");

Visual Basic and VB Script

web.set_user "Private1", "secret", "www.myhost.com:8080"

Example 3

The following example was inserted manually by the user into the script as the Web server "mansfield" uses NTLM authentication. VuGen cannot record NTLM or Digest authentication. Note that for NTLM authentication the domain name "mansfield" followed by a double backslash must be prepended to the user name:

C Language

web_set_user("mansfield\\freddy", "XYZ", "mansfield:80");

Java and Java Script

lrapi.web.set_user("mansfield\\freddy", "XYZ", "mansfield:80");

Visual Basic and VB Script

web.set_user "mansfield\\freddy", "XYZ", "mansfield:80"
回复 支持 反对

使用道具 举报

该用户从未签到

7#
发表于 2005-1-18 13:31:41 | 只看该作者
楼上的到底想表达什么观点呀?
回复 支持 反对

使用道具 举报

该用户从未签到

8#
发表于 2005-1-18 15:57:37 | 只看该作者
能不能更详细一点,遇到同样问题,急。
请各位高手帮忙

错误提示如下:
Action1.c(10): Error: DOMAIN\user and password needed for NTLM authentication
Action1.c(10): Error: HTTP Status-Code=401 (Unauthorized) for "http://218.106.186.67/sirsln/web/"
Action1.c(10): web_url highest severity level was "ERROR", 26496 body bytes, 4224 header bytes
Action1.c(10): Notify Transaction start ended with Fail status (Duration: 0.3281).

录制的脚本(其实就录制了一个用户登录,结果这个DOMAIN\user and password needed for NTLM authentication)

#include "as_web.h"

Action1()
{
        web_url("web",
                "URL=http://218.106.186.67/sirsln/web/",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=Images/line_dark.gif", ENDITEM,
                "Url=Images/arrows.gif", ENDITEM,
                "Url=Images/line.gif", ENDITEM,
                LAST);


        return 0;
}
不知道该把web_set_user("manager", "manager", "218.106.186.67/sirsln/web:80");(域可为空)这一句加在那里,其他的地方要不要修改?怎样修改?
回复 支持 反对

使用道具 举报

该用户从未签到

9#
发表于 2005-1-18 16:00:19 | 只看该作者
能不能更详细一点,遇到同样问题,急。
请各位高手帮忙

错误提示如下:
Action1.c(10): Error: DOMAIN\user and password needed for NTLM authentication
Action1.c(10): Error: HTTP Status-Code=401 (Unauthorized) for "http://218.106.186.67/sirsln/web/"
Action1.c(10): web_url highest severity level was "ERROR", 26496 body bytes, 4224 header bytes
Action1.c(10): Notify Transaction start ended with Fail status (Duration: 0.3281).

录制的脚本(其实就录制了一个用户登录,结果这个DOMAIN\user and password needed for NTLM authentication)

#include "as_web.h"

Action1()
{
        web_url("web",
                "URL=http://218.106.186.67/sirsln/web/",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=Images/line_dark.gif", ENDITEM,
                "Url=Images/arrows.gif", ENDITEM,
                "Url=Images/line.gif", ENDITEM,
                LAST);


        return 0;
}
不知道该把web_set_user("manager", "manager", "218.106.186.67/sirsln/web:80");(域可为空)这一句加在那里,其他的地方要不要修改?怎样修改?
回复 支持 反对

使用道具 举报

该用户从未签到

10#
发表于 2005-1-18 17:31:49 | 只看该作者
回复 支持 反对

使用道具 举报

该用户从未签到

11#
发表于 2005-1-18 18:18:27 | 只看该作者
用户名是manager,密码是manager吗?
回复 支持 反对

使用道具 举报

该用户从未签到

12#
发表于 2005-1-19 09:51:49 | 只看该作者
感谢回复!
是的用户名密码都为manager,加了域名还是不成。
#include "as_web.h"

Action1()
{
        web_set_user("arron\\manager", "manager", "218.106.186.67/sirsln/web:80");
        web_url("web",
                "URL=http://218.106.186.67/sirsln/web/",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=Images/line_dark.gif", ENDITEM,
                "Url=Images/arrows.gif", ENDITEM,
                "Url=Images/line.gif", ENDITEM,
                LAST);


        return 0;
}

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

x
回复 支持 反对

使用道具 举报

该用户从未签到

13#
发表于 2005-1-19 10:17:19 | 只看该作者
关注一下
回复 支持 反对

使用道具 举报

该用户从未签到

14#
发表于 2005-1-19 18:29:49 | 只看该作者
这个不就是一般的登陆输入用户名和密码吗?直接录制,自动生成脚本,不可以的吗?不用去后期修改脚本
回复 支持 反对

使用道具 举报

该用户从未签到

15#
发表于 2005-1-19 18:38:22 | 只看该作者
试过了,有难度,请版主过来看看吧
回复 支持 反对

使用道具 举报

该用户从未签到

16#
发表于 2005-1-20 09:14:19 | 只看该作者
版主救命啊!!!
回复 支持 反对

使用道具 举报

该用户从未签到

17#
发表于 2005-1-20 16:32:11 | 只看该作者
我不是版主不知道过来看看会不会被扁一顿阿?
回复 支持 反对

使用道具 举报

该用户从未签到

18#
 楼主| 发表于 2005-2-1 15:12:03 | 只看该作者
版主请来看看,这里有很多迷途羔羊啊!
回复 支持 反对

使用道具 举报

该用户从未签到

19#
发表于 2005-2-1 15:19:37 | 只看该作者

你的第一行语句:web:80!

是不是这里的问题?将第一行的"218.106.186.67/sirsln/web:80");去掉,试一下?这个事你手公家的代码吧!
回复 支持 反对

使用道具 举报

该用户从未签到

20#
发表于 2005-2-1 16:10:09 | 只看该作者
在runtime setting里将代理类型设置为第二项
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-9-21 02:45 , Processed in 0.074423 second(s), 26 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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