[英]Visual Studio 2017 WebTest authenticate Azure Web App with Azure Active Directory (AAD)
I have an Azure Web App that uses Azure Active Directory to authenticate. 我有一个使用Azure Active Directory进行身份验证的Azure Web应用程序。 I want to create a webtest that logs in and then performs some actions (testing pages basically).
我想创建一个登录并执行一些操作的Webtest(基本上是测试页面)。
What's the "correct" way to achieve this? 实现此目的的“正确”方法是什么? After I record the test, when executing it again it doesn't authenticate correctly.
记录测试后,再次执行测试时,认证不正确。 If I modify the webtest and pass the authentication cookie manually, it expires after a couple of days.
如果我修改了webtest并手动通过了身份验证cookie,则它会在几天后过期。
The issue was when recording the test there were some credential cached in the browser, and replaying the test didn't have all the requests it needed to reauthenticate. 问题是在记录测试时,浏览器中缓存了一些凭据,并且重放测试并没有重新验证所需的所有请求。
We had to clear the browser cache before recording the test. 在记录测试之前,我们必须清除浏览器缓存。 That way all the request needed to "replay" the authentication were recorded, and the web test worked correctly.
这样,就记录了“重播”身份验证所需的所有请求,并且Web测试正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.