Introducing Microsoft Azure DevTest Labs

image

Hello!

The article will discuss the Microsoft Azure DevTest Labs cloud service . This service allows you to solve the problem of setting up the environment for development, testing and laboratory studies. The laboratory topic is far from me, so I’ll talk about setting up environments for development and automatic testing.

Development environment


Initial statement of the problem: Input data for setting up the development environment are presented in the form of a document with a sequential list of actions. Each action describes the installation of a tool of a given version with subsequent configuration. Example action: install Visual Studio 2017 and set the path to Nuget. If there are several dozen such actions, then the setup procedure turns into an extremely tedious task.

Solution method


1. Open the portal

2. Find the DevTest Labs service in the list of services

3. Create a formula . The formula allows you to set the basic image of the virtual machine, the size of the virtual machine, artifacts for installation, creeds for access.

For example: a basic image with a ten and a studio, the size of Standard_DS2_v2 . Installation artifacts: Chrome, 7zip, Notepad ++.

4. Create a virtual machine using the formula.

5. We start the created virtualka.

6. We go on a virtualka on RDP, using credits for access.

7. We adjust the created virtualka, performing the necessary list of actions from the input data.

8. Stop the virtual machine.

9. Create a custom imagefrom the stopped virtualka.

This completes the process of creating a development environment. With a custom image, we can now quickly raise the required number of development environment instances.

The price of the question: for an eight-hour working day, one Standard_DS2_v2 virtual machine eats about 500 rubles.

Automated Testing Environment


Initial statement of the problem: Automatically create a virtual machine with the necessary environment, launch a virtual machine, remotely run a test script through Powershell, delete a virtual machine.

Solution method


1. We create a custom image of the testing environment by analogy with the development environment.

2. Create a virtual machine using the API . To the custom image, we add the ability to remotely control via Powershell using the windows-winrm artifact.

3. We start the virtual machine using the API .

4. Run the test using the available WinRM.

5. Delete the machine after the test using the API .

conclusions


Due to the convenient UI, a large selection of basic images, available artifacts, and configuration options, the cloud service under consideration perfectly solves the problems of building development / testing environments. The disadvantages of the solution include the cost of cloud services.

References


1. Azure DevTest Labs
2. Azure DevTest Labs API
3. An Overview of Azure DevTest Labs

Also popular now: