问题描述
我正在尝试使用Oauth2身份验证为azure Web应用程序创建webtest。当我尝试录制网络测试并播放网络测试失败并出现验证问题,例如&bbsp; b
$ b以下,b
$ b<< WebApplication>> .azurewebsites.net / ---- {POST}在测试环境中找不到上下文参数$ HIDDEN1.code
ValidateResponseUrl错误
<< WebApplication>> .azurewebsites.net / ---- {GET} expectedresponseUrl属性的值login.microsoftonline.com/common/oauth2/authorize--- - {POST}不等于实际回复
<< WebApplication>> .azurewebsites.net / querystring参数被忽略。
我们可以从中进行身份验证,因此重新运行时会重定向到登录页面。是否有任何webtest插件指南或解决方法来处理这些具有Oauth2身份验证的b $ b $
申请?
注意:我可以为用户获取身份验证令牌并注入请求。但Oauth2需要更多参数,代码,范围,会话等进行身份验证,而不仅仅是令牌。
先谢谢。任何关于此的指针都会有所帮助
Hi,
I was trying to create a webtest for azure web application with Oauth2 authentication. When I tried with recording a webtest and play back the webtest fails with authetication issues like
below,
<<WebApplication>>.azurewebsites.net/----{POST} Context parameter $HIDDEN1.code not found in test context
ValidateResponseUrl errors
<<WebApplication>>.azurewebsites.net/----{GET} The value of the expectedresponseUrl property login.microsoftonline.com/common/oauth2/authorize----{POST} does not equal the actual response
<<WebApplication>>.azurewebsites.net/ querystring parameters were ignored.
from which we can make out authentication is not happening and hence its redirecting to login page upon rerun. Is there any webtest plugin guidence or workaround for dealing with these
applications with Oauth2 authentications?
Note: I can fetch authentication token for a user and inject in the request. But Oauth2 requires more parameters, code, scope, session etc. for authentication than just token
Thanks in advance. any pointers on this will be helpful
这篇关于使用Oauth2身份验证的Azure Web应用程序的Visual Studio Webtest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!