Skip to content

Commit 5eead89

Browse files
authored
Merge pull request #178522 from dagiro/Freshness3
Freshness3 - Test your app in Azure
2 parents 34c1d4c + 7569531 commit 5eead89

File tree

9 files changed

+42
-53
lines changed

9 files changed

+42
-53
lines changed
10 KB
Loading
-164 KB
Loading
37.8 KB
Loading
-119 KB
Loading
104 KB
Loading
20.4 KB
Loading
35.1 KB
Loading
25.9 KB
Loading

articles/devtest-labs/test-app-azure.md

Lines changed: 42 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,80 @@
11
---
22
title: How to test your app in Azure
3-
description: Learn how to create a file share in a lab and mount it on your local machine and a virtual machine in the lab, and then deploy desktop/web applications to the file share and test them.
4-
ms.topic: tutorial
5-
ms.date: 06/26/2020
3+
description: Learn how to deploy desktop/web applications to a file share and test them.
4+
ms.topic: how-to
5+
ms.date: 11/03/2021
66
---
77

88
# Test your app in Azure
9-
This article provides steps for testing your application in Azure using DevTest Labs. First, you set up a file share within a lab and mount it as a drive on your local development machine and a VM inside a lab. Then, you use Visual Studio 2019 to deploy your app to the file share so that you can run the app on the VM in the lab.
109

11-
[!INCLUDE [updated-for-az](../../includes/updated-for-az.md)]
10+
In this guide, you'll learn how to test your application in Azure using DevTest Labs. You use Visual Studio to deploy your app to an Azure file share. Then you'll access the share from a lab virtual machine (VM).
1211

