Ensuring Unattended Web Tests for Azure Web App Authentication

Configure Unattended Web Tests for Azure Web App Authentication

Question

You company has an Azure subscription named Sub1. Sub1 contains an Azure web app named WebApp1 that uses Azure Application Insights. WebApp1 requires users to authenticate by using OAuth 2.0 client secrets.

Developers at the company plan to create a multi-step web test app that preforms synthetic transactions emulating user traffic to Web App1.

You need to ensure that web tests can run unattended.

What should you do first?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B

To ensure that the web tests can run unattended, you need to authenticate the multi-step web test app using OAuth 2.0 client secrets. Here are the steps you should follow:

  1. Register the web test app in Azure AD To register the web test app in Azure AD, you need to create a new application registration in Azure AD and grant it the necessary permissions. Follow these steps:
  • In the Azure portal, go to Azure Active Directory > App registrations.
  • Click on New registration and provide a name for the registration.
  • Set the supported account types to "Accounts in any organizational directory and personal Microsoft accounts".
  • In the Redirect URI section, add a new URI that points to the WebApp1 endpoint that you want to test.
  • Click on Register to create the application registration.
  • Once the application registration is created, go to the Certificates & secrets section and create a new client secret.
  • Note down the client secret value, as you will need it later.
  1. Modify the .webtest file You can modify the .webtest file using Microsoft Visual Studio to add the necessary authentication details for the web test app. Follow these steps:
  • Open Microsoft Visual Studio and load the .webtest file.
  • In the Solution Explorer, right-click on the .webtest file and select Properties.
  • In the Properties pane, expand the Authentication section and select OAuth 2.0 client secrets.
  • In the OAuth 2.0 client secrets section, enter the Client ID and Client Secret values that you obtained from the Azure AD application registration.
  • Save the changes to the .webtest file.
  1. Upload the .webtest file to Application Insights You can upload the .webtest file to Application Insights to schedule and run the web tests. Follow these steps:
  • In the Azure portal, go to your Application Insights resource.
  • Click on the Tests menu and select Web tests.
  • Click on the Add button to create a new web test.
  • Provide a name for the web test and select the .webtest file that you modified in step 2.
  • Configure the test frequency, location, and other settings as required.
  • Save the changes to create the web test.
  1. Add a plug-in to the web test app You can add a plug-in to the web test app to extend its functionality or customize its behavior. This may or may not be necessary depending on the requirements of your test scenario.

In summary, the correct answer is C. Register the web test app in Azure AD. This is the first step you need to take to authenticate the web test app using OAuth 2.0 client secrets. Once you have done this, you can modify the .webtest file, upload it to Application Insights, and optionally add a plug-in to the web test app.