Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ccc030d

Browse files
committedNov 3, 2021
Freshness3
1 parent 76f72bf commit ccc030d

File tree

9 files changed

+39
-52
lines changed

9 files changed

+39
-52
lines changed
 
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

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

Lines changed: 39 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +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: 11/02/2021
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).
11+
12+
## Prerequisites
1213

13-
## Prerequisites
1414
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
1515

16-
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+
- A local workstation with [Visual Studio](https://visualstudio.microsoft.com/free-developer-offers/).
1717

18-
1. 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**.
19-
1. 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.
18+
- A lab in [DevTest Labs](devtest-lab-overview.md).
2019

21-
## Mount the file share on your local machine
22-
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.
23-
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.
20+
- An [Azure virtual machine](devtest-lab-add-vm.md) running Windows in your lab.
2421

25-
`net use Z: \\<YOUR AZURE STORAGE NAME>.file.core.windows.net\<YOUR FILE SHARE NAME> /persistent:yes`
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.
2623

27-
## Create a VM in the lab
28-
1. On the **File share** page, select the **resource group** in the breadcrumb menu at the top. You see the **Resource group** page.
29-
30-
![Select resource group from breadcrumb menu](media/test-app-in-azure/select-resource-group-bread-crump.png)
31-
2. On the **Resource group** page, select the **lab** you created in DevTest Labs.
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.
3225

33-
![Select the lab](media/test-app-in-azure/select-devtest-lab-in-resource-group.png)
34-
3. On the **DevTest Lab** page for your lab, select **+ Add** on the toolbar.
26+
## Publish your app from Visual Studio
3527

36-
![Add button for the lab](media/test-app-in-azure/add-button-in-lab.png)
37-
4. On the **Choose a base** page, search for **smalldisk**, and select **[smalldisk] Windows Server 2016 Data Center**.
28+
In this section, you publish your app from Visual Studio to your Azure file share.
3829

39-
![Choose small disk Windows server](media/test-app-in-azure/choose-small-disk-windows-server.png)
40-
5. On the **Virtual machine** page, specify **virtual machine name**, **user name**, **password**, and select **Create**.
41-
42-
![Create virtual machine page](media/test-app-in-azure/create-virtual-machine-page.png)
30+
1. Open Visual Studio, and choose **Create a new project** in the Start window.
4331

44-
## Mount the file share on your VM
45-
1. After the virtual machine is created successfully, select the **virtual machine** from the list.
32+
:::image type="content" source="./media/test-app-in-azure/launch-visual-studio.png" alt-text="Screenshot of visual studio start page.":::
4633

47-
![Select the lab VM](media/test-app-in-azure/select-lab-vm.png)
48-
2. Select **Connect** on the toolbar to connect to the VM.
49-
3. [Install Azure PowerShell](/powershell/azure/install-az-ps).
50-
4. Follow instructions in the Mount the file share section.
34+
1. Select **Console Application** and then **Next**.
5135

52-
## Publish your app from Visual Studio
53-
In this section, you publish your app from Visual Studio to a test VM in the cloud.
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**.
39+
40+
1. On the **Additional information** page, leave the defaults and select **Create**.
5441

55-
1. Create a desktop/web application by using Visual Studio 2019.
56-
2. Build your app.
57-
3. To publish your app, right-click your project in the **Solution Explorer**, and select **Publish**.
58-
4. In the **Publish wizard**, enter the **drive** that's mapped to your file share.
42+
1. From **Solution Explorer**, right-click your project and select **Build**.
5943

60-
**Desktop app:**
44+
1. From **Solution Explorer**, right-click your project and select **Publish**
6145

62-
![Desktop app](media/test-app-in-azure/desktop-app.png)
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:**
48+
1. On the **Publish** page, select **Folder** and then **Next**.
6549

66-
![Web app](media/test-app-in-azure/web-app.png)
50+
:::image type="content" source="./media/test-app-in-azure/publish-to-folder.png" alt-text="Screenshot of option to publish to folder.":::
6751

68-
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.
52+
1. For the **Specific target** option, select **Folder** and then **Next**.
6953

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 option to select file share.":::
7061

7162
## Test the app on your test VM in the lab
7263

73-
1. Navigate to the virtual machine page for your VM in the lab.
74-
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.
75-
3. Select **Connect**.
64+
1. Connect to your lab virtual machine.
7665

77-
![Virtual machine page](media/test-app-in-azure/virtual-machine-page.png)
78-
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.
7967

80-
![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.":::
8169

82-
> [!NOTE]
83-
> 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.
8470
1. Open the file share and confirm that you see the app you deployed from Visual Studio.
8571

86-
![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.":::
8773

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

9076
## Next steps
77+
9178
See the following articles to learn how to use VMs in a lab.
9279

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

0 commit comments

Comments
 (0)
Please sign in to comment.