Mobile Build Services
Analytics and Diagnostics
The course is part of this learning path
This course dives into creating a DevOps strategy for mobile applications using the Visual Studio App Center. The App Center gives us a centralized location where we can implement build services, carry out mobile UI testing with multiple devices sets, create public and private distribution groups, and perform release management for our distribution groups.
Build services include tvOS, iOS, Android, Xamarin, and more. UI testing includes UI testing across many popular flagship devices and uses a tier system to gradually cycle out older devices as newer ones become available. Distribution groups allow for deploying new releases to multiple types of users and can be utilized across multiple applications or projects. This course explains many of the options and services available in the App Center and provides guided demonstrations with a mobile app to show how each of these available services works.
By the end of this course, you should know how to utilize App Center to implement a DevOps strategy for integrating and deploying a mobile application. If you have any feedback relating to this course, please contact us at email@example.com.
- Create an App Center account and build a new application
- Perform UI tests in both the App Center CLI and Azure DevOps pipeline
- Create public and private distribution groups and release apps to them
- Understand and use the analytics and diagnostics provided by App Center
This course is intended for DevOps and IT professionals who are looking to implement a DevOps strategy for mobile applications using Visual Studio App Center to build, test, distribute, and deploy their mobile applications. This course is also useful for those preparing to take Microsoft's AZ-400 exam.
To get the most out of this course, you should know how to build and upload mobile applications if you are not using the build tools provided by the App Center. You should know how to work with Node package manager and have NPM installed or know how to install it. You should also be fairly comfortable with using command-line interface tools.
You can find the project files for a sample mobile application in the following GitHub repository: https://github.com/kelsosharp/MobileDevOps
For this Demonstration, we are going to look at how to release our mobile application to our users. First, we will create a public distribution group, then we will create a private distribution group. Then we will configure our master branch to release a build to one of our groups every time new code is committed to our master branch. Users come in many types and Distribution groups allow us to manage and deploy our application to our users.
To help me to explain the concept of distribution groups, I am going to break them down into 3 broad types. There are obviously many more types of users but for the purposes of this explanation 3 types will be enough to get the point across. The definition of the 3 types are:
- Internal Developers: These are users that actively develop mobile applications within the company and are part of the dev teams that contribute directly to the application. Generally, these users would be added to the default collaborators distribution group.
- UAT Testers: these testers perform User Acceptance Testing as part of an agile process and provide feedback and bug reporting. They are most likely company employees and have accounts in App Center for the purpose of manually testing the application before releasing an application out into the wild.
- Finally, End Users: These are the users that will possibly be purchasing your application from the various App Stores, or downloading it from an Intune company portal.
Mobile development generally speaking must go through a more rigorous testing process. This is because App Stores, like Google Play and Apple iTunes have strong testing requirements and there is a cost to releasing a mobile application to an App Store, if the mobile app fails the App Store quality check, the cost of the application is forfeit. Repeated failures can get really costly.
Also with mobile applications, it's not an accepted practice to report errors directly to a user, being able to recover from errors without user input or knowledge is the accepted standard for mobile applications. So rigorous multi-level testing is required to meet the standards for being released successfully to an App Store.
This is why there is a need to have testing and feedback from multiple groups of users. Mobile application development is a costly endeavor so making every effort to release the highest quality application possible is even more important when creating mobile applications. Having multiple user groups that fill different testing roles is a great way to achieve this goal. Now that we have an idea of some of the reasons why having multiple distribution groups is beneficial, let’s have a look at how we can create and use them.
We’ll start off on the distribution groups page, and since we don’t have any distribution groups yet, there is a button there for us to add a group. App Center creates a new collaborators group whenever a new app is created. This is a good place to add our developers.
I will just click the add group button and this will bring up the configuration page for creating our new group, the first one will be a public group named “Beta” with just one person in it. Next, I will add another group this time we will make it private, and add 2 people to the group, That is all there is to creating distribution groups. If we had an Azure Active Directory Tenant, we would be able to add any users from that tenant in the add users’ textbox.
Now that we have added our distribution groups, we can specify that whenever a specific branch in our code repository is built it will automatically create a release to distribute to one of our groups. So I will just go over to where the builds are and select our master branch and click the edit settings in the top right. I will scroll down to the Distribute option and select one of the groups we created, we can also do this with the different app stores as well. Distributing to Google Play, Apple iTunes, or Microsoft Intune App Stores requires previous setup.
App Center is very easy to use, considering how challenging it can be sometimes to write mobile applications. Distribution groups give us a very simple way to release our application to our testers and users with very little setup needed.
Now that we have seen how to create a distribution group and trigger a release in App Center, let’s go check out how we can create an App Center Distribute Task in our Azure DevOps pipeline. In our previous demo, we created a task that runs our unit tests for our mobile application. Now we want to release our app to our testers.
In App Center, we created a very simple build and release CI/CD automation process. We did this by creating a group and configuring our build so that every time new code was committed, If the build was successful for that specific branch it would create a release for the specific distribution group we set up.
In Azure DevOps and YAML there are many more things we can do. We can make releases conditional on build step success or add check gates for approvals that need to happen before we decide to release, just to name a few. Let's check out how to release a build to one of our distribution groups from Azure DevOps.
We have here our previous YAML page from our demo on testing using Azure DevOps pipeline integration. All I have done is comment out our App Center test task, since that takes about 18 minutes to complete, and for this example distribution, we don't require a successful UI test task, but if we wanted to provide a success condition for that task it is an option.
So the first thing we do is click on the App Center Distribute Task on the right. This will bring up the usual task configuration page for us to fill out. First, we need to select the service connection we created. Paste in our App Slug, it’s the same as our test task, our binary path to the .apk file is also the same so I will cut and paste that as well.
Build version is for windows applications so we don’t need to do anything with that. We will use the default “Enter Release Notes” for the release notes type option. This allows us to enter a release note manually, but we could also have used a previously created release notes document if wanted to.
Now we come to the decision about what group we want this task to release to, so we will come back to App Center and go to the distribute tab and then groups. I previously deleted our user groups so we would have a clean environment to work with, which is why you do not see any groups from the previous demo.
Since we have no groups we will click the “Add group”, this brings up the configuration page, we simply name our group and add the email of any users we would like to add to our new Tester group. I will add my email address here. This will add me to the group and I will be notified when there is a new release. Now we just click create group, and we now have a new Testers group.
Now to be able to identify our group in Azure DevOps we need the group id. So we need to go back into our group settings by clicking on the wrench up in the top right corner and that will open our group configuration page again, and you will see in light grey an ID number. It's a bit hard to see. We will copy it to the clipboard and head back to Azure DevOps.
When we are asked for a Distribution Id we just paste the id from the App Center there. Lastly, we change our symbols to Android, and that is all we need to do for this task. Click add and we see it on our YAML Page. We then click save, and then click run, and click run again. The pipeline will then go through all of our YAML tasks except for the commented out UI test task, when it's done we should have an email letting us know there is a new release available.
We can also do this for the various app stores and the intune company portal. We won’t be able to go too far with deploying to the Google Play store or the Microsoft Intune company portal. However, you can find them under the Stores menu items here in App Center. For The Google Play store, you need to set up your build signing and the Google Play API to enable 3rd party deployments, and for the Intune company portal, your organization has to have the Enterprise Mobility and Security Suite from Microsoft and you also will need an account for Intune. For Apple, you need to set up your developer profile and production certificate. However, that is beyond the scope of this course.
If you need information on how you can do this you can find the information at the following URLs:
So in this demonstration, we've learned how to create public and private distribution groups and where we can go to set up our connection to the various app stores. In the next module, we will take a look at Analytics and Diagnostics.
As well being the owner and CTO of Sharp Solutions Group, a software development and IT staffing company based in the Philippines, Kelso is a Microsoft Certified professional and an avid knowledge seeker. His belief is that you need to learn something new each day to stay on top of the constantly changing IT world. He is an avid gamer (both video games and board games) and lives in the Philippines with his wife and soon-to-be-delivered son.