Web性能测试:SignalR-无法识别的用户身份 [英] Web Performance Test: SignalR - Unrecognized user identity

查看:188
本文介绍了Web性能测试:SignalR-无法识别的用户身份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Visual Studio运行记录的Web测试时,初始化信号器连接会触发错误.

When running a recorded Web Test using Visual Studio, initializing the signalr connection triggers the error.

无法识别的用户身份.用户身份在更改期间无法更改 有效的SignalR连接.

Unrecognized user identity. The user identity cannot change during an active SignalR connection.

请求:

GET /Computer/signalr/connect?
transport=foreverFrame&
connectionToken=xxx&
connectionData=yyy&
tid=7&
frameId=1 HTTP/1.1

User-Agent : Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Accept : */*
Accept-Language : en-GB
Accept-Encoding : GZIP
Host : test.host.com
Cookie : __RequestVerificationToken_L01XTS1NYXN0ZXI1=YCuMgJ7WD6QNtHnUvgM4EFvVJ5lllR477xjaMAzFogypdqXEFV054ygGy0Spnqwo3LJDbDHyzGudF8QdTRZW30zcBHGh8oI7CEj2L0k01Eg1

响应:

HTTP/1.1 403 Forbidden
Pragma : no-cache
Transfer-Encoding : chunked
X-Content-Type-Options : nosniff
Cache-Control : no-cache
Content-Type : text/html
Date : Wed, 03 Sep 2014 13:42:03 GMT
Expires : -1

更新:

问题似乎在于用户状态的更改与活动连接之间的协调.

Looks like the problem is reconciling a change in user status with an active connection.

如果在存在活动连接的情况下用户的身份验证状态发生更改,则该用户将收到一条错误消息,指出 在活动SignalR连接期间用户身份无法更改."

If a user's authentication status changes while an active connection exists, the user will receive an error that states, "The user identity cannot change during an active SignalR connection."

在这种情况下,您的应用程序应重新连接到服务器,以确保连接ID和用户名一致.

In that case, your application should re-connect to the server to make sure the connection id and username are coordinated.

不确定在网络测试期间如何协调用户名和连接ID.

Not sure how to coordinate the username and connection id during the webtest.

推荐答案

我怀疑尚未处理的动态参数,因此在执行测试时传递了记录测试时服务器提供的值.然后,服务器将检测到请求正在传递意外值(即旧值)并创建该消息.

I would suspect a dynamic parameter that has not been handled so a value provided by the server when test was recorded is being passed when the test is executed. The server is then detecting that a request is passing an unexpected value (ie the old value) and creating that message.

有几个网页提供有关调试Web性能测试的建议.一种技术是记录两个尽可能相同的测试版本.然后,使用文本比较程序来比较两个".webtest"文件.有时会记录以其他用户身份登录的第三个测试,但在其他方面则尽可能与其他两个测试相同.然后将第三个".webtest"与其他的进行比较.希望该比较将指示一个或多个以前未记录的动态参数.

There are several web pages giving advice on debugging web performance tests. One technique is to record two versions of the test that are, as nearly as possible, identical. Then use a text comparison program to compare the two ".webtest" file. Sometimes recording a third test that logs in as a different user but otherwise is as nearly as possible identical to the other two test. Then comparing this third ".webtest" against the others. The comparison will, hopefully, indicate one or more dynamic parameters that had not previously been noted.

这篇关于Web性能测试:SignalR-无法识别的用户身份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