简体   繁体   English

Visual Studio 2017 WebTest使用Azure Active Directory(AAD)对Azure Web App进行身份验证

[英]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.

相关问题 如何在Visual Studio 2017中将调试器附加到Azure Web应用程序? - How do I attach the debugger to an Azure web app in Visual Studio 2017? Visual Studio 2017 Professional中的WebTest项目 - WebTest Project in Visual studio 2017 professional Visual Studio 2017 - 无法创建Azure功能应用程序 - Visual Studio 2017 - can't create an Azure Function app 使用Azure Active Directory身份验证通过Visual Studio将应用程序发布到Azure Service Fabric(Azure Gov) - Publishing an application via Visual Studio to Azure Service Fabric (Azure Gov) with Azure Active Directory Authentication 无法在Visual Studio 2017中建立Azure功能 - Not able to build Azure functions in Visual Studio 2017 天蓝色功能Visual Studio 2017 15.3错误 - azure functions visual studio 2017 15.3 error 使用Visual Studio 2017的Azure数据工厂项目 - Azure Data Factory project with Visual Studio 2017 如何将已发布的Web应用程序从Azure导入到Visual Studio for Web - How to import a published Web app from azure to visual studio for web 无法在Visual Studio 2017中进行身份验证 - Cannot authenticate in Visual Studio 2017 无法使用 Visual Studio 2019 部署我的 Azure Web 应用程序 - Unable to deploy my Azure Web App using visual studio 2019
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM