1
votes

I have an Azure Web App that uses Azure Active Directory to authenticate. I want to create a webtest that logs in and then performs some actions (testing pages basically).

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.

1
The values in the cookie must have been passed in an earlier response. Just extract them and build the cookie value. You may need to clear the browser caches etc before recording the test to ensure that new values are sent to the browser.AdrianHHH
@AdrianHHH yes we figured it out yesterday. Before recording we cleared the browser cache. ThanksChristian Rodriguez

1 Answers

0
votes

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.