Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Azure DevOps Build Pipelines: Run Windows UI Automation & CI
Rating: 4.5 out of 5(87 ratings)
2,002 students

Azure DevOps Build Pipelines: Run Windows UI Automation & CI

Learn Azure DevOps Pipelines (incl. YAML) on Azure Git Repos to run WinAppdriver Windows Test Automation in C# .Net
Created byNaeem Akram
Last updated 8/2020
English
GermanEnglish

What you'll learn

  • Azure DevOps Build Pipelines for UI Test Automation
  • Azure Git Repos & TFSVC
  • Azure Pipelines
  • Using CI on Azure DevOps to test Windows applications with Appium WinAppDriver
  • Appium WinAppDriver, C#, Azure DevOps Pipelines, YAML Pipelines on Azure DevOps, QA, Test Automation, Automation, CI/CD, Windows APplication Driver

Course content

4 sections18 lectures1h 29m total length
  • Course Outline - What to expect from this course6:56

    In this course we learn how to run automated testing scripts for testing Windows applications through Microsoft Azure DevOps.

    We are going to use the build pipelines and repos features specifically.

    The example scripts are created in C# .Net using Appium API and WinAppDriver which is a UI automation tool based on Appium.

    Microsoft Azure DevOps is Microsoft’s cloud based offering for DevOps.

    It is based on Team Foundation Server or TFS.

    Microsoft Azure DevOps provides us with a complete solution for storing our test scripts and running them on a test machine through Visual Studio Build Tools.

    You don’t need the paid version of Microsoft Azure DevOps right off the bat. Up to five users can collaborate through the free version and do everything shown in this course.

    I highly recommend that you practice the things shown in the course as you go, to make most out of the course.


    The requirements of running WinAppDriver based automation on a PC are pretty simple.


    First of all, you need to have a Windows 10 PC.

    Home, Pro, or Enterprise. Any version will do.

    We are going to use Windows 10 Pro in this course.

    You must have Windows 10 Developer mode enabled on the machine.

    In this course, I will use two different machines.

    First one will be the “test machine” which will run our test automation scripts.

    Second will be the “developer machine” which will be used to edit our test automation scripts.

    Please note that ready to use test automation scripts are also provided with this course which you can download from the resources section of appropriate videos of this course.

    It is possible to use one machine for both roles, you may do it for practice purposes.


    That’s not the way it works in the real world, but still if you’re a lazy person like myself then you can continue doing it.


    I have created a test machine using a Windows 10 Pro vm, which is running on my PC through Microsoft Hyper V.

    Same steps can also be performed on an Azure VM too.


    We are going to install all the tools needed to get the job done and set them up properly.

    Afterwards we’ll do some setup on the Azure DevOps side.

    We are going to use the developer machine to upload the sample test automation code provided with this course to an Azure DevOps source code repository.

    We’ll then create a build pipeline.

    And then we’re going to run the pipeline through the browser.

    Please note that we’ll also install and setup an Azure DevOps agent on the test machine.

    The Azure DevOps server is going to tell this agent to run the build pipeline.

    As a response, the build will fire up the Visual Studio build tools.

    It’s this process which will run the test automation scripts through a special task which will be explained in the course later on.


    Let’s talk tools specifically.


    On the testing machine, you will need the software listed on screen to be installed to run test automation.

    These are

    Test machine:

    1. Visual Studio Build Tools 2019

    2. Windows Application Driver

    3. Azure DevOps Agent

    4. Application under test

    5. <Don’t list this on screen but tell about it>Windows 10 Developer Mode enabled

    Notice that you don’t need Visual Studio, all you need is Visual Studio Build Tools.


    The Developer Machine will need a different set of software to be installed.

    It will include the following to author your automation scripts.

    Developer machine:

    1. Visual Studio 2019 with .Net Desktop Development workload

    2. Windows 10 Developer Mode enabled

    3. Git support through Visual Studio(Installed by default)


    Of course if you want to run the scripts on the same machine, you’ll need to have WinAppDriver installed as well.


    Then we’ll move over to the Azure DevOps Cloud.

    You’ll need to following on Azure DevOps side

    1. A free Azure DevOps account(if you have a paid account, that’s also cool)

    2. A few organizations on Azure DevOps, which are free.

    3. A TFVC based source code repository on Azure DevOps

    4. A Pipeline based on the TFVC based source code repository on Azure DevOps

    5. An Azure Git based repository on Azure DevOps

    6. A Git repo based Pipeline on Azure DevOps


    A list of tools mentioned above is also available in a pdf format, it can be downloaded from the resources section of this video.

    Please don’t be afraid of the process I just described or the list of tools, I’m going to show you how to do all of this in this course.

    Now let’s move on to the next video.


  • Enable Windows 10 Developer Mode to run WinAppDriver Automation1:48

    For the purpose of this course, I have installed Windows 10 Pro on a Virtual Machine.

    I’m using Microsoft Hyper-V.

    Same thing can be done on an Azure cloud VM.

    Enabling Windows 10 developer mode is essential for running WinAppDriver based test automation.

    Let’s enable the feature through Settings.

    I’ll right click the Windows button and select “Settings”

    Over here I’ll search for the word “Developer”

    I’ll click the option “Developer Settings”

    And I’m going to click the option “Developer Mode” from here.

    A popup will show and I’ll click “Yes” without reading it, as usual.

    The feature will be enabled in a few seconds.

    That’s it for this video, see you in the next one.


  • Installing Visual Studio Build Tools on Your Test Machine3:28

    The next step in preparing our test machine is to install Visual Studio Build tools.

    I’ve opened the VM which I am setting up as my test machine.

    Let’s open the browser and search for Visual Studio Build Tools.

    I’ll click this link here.

    On the Visual Studio website I’ll scroll down and expand “Tools for Visual Studio 2019”.

    Over here I’ll download “Build Tools for Visual Studio 2019”.

    The text will change in the future when a newer version of Visual Studio will launch, which you might adjust accordingly.


    Once the download is finished, I’ll run the installer.

    I’m going to click “Continue” here.

    The workloads which we need to install are important.


    In the “Workloads” section I’ll select “.Net desktop build tools” and I’ select several versions of .Net framework.

    The example which we’ll be using in this course is built with .Net Framework 4.5 so I’ll make sure we install build tools for it.

    You too should keep the same thing in mind.

    Now I’m going to click the “Install” button.

    The installation is going to finish in a few minutes.

    After this we’ll be good to proceed further.


  • Installing and testing WinAppDriver on a Testing Machine4:37

    In this video we will install WinAppDriver on our test machine.

    I hope you have already enabled Windows 10 developer mode.

    If no then please go ahead and do it.


    Before we proceed to download and install WinAppDriver, you may go to the resources section of this lecture and download the zip file named CalcRunner.zip.

    We will use it to see if our WinAppDriver has been installed successfully or not.

    put them on the machine where you’re installing WinAppDriver.

    I’ve unzipped it to the desktop of my VM.


    Let’s download the WinAppDriver, I’ll open a browser.

    This is a blank VM and I don’t have Chrome installed here.

    That's why I’m going to do something I’ve never done as far as I remember.

    I’ll try to use Edge browser for getting some work done!

    I’ll search “download WinAppDriver”, again in a historical first I’m going to get some work done using Bing search engine. How amazing!

    I’ll click the GitHub repo link, the first one.

    I’ll go to the Releases link.

    We’ll install WinAppDriver v1.2 Release Candidate

    Expand the assets underneath it and download WindowsApplicationDriver.msi

    Next I’ll install the WinAppriver.

    It is going to be installed on the path C:\ProgamFiles(x86)\Windows Application Driver on a 64 bit machine.

    On a 32 bit machine the installation folder will be ProgramFile, without the x86

    Let’s open the installation directory and run the WinAppDriver.exe.

    If you want to make sure that everything’s fine, you may run a WinAppDriver script on this machine.

    Let me run the WinAppDriver based exe file to make sure we installed it right.

    The example will open the calculator example as expected and perform some operations on it.

    If you click here, you’ll see that Visual Studio will not launch.

    Instead you’ll get a command line window with a path set to build tools.

    This is the end of this video. In the next video, we’ll head over to Azure DevOps for setting things up to run our automated tests via Azure.


  • Installing Visual Studio on a Developer Machine3:52

    The next step in preparing our test machine is to install Visual Studio Build tools.

    I’ve opened the VM which I am setting up as my test machine.

    Let’s open the browser and search for Visual Studio Build Tools.

    I’ll click this link here.

    On the Visual Studio website I’ll scroll down and expand “Tools for Visual Studio 2019”.

    Over here I’ll download “Build Tools for Visual Studio 2019”.

    The text will change in the future when a newer version of Visual Studio will launch, which you might adjust accordingly.


    Once the download is finished, I’ll run the installer.

    I’m going to click “Continue” here.

    The workloads which we need to install are important.


    In the “Workloads” section I’ll select “.Net desktop build tools” and I’ select several versions of .Net framework.

    The example which we’ll be using in this course is built with .Net Framework 4.5 so I’ll make sure we install build tools for it.

    You too should keep the same thing in mind.

    Now I’m going to click the “Install” button.

    The installation is going to finish in a few minutes.

    After this we’ll be good to proceed further.

  • Getting started with Azure DevOps, Creating an Organization, TFVC Repo, Project5:16

    We are going to need an Azure DevOps account in order to run test scripts through Azure DevOps.

    Let me open dev.azure.com

    You can create an Azure DevOps account for free.

    You may sign up using GitHub.


    The sign up process is going to ask for your credit card but the card won’t be used without your permission.

    Azure has got some premium features such as “Azure Boards” but they’re not enabled by default.

    Up to five developers can use Azure DevOps to collaborate using the tools shown in this course totally free of charge.

    I will not walk you through the account creation process because I believe it will be very simple.

    Let me open my own Azure DevOps account

    Once you have created an account in Azure DevOps, you will need to create a new organization inside of that account.


    You can do so by clicking the “New Organization” button here.

    The name you specify here will be used to create the URL of your organization which you will use with TFS later in this course.

    We can also select a region where we want our project to be hosted.

    Now I’ll click “Continue”.


    I’ll name my organization TFSRepoTestAutomationTV, spaces are not allowed here.

    Inside the organization, you’ll create a project to store your test scripts and build pipelines.

    A project is a place to store your code, build pipelines, and other artefacts. <this parth comes after 14 minutes recording>

    By default when you create an organization, Azure DevOps will show you the UI for creating a project inside of it.

    I’ll name my project “WADTFS”.

    We can provide a description here.

    I’ll keep this project private so that nobody else will be able to see this.


    Now click the “Advanced” icon.

    If “Advanced” button is not shown, try refreshing the page.


    I’m going to select “Team Foundation Version Control” here for now.

    We’ll talk about Git later on.

    I’ll now click the “Create Project” button.

    <Note: Project name was too long so I deleted it and created a new one at 20:30 in recording.>

    You can see that a project contains many things such as boards, repos, pipelines, test plans, and artefacts.

    We are going to be using the Repos and Pipelines only in this course.

    The repos are going to host our test scripts while the pipelines are going to put them to use for running test automation scripts.

    This is the end of this video, see you in the next one.


