Key Points
This article is sponsored by Microsoft Visual Studio App Center. Thank you for supporting the partners who made SitePoint possible.
What is the most enjoyable part of software development? Write excellent code.
What is the most troublesome part? Everything else.
Software development is a great job. You can solve problems in new ways, satisfy users, and see what you build to improve people's lives. But while we spend a lot of time writing code, we often spend a lot of time managing the overhead – and this is a total waste of time. Here are some of the biggest productivity bottlenecks and how we’re working to get you back that time.
What is the first step to delivering your amazing app to happy users? Let it exist. Some people may think that the conversion from source to binary will not be so painful, but that is not the case. Depending on the project, you may need to compile multiple times a day on different platforms, all of which are the time you can use to write your code. Additionally, if you are building iOS apps, you need a Mac build agent—this isn't necessarily your primary development tool, especially when building applications using a cross-platform framework.
The best way you want to take back this time is (this won't be the last time I said so) Automation. You need to automate configuration and hardware management so that the application is built automatically when it should be built.
The way we try to meet this requirement is Visual Studio App Center Build, a service that automates all steps you don't want to repeat manually, so you can every time you check in the code or, yours, Build when the quality assurance team or your publishing manager wants. Simply point the Build to a Github, Bitbucket, or VSTS repository, select a branch, configure some parameters, and you can build Android, UWP, and even iOS and macOS applications in the cloud without managing any hardware. If you need to do some special actions, you can add post-clone, pre-build, and post-build scripts for customization.
I spent years testing software and in my career there were always three questions I always hate to hear:
"Are you done?"
"Can you reproduce it?"
"Is it really that bad?"
In the past, there was little time or resources to conduct thorough and appropriate testing, but mobile development exacerbated this problem. We now deliver more code to more devices more often. We cannot waste time trying to reproduce that elusive critical failure, nor do we have time to argue whether mistakes are fatal. At the same time, we are the gatekeepers who ultimately take charge of high visibility failures or low quality products, and as team members, we want to solve problems ahead of time to improve quality, not just block release. So what is the answer? "Automation", of course. But it needs to be automated meaningfully. If you can't put together the datasheet and screenshot folders, then they make no sense. When you face deadlines and have to convince product owners to make a decision, you need to provide information they can understand while still giving developers the details they need to fix.
To help solve this problem, we created App Center Test, a service that performs automated UI testing on thousands of real devices in hundreds of configurations. Since testing is automated, you can run the exact same test every time, so you can instantly identify performance and user experience bias, as well as every build. Tests generate screenshots or videos with performance data, so anyone can spot the problem and developers can immediately click on the detailed log and start fixing. You can check the code by testing on a few devices at each commit and then running regression tests on hundreds of devices to verify that everything works for all users.
So you have built an application and it performs as expected. Very good! But now the iteration has really begun. You want to know what people think about it before pushing it to the end user. But how to do it? It's hard enough to form a beta program, but making sure everyone has the latest version of the app (if it's a mobile app, make sure your users can even install it) is a full-time job - this It's a job that no one on your team wants.
Again, Automatic. When you're ready to push builds, you need to automate the notification process and the application distribution process of and , and you need to be able to trigger both every time you build (or every time the publishing manager says so).
Our answer is the App Center Distribute service. If you have a list of email addresses, you have everything you need to deliver the build to internal or beta testers. Create a distribution group, upload a build (or build a build from the repository), and Distribute will handle the rest. If you think this sounds like HockeyApp, you are right. App Center Distribute is the next generation of HockeyApp that integrates distribution automation with our other CI/CD services. After completing beta testing, Distribute can also deliver your app to users and deploy to Google Play, Apple's App Store, or (for enterprise users) Microsoft Intune.
People often talk about deploying pipelines, but we are not just pursuing one-way push. If you can understand what happens after your application is released, you can give that feedback to developers and create a closed loop to improve your product faster. This information takes two forms—analyzing how users interact with your applications and, crucially, reporting how and when those applications fail. Let's start with the second one, because the crash is the worst case. When an application fails, you want to know it quickly, but you also need to understand how important it is. Crashing in one fuzzy feature that affects everyone is usually worse than a complete boot failure on the iPhone 4 only. App Center Crashes group similar crash reports and shows you the most affected platforms so you can make informed classification decisions. When you are ready to start fixing the problem, the crash will be fully symbolized, so you have the information you need to get started. You can automatically create entries in the error tracker so developers can start fixing issues without leaving the workflow. Again, more automation means more time to write better code.
For analysis, you want to get something useful out of the box. App Center Analytics provides user and device-level metrics that app owners want to see based on engagement; for example, who is using which devices, frequency, location, and how long they stay. But your app is different from others' apps, so we allow you to create and track custom metrics such as "booked itinerary" or "ordered home delivery". If you need more in-depth analysis, we will enable Continuous Export to Azure Application Insights.
You can theorize the perfect CI/CD solution all day long, but if you can't put it into practice, it's all useless. It's important to get what you can use now, whether that means integrating with existing systems that you really like (or can't get rid of), or just part of automating the manual process until you can complete the rest. Even a small step is always better as long as the direction is right.
Obviously, I'm biased and think you should try our entire system, but the needs of developers vary. If you want to take only some of the features of App Center, we have built it to make it completely modular. We provide a REST API for every App Center service, and we have pre-built integration with services like VSTS. This should be like this because you are building your app, so you should build it in the way you are. We'd love to let you try Visual Studio App Center – it's brand new today and can be started for free. We want to hear what you think!
FAQs (FAQ) about Automating CI/CD with Visual App CenterWhat is the role of Visual App Center in automation CI/CD?
Visual App Center supports a variety of programming languages, including Java, Objective-C, Swift, and .NET. This extensive support allows developers to use their favorite language when building applications. Additionally, Visual App Center provides specific build tools and environments for each supported language, ensuring optimal build performance and compatibility.
Visual App Center provides integrated support for various tools commonly used in software development. These include source code control systems such as GitHub, Bitbucket, and Azure Repos. To integrate, you need to navigate to the settings of the application in Visual App Center and under the Services section, select the service you want. Follow the prompts to complete the integration process.
Visual App Center ensures the quality of the application through automated testing. It supports unit testing and UI testing that can run on a variety of real devices in App Center Test Cloud. These tests help identify and fix issues early in the development cycle, ensuring high-quality applications are delivered.
Yes, Visual App Center provides comprehensive monitoring capabilities through its analytical and diagnostic services. These services provide insights into application usage and performance, helping you understand how users interact with your application and identify any issues that may affect the user experience.
Visual App Center simplifies application distribution by allowing you to deploy applications directly to users or app stores. You can create distribution groups, add testers, and send them the latest version of the application. Additionally, you can track the status of the version, including who downloaded and installed your app.
Visual App Center provides a free tier that includes access to most services, including build, test, distribution, and monitoring. However, some features, such as testing on real devices in Test Cloud, can incur additional costs. For detailed pricing information, you can refer to the Visual App Center pricing page.
Visual App Center attaches great importance to security. It uses industry-standard security measures, including encrypting data at rest and transmitting data to protect your data. In addition, it complies with various regulatory standards including GDPR, ISO 27001 and SOC 2, among others.
Yes, Visual App Center supports cross-platform application development frameworks such as Xamarin, React Native, and Cordova. This allows you to build, test, and distribute applications for iOS and Android using a single code base.
To get started with Visual App Center, you need to create an account, add your application, and configure your build, test, and distribution settings. You can then start pushing the code to the repository and Visual App Center will handle the rest. For detailed instructions, you can refer to the Visual App Center documentation.
The above is the detailed content of Automate continuous integration and deployment to get on with coding. For more information, please follow other related articles on the PHP Chinese website!