13-
## Prerequisites
14-
1. [Create an Azure subscription](https://azure.microsoft.com/free/) if you don't already have one, and sign into [Azure portal](https://portal.azure.com).
15-
2. Follow instructions in [this article](devtest-lab-create-lab.md) to create a lab using Azure DevTest Labs. Pin the lab to your dashboard so that you can easily find it next time you sign in. Azure DevTest Labs enables you to create resources within Azure quickly by minimizing waste and controlling cost. To learn more about DevTest Labs, see [overview](devtest-lab-overview.md).
16-
3. Create an Azure Storage account in the lab's resource group by following instructions in the [Create a storage account](../storage/common/storage-account-create.md) article. On the **Create storage account** page, select **Use existing** for **Resource group**, and select the **lab's resource group**.
17-
4. Create a file share in your Azure storage by following instructions in the [Create a file share in Azure Files](../storage/files/storage-how-to-create-file-share.md) article.
12+
## Prerequisites
1813

19-
## Mount the file share on your local machine
20-
1. On your local machine, use the script from [Mount the Azure file share](../storage/files/storage-how-to-use-files-windows.md#mount-the-azure-file-share) section of [Use an Azure file share with Windows](../storage/files/storage-how-to-use-files-windows.md) article.
21-
2. Then, use `net use` command to mount the file share on your machine. Here is the sample command: Specify your Azure storage name and file share name before running the command.
14+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2215

23-
`net use Z: \\<YOUR AZURE STORAGE NAME>.file.core.windows.net\<YOUR FILE SHARE NAME> /persistent:yes`
16+
- A local workstation with [Visual Studio](https://visualstudio.microsoft.com/free-developer-offers/).
2417

25-
## Create a VM in the lab
26-
1. On the **File share** page, select the **resource group** in the breadcrumb menu at the top. You see the **Resource group** page.
27-
28-
![Select resource group from breadcrumb menu](media/test-app-in-azure/select-resource-group-bread-crump.png)
29-
2. On the **Resource group** page, select the **lab** you created in DevTest Labs.
18+
- A lab in [DevTest Labs](devtest-lab-overview.md).
3019

31-
![Select the lab](media/test-app-in-azure/select-devtest-lab-in-resource-group.png)
32-
3. On the **DevTest Lab** page for your lab, select **+ Add** on the toolbar.
20+
- An [Azure virtual machine](devtest-lab-add-vm.md) running Windows in your lab.
3321

34-
![Add button for the lab](media/test-app-in-azure/add-button-in-lab.png)
35-
4. On the **Choose a base** page, search for **smalldisk**, and select **[smalldisk] Windows Server 2016 Data Center**.
22+
- A [file share](../storage/files/storage-how-to-create-file-share.md) in your lab's existing Azure storage account. A storage account is automatically created with a lab.
3623

37-
![Choose small disk Windows server](media/test-app-in-azure/choose-small-disk-windows-server.png)
38-
5. On the **Virtual machine** page, specify **virtual machine name**, **user name**, **password**, and select **Create**.
39-
40-
![Create virtual machine page](media/test-app-in-azure/create-virtual-machine-page.png)
24+
- The [Azure file share mounted](../storage/files/storage-how-to-use-files-windows.md#mount-the-azure-file-share) to your local workstation and lab VM.
4125

42-
## Mount the file share on your VM
43-
1. After the virtual machine is created successfully, select the **virtual machine** from the list.
26+
## Publish your app from Visual Studio
4427

45-
![Select the lab VM](media/test-app-in-azure/select-lab-vm.png)
46-
2. Select **Connect** on the toolbar to connect to the VM.
47-
3. [Install Azure PowerShell](/powershell/azure/install-az-ps).
48-
4. Follow instructions in the Mount the file share section.
28+
In this section, you publish your app from Visual Studio to your Azure file share.
4929

50-
## Publish your app from Visual Studio
51-
In this section, you publish your app from Visual Studio to a test VM in the cloud.
30+
1. Open Visual Studio, and choose **Create a new project** in the Start window.
31+
32+
:::image type="content" source="./media/test-app-in-azure/launch-visual-studio.png" alt-text="Screenshot of visual studio start page.":::
33+
34+
1. Select **Console Application** and then **Next**.
35+
36+
:::image type="content" source="./media/test-app-in-azure/select-console-application.png" alt-text="Screenshot of option to choose console application.":::
37+
38+
1. On the **Configure your new project** page, leave the defaults, and select **Next**.
5239

53-
1. Create a desktop/web application by using Visual Studio 2019.
54-
2. Build your app.
55-
3. To publish your app, right-click your project in the **Solution Explorer**, and select **Publish**.
56-
4. In the **Publish wizard**, enter the **drive** that's mapped to your file share.
40+
1. On the **Additional information** page, leave the defaults and select **Create**.
5741

58-
**Desktop app:**
42+
1. From **Solution Explorer**, right-click your project and select **Build**.
5943

60-
![Desktop app](media/test-app-in-azure/desktop-app.png)
44+
1. From **Solution Explorer**, right-click your project and select **Publish**.
6145

62-
**Web app:**
46+
:::image type="content" source="./media/test-app-in-azure/publish-application.png" alt-text="Screenshot of option to publish application.":::
6347

64-
![Web app](media/test-app-in-azure/web-app.png)
48+
1. On the **Publish** page, select **Folder** and then **Next**.
6549

66-
1. Select **Next** to complete the publish workflow, and select **Finish**. When you finish the wizard steps, Visual Studio builds your application and publishes it to your file share.
50+
:::image type="content" source="./media/test-app-in-azure/publish-to-folder.png" alt-text="Screenshot of option to publish to folder.":::
6751

52+
1. For the **Specific target** option, select **Folder** and then **Next**.
53+
54+
1. For the **Location** option, select **Browse**, and select the file share you mounted earlier. Then Select **OK**, and then **Finish**.
55+
56+
:::image type="content" source="./media/test-app-in-azure/selecting-file-share.png" alt-text="Screenshot of option to select file share.":::
57+
58+
1. Select **Publish**. Visual Studio builds your application and publishes it to your file share.
59+
60+
:::image type="content" source="./media/test-app-in-azure/final-publish.png" alt-text="Screenshot of publish button.":::
6861

6962
## Test the app on your test VM in the lab
7063

71-
1. Navigate to the virtual machine page for your VM in the lab.
72-
2. Select **Start** on the toolbar to start the VM if it's in stopped state. You can set up auto-start and auto-shutdown policies for your VM to avoid starting and stopping each time.
73-
3. Select **Connect**.
64+
1. Connect to your lab virtual machine.
7465

75-
![Virtual machine page](media/test-app-in-azure/virtual-machine-page.png)
76-
4. Within the virtual machine, launch **File Explorer**, and select **This PC** to find your file share.
66+
1. Within the virtual machine, launch **File Explorer**, and select **This PC** to find the file share you mounted earlier.
7767

78-
![Find share on VM](media/test-app-in-azure/find-share-on-vm.png)
68+
:::image type="content" source="./media/test-app-in-azure/find-share-on-vm.png" alt-text="Screenshot of file explorer.":::
7969

80-
> [!NOTE]
81-
> For any reason, if you are unable to find your file share on your virtual machine or on your local machine, you can remount it by running the `net use` command. You can find the `net use` command on the **Connect** Wizard of your **File Share** in the Azure portal.
8270
1. Open the file share and confirm that you see the app you deployed from Visual Studio.
8371

84-
![Open share on VM](media/test-app-in-azure/open-file-share.png)
72+
:::image type="content" source="./media/test-app-in-azure/open-file-share.png" alt-text="Screenshot of contents of file share.":::
8573

8674
You can now access and test your app within the test VM you created in Azure.
8775

8876
## Next steps
77+
8978
See the following articles to learn how to use VMs in a lab.
9079

9180
- [Add a VM to a lab](devtest-lab-add-vm.md)

0 commit comments

Comments
 (0)