Requirements

  • A Windows 10 PC
  • Visual Studio, .Net Framework, WinAppDriver

Description

Are you tired of manually deploying your code changes and spending hours on testing and debugging? Then, look no further than Azure DevOps CI/CD pipelines! In this tutorial, we'll walk you through the basics of CI/CD and how to use Azure DevOps to automate your Windows application testing with the process using WinAppDriver and streamline your development workflow. So let's dive in and discover the power of CI/CD with Azure DevOps!

Azure DevOps makes our lives easier in so many ways. For example, you can run WinAppDriver quickly from Azure DevOps pipelines for test automation. Automated UI Testing is a common strategy for smoke testing and regression testing of legacy Windows applications. Especially with Azure DevOps-powered CI/CD(Continuous Integration/Deployment). Such applications are still widely used by many enterprises and businesses across the globe. Unfortunately, the mobile revolution hasn't been able to dethrone the PC, and Microsoft is still strong in the "Office" department. Learn Azure automation quickly.


The problem is that sometimes you have the source code of Windows applications critical to your business's survival, and other times you don't. In such cases, the only option is to perform the application's functional testing through the UI. But, it is an ordinary task, and you might need a tonne of the workforce. In such cases, UI test automation comes in handy.


This course became more vital combined with my other Udemy course about WinAppDriver test automation. You will also learn in this course about Azure Git for free.

