Apostle 发表于 2004-12-31 16:47:54

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

请问:我用LR录制SharePoint架构上的Web操作,录制表单操作,保存时,LR提示要做关联.我选择关联到脚本中,但是在回放时,就出现操作失败,请问我应该如何处理啊?失败时它的执行日志里写的是:
Action.c(7): 错误 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");       
Action.c(7): 错误 -26630: 对于“http://fwq/personal/yongh/Lists/Test/AllItems.aspx”,HTTP 状态代码=401 (Unauthorized)       
Action.c(7): 警告 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");       
Action.c(7): 警告 -26630: 对于“http://fwq/_layouts/images/topgrad.gif”,HTTP 状态代码=401 (Unauthorized)       
Action.c(7): 警告 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");       
Action.c(7): 警告 -26630: 对于“http://fwq/_layouts/images/dot_ruleper.gif”,HTTP 状态代码=401 (Unauthorized)       
Action.c(7): 警告 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");       
Action.c(7): 警告 -26630: 对于“http://fwq/_layouts/images/mysitebg.gif”,HTTP 状态代码=401 (Unauthorized)       
Action.c(7): 警告 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");       
Action.c(7): 警告 -26630: 对于“http://fwq/_layouts/images/toolgrad.gif”,HTTP 状态代码=401 (Unauthorized)       
Action.c(7): 警告 -26547: 需要身份验证,请使用 web_set_user,例如 web_set_user("Domain\\user", "password", "host:port");       
Action.c(7): 警告 -26630: 对于“http://fwq/_layouts/images/imnhdr.gif”,HTTP 状态代码=401 (Unauthorized)       
Action.c(7): web_url 最高严重级别为“ERROR”,9936 个正文字节,1536 个标头字节       

[ Last edited by Apostle on 2005-2-1 at 15:00 ]

Apostle 发表于 2004-12-31 16:53:50

它的那个身份认证应该如何做啊,能详细说明一下吗?

Apostle 发表于 2005-1-17 16:40:52

55555......
那个高手可以说一下吗,点解没人有反应?

computercat 发表于 2005-1-17 18:09:40

现在用SharePoint做的Web很多吗?这个好像是微软的新产品

吱吱 发表于 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: "\\". For example:

web_set_user("spark\\peter", "XYZ", "spark:80");

吱吱 发表于 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"

computercat 发表于 2005-1-18 13:31:41

楼上的到底想表达什么观点呀?

st 发表于 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");(域可为空)这一句加在那里,其他的地方要不要修改?怎样修改?

st 发表于 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");(域可为空)这一句加在那里,其他的地方要不要修改?怎样修改?

st 发表于 2005-1-18 17:31:49

computercat 发表于 2005-1-18 18:18:27

用户名是manager,密码是manager吗?

st 发表于 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;
}

guirongb 发表于 2005-1-19 10:17:19

关注一下

computercat 发表于 2005-1-19 18:29:49

这个不就是一般的登陆输入用户名和密码吗?直接录制,自动生成脚本,不可以的吗?不用去后期修改脚本

computercat 发表于 2005-1-19 18:38:22

试过了,有难度,请版主过来看看吧

st 发表于 2005-1-20 09:14:19

版主救命啊!!!

happy19780921 发表于 2005-1-20 16:32:11

我不是版主不知道过来看看会不会被扁一顿阿?

Apostle 发表于 2005-2-1 15:12:03

版主请来看看,这里有很多迷途羔羊啊!

baitest 发表于 2005-2-1 15:19:37

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

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

bxue 发表于 2005-2-1 16:10:09

在runtime setting里将代理类型设置为第二项
页: [1] 2
查看完整版本: 用LR录制SharePoint上的Web操作,回放失败,应如何解决?