Note: The course also covers YAML Pipelines on Azure DevOps too.


There are several options available for UI test automation, Microsoft itself offered Coded UI in the past, but it is now deprecated. Right now, Microsoft is supporting Windows Application Driver or WinAppDriver, a.k.a WAD, for UI automation of Windows applications. You must be wondering where Azure is. Well, Azure DevOps will fit into this picture later; relax. WinAppDriver is based on Appium, an open-source API conforming to the WebDriver standard. Microsoft WinAppDriver is not open source, but it still has a GitHub repository for documentation.


Azure DevOps is the cloud-based offspring of TFS(Team Foundation Server). It continues the legacy of Microsoft's once-on-premise Application Lifecycle Management(ALM) solution. The automation tests are written by software test engineers who often need Visual Studio licenses during test development. Unfortunately, these people are also highly paid, and after developing tests, it's not wise to keep them running test automation scripts on their machines through Visual Studio. In such cases, a low-cost solution is needed where non-code-savvy people can run UI automation tests through a standard tool like Azure DevOps.


Learn Azure DevOps because it lets you create a complete infrastructure to support such scenarios. How? That's what this course is all about. First, I'll show you how to set up Virtual Machines to run unattended WinAppDriver and C# based UI test automation through Azure DevOps. I'll also show you how to set up things on Azure DevOps by creating organizations and projects. Finally, the course also shows you how to generate an Azure PAT(Personal Access Token) for security purposes and configure it to minimize its side effects.


Azure lets us store code in more than one type of source code repository. The classic one is TFVC which is covered in this course first. Secondly, we have Azure Repos Git. Finally, a Pipeline is a set of tasks that will run the test automation. The UI for TFVC and Git-based pipelines are different; both are explained in this course. Git repositories generate a YAML-based build pipeline. Build channels communicate with an Azure DevOps build agent installed on a machine and configured to work with a specific Azure DevOps organization through a PAT. 


There is a shortage of WinAppDriver Azure DevOps Pipelines tutorials. In addition, the WinAppDriver and Azure DevOps tutorials are unclear and don't cover how to use WinAppDriver with examples. So I'm going step by step in this course from start to finish. Everything from installing tools on a test VM and creating an Azure account up to installing devices on developer machines, creating Azure DevOps repositories, and Azure DevOps Pipelines is covered. Special attention is paid to the topics of interest for software testers, such as viewing test run reports.


Understand how to build Azure DevOps CI CD Pipeline.


Various options for Azure DevOps Test Run reports are explained to you. In addition, supplementary topics like running a PowerShell task to start/stop Windows Application Driver in the build pipeline are also shown.


Please note that Azure DevOps is a highly in-demand skill right now. Microsoft is heavily investing in Azure and achieving significant success in this department. To prepare for the future, learn about Azure, including Azure DevOps and CI /CD.


Azure DevOps is a powerful tool that allows developers to collaborate and streamline the software development process. With Azure DevOps, teams can easily manage their code, build and deploy applications, and track their progress through the entire development lifecycle. This comprehensive platform includes features such as version control, continuous integration and delivery, agile project management, and more. With a user-friendly interface and robust functionality, Azure DevOps is a go-to solution for teams looking to improve their development processes and deliver high-quality software faster.

Of course, this course does not cover other critical Azure features like Azure Boards. I can cover more details in the future based on student demand. It is possible for a user to create bugs and link work items like stories/tasks to the Azure DevOps builds and failures.


It is high time that you start in this direction and starts learning more with practical courses like this one. Learn more about CI and CD, Microsoft Azure DevOps, and source control repositories like Azure Git Repos.



Who this course is for:

  • Test automation engineer
  • Test Automation Engineer (SDET)
  • Developer
  • Administrator
  • Software Quality Assurance Engineer