© Gerald Versluis 2017

Gerald Versluis, Xamarin Continuous Integration and Delivery, 10.1007/978-1-4842-2716-9_11

Alternative Tooling

Gerald Versluis

(1)Sittard, The Netherlands

In this book, I have focused on Microsoft technologies, mainly because I love the Microsoft technology stack. The tooling is great, the languages are evolving beautifully, and in the past few years Microsoft has taken giant steps toward working with the community and putting effort into going open source. Because Microsoft is a big company, it also has a lot of capacity to push out great products at a steady pace. There are a variety of products, and they all work together well, so unless you really want to, you do not have to leave the .NET ecosystem for anything.

However, being a good developer means you must know what is out there. Do not create a blind spot by focusing on just one vendor and what it tells you. Remain critical, ask questions, and seek alternatives. Before and while writing this book, that is exactly what I did. Therefore, this appendix will show you that there are other products available. All the products and services I will teach you about in this appendix have their own strengths and weaknesses—some of them technically, others in licensing or pricing.

I will not go over the specifics of each alternative in this chapter. I will show you that there are other paths to take, and depending on the requirements you might have or the situation you are in, you can make an informed decision on what to use.

Most of the services I will describe like to play with others, and they have APIs you can use or they can make use of the APIs of others. This way you are not stuck in one ecosystem; you can cherry-pick the products and services you like and tie them together to create your own optimized pipeline.

Despite wanting to provide you with alternatives, there is one player that comes from Microsoft that I cannot ignore, so I will start off with one more Microsoft product.

Visual Studio Mobile Center

With the acquisitions of Xamarin and HockeyApp, Microsoft had some overlap in technologies in its portfolio. Xamarin Insights and the reporting capabilities of HockeyApp are quite similar yet not exactly the same. In addition, Microsoft has been busy developing solutions on top of Azure such as Application Insights.

To unify all the features and rebrand Xamarin Insights and HockeyApp in the process, Microsoft has announced the Visual Studio Mobile Center. While it is still in preview at the time of this writing, Visual Studio Mobile Center looks promising. It will be the replacement for Test Cloud, HockeyApp, and Insights, as well as part of VSTS.

With Mobile Center , Microsoft is creating a service that offers everything regarding mobile and everything I have talked about in this book. Microsoft is taking all the key features from the products it has now and putting them into one good-looking service. With Mobile Center, you can connect to your VSTS, GitHub or Bitbucket repository, get your Objective-C/Swift, React Native, or Xamarin app, and build it. When you have a build setup, you can automatically let it flow over to distribution and send it to your users.

Figure 11-1 shows the dashboard of a test app I have put in Mobile Center.

A435607_1_En_11_Fig1_HTML.jpg
Figure 11-1. Getting started page for my test app in Visual Studio Mobile Center

Microsoft has introduced a whole new set of NuGet packages that you can integrate easily, which allows you to receive crash reports and analytics, just like you would with HockeyApp or Xamarin Insights. To complete the cycle, Microsoft has integrated the Test Cloud runs and results in Mobile Center . Finally, when you link your Azure subscription, you can easily integrate data storage and identity into your app without breaking a sweat.

All this goodness has been poured into a sleek-looking single-page application, with instructions to get you started every step of the way.

Now, I can almost hear you thinking, “Why shouldn’t I use this over everything you have described in this book?” That is a valid question.

I have been informed by the Microsoft team that the Mobile Center will be the coming together of the Xamarin, HockeyApp, and some Azure services that have to do with mobile. However, it is not meant to be a replacement for all the functionality in VSTS. If anything, it is a springboard to the full-featured VSTS environment. Under the hood, Mobile Center leverages the build and release engine that is also being used in VSTS and TFS. Most likely, this will be positioned as a starting point for beginner developers or developers with simple requirements, offering them with an easy-to-use service for building their apps.

In the future, there might even be a migration path from Mobile Center to VSTS, where all of your build definitions (which are not called as such in Mobile Center) are already available to you as you have designed them from within Mobile Center.

Also, there is a great future ahead for Mobile Center, but we are not there yet. During this transition HockeyApp and Test Cloud will still be supported, even for a while after Microsoft announces the discontinuation of these services.

Even if you choose to get started with Mobile Center, what you have learned in this book will help you grasp the concepts behind it, and you will have a head start when transitioning to the much more advanced Visual Studio Team Services.

Once again, at the time of this writing, Mobile Center has just been introduced and is still in preview, as it will probably be for some time to come. Because of this, no pricing information is available at this time. Like with most Microsoft products, you can use it for free while it’s in preview, but when the preview phase comes to an end, there probably will be costs, at least for parts of the functionality.

Finally, Mobile Center has one big advantage over VSTS: Mobile Center has provisioned the Mac hardware for you, so you do not need to do anything extra to build your iOS apps .

Tip

Want to know what is upcoming with Mobile Center? You can check out the road map at https://docs.microsoft.com/en-us/mobile-center/general/roadmap .

Bitrise

Bitrise ( https://bitrise.io ) is an all-in-one solution for building your app. It offers you basically the same functionality as VSTS does with its build definitions. However, it offers you the Mac hardware, so you do not have to worry about that part yourself.

The service is completely free to some extent. If you are able to get by with 2 users, builds that do not take longer than 10 minutes, and no more than 200 builds a month, you have nothing to worry about. You can have an unlimited number of apps and build definitions.

After that, prices start at $50 a month, as shown in Figure 11-2.

A435607_1_En_11_Fig2_HTML.jpg
Figure 11-2. Pricing at Bitrise (courtesy of bitrise.io)

Apart from the naming, the features are largely the same as in VSTS. The build definitions are called workflows in Bitrise and have tasks in them. These tasks are all open source, and there is a repository available where you can get additional tasks. Because Bitrise has been around since 2014, it already has a stuffed library with all kinds of tasks that you can include in your workflow. These tasks range from useful ones, such as transferring your app to Test Cloud or HockeyApp, to some less useful ones, such as getting a random quote in your build log to keep you entertained while building is in progress. Figure 11-3 shows an example of a workflow.

A435607_1_En_11_Fig3_HTML.jpg
Figure 11-3. Workflow screen in Bitrise

Because of the free tier, great community that is behind it, and the provisioning of Mac hardware, Bitrise is a real treat. It is a great way to get started building your apps in an automated fashion, and it has the power to drive your big enterprise apps as well.

Besides building workflows that matter, you can integrate a whole lot of other services. Your code can come from any Git source, and builds can be triggered by a schedule, webhook, or manually. Learn more about the product at https://www.bitrise.io/integrations .

Since Bitrise is not focusing on Microsoft technologies and is not even running on Windows machines, building and running unit tests from MSTest are not supported. You can build Xamarin apps, as well as Java and Objective-C/Swift apps.

All in all, Bitrise is worth checking out.

AppVeyor

The final competitor in the automated build landscape I will introduce is AppVeyor ( https://www.appveyor.com/ ). AppVeyor provides you with automated builds for .NET-based projects, but it does not have the user-friendliness in terms of compiling your own build definition on a workflow. Instead, you get a predefined workflow that you can configure in any way you like. If you want something more flexible, you will have to get your hands dirty with PowerShell and/or command-line commands. But if you do not want to do anything too advanced, the basic UI and functionality will get you there.

You can connect your repository from any popular service, including GitHub and VSTS. From there you can select the project that you want to build and start configuring it. The greatest thing about AppVeyor might be the pricing. For open source projects it is completely free!

For details on the pricing, see Figure 11-4.

A435607_1_En_11_Fig4_HTML.jpg
Figure 11-4. Pricing on the AppVeyor service (courtesy of appveyor.com)

Because you can use it for free, this service is perfect for automating any NuGet packages that you might have or, of course, any open source apps. I have been using AppVeyor in conjunction with GitHub to push out some of my NuGet packages.

Setting up AppVeyor is an easy thing to do: connect your GitHub account, choose the project, and configure it with your NuGet account to set up deployment. That’s basically it!

When setting up AppVeyor from your GitHub repository, AppVeyor will install some webhooks for you. This way, whenever a pull request is received, it will automatically start a CI build for you and show the results right there, integrated in GitHub. To top it off, AppVeyor has badges, so you can show off the build status on any page anywhere with a badge. (By the way, this is also true for Bitrise and even VSTS.)

Figure 11-5 shows you how AppVeyor looks. On this screen, you can see the configuration of one of my NuGet packages .

A435607_1_En_11_Fig5_HTML.jpg
Figure 11-5. Configuring an automated build with AppVeyor

As you can see, there are a lot of possibilities already available to you. Besides creating builds, you can run tests, define artifacts and choose what to do with them, and deploy to one of the prebuilt deployment providers offered.

If you are working with NuGet and you do not want to push your package to the general NuGet feed for some reason, you can set up your own feed through AppVeyor.

Head over to the AppVeyor web site to see what it has to offer you.

Fastlane

Fastlane ( https://fastlane.tools/ ) is bit of an odd one out. Let me say up front that I do not have any hands-on experience with it; however, it seems promising. With Fastlane, you compile a so-called fastfile , which describes a configuration that you want to use for your app. Right now, it supports only Apple and Android apps.

This fastfile can do a range of things, including incrementing your version number, distributing your app to HockeyApp or the App Store , signing your code, and much more. Working with it is not as obvious as all the other alternatives. On the Fastlane web site, you can compile a fastfile to start, but installation then has to be done on your project source files.

You import an installation script that you should run. From there on out you have a set of new commands at your disposal, all starting with the fastlane keyword.

Everything is open source on the GitHub page ( https://github.com/fastlane ), and there are also a great number of example repositories associated with the account. It seems promising in terms of saving you time; for example, it can automate creating screenshots in different screen sizes and localizations for you.

TestFairy

As the name might suggest, TestFairy ( https://testfairy.com/ ) is an alternative to Test Cloud . Actually, it combines a couple of things from Test Cloud as well as HockeyApp. First, this is no automated test service like HockeyApp. It only provides you with a way to get your app to your testers easily and gather results from them.

It will help you distribute a version of your app to a set of testers, and from there you will get detailed reports on the test sessions. It is pretty awesome but requires a lot more human interaction than testing with Test Cloud.

From a test session, you can see a number of things. Probably the most interesting to see is a screen recording all the steps that a test has taken leading up to an error. Besides that, you get a whole lot of graphs and statistics about the device a tester is on. Figure 11-6 shows what a session looks like on a demo page on its web site.

A435607_1_En_11_Fig6_HTML.jpg
Figure 11-6. TestFairy session on the demo account (courtesy of testfairy.com)

Details about the device include but are not limited to CPU and memory usage, GPS, network, and more.

Because a session happens through an actual person on an actual device, you do have some more power and control over the device and scenarios than you have with Test Cloud . For instance, you can test on other networks than Wi-Fi, use Bluetooth, and so on.

Another cool feature is the report on test coverage. TestFairy can generate a report for you, with which you can see on one axis all the screens within your app (Activities/Fragments for Android and ViewControllers on iOS) and on the other axis all the devices. By creating a matrix like this, you can easily see how much ground is covered on each device and thus by each tester. Figure 11-7 shows an example of this matrix.

A435607_1_En_11_Fig7_HTML.jpg
Figure 11-7. Test coverage per device (courtesy of TestFairy.com)

Furthermore, TestFairy has integrations with some popular issue-tracking tools such as Jira, Bugzilla, and even Trello, and from the portal you can easily create tickets in those systems. The integration works both ways and creates links to relevant information.

Basic distribution can be done without integrating the SDK into your app. However, if you want to gain more insights, you do need to incorporate it.

Pricing is free for the basic package, but there are paid tiers available for startups and enterprises. However, there are no prices listed on its web site at the time of writing.

Flurry

Flurry ( https://developer.yahoo.com/ ) is a service from Yahoo . It offers several services with different names, targeting different functionality. I will be focusing on Flurry Analytics . This service is an alternative to HockeyApp and provides you with the same capabilities as HockeyApp and more.

By integrating the SDK, you immediately gain the ability to report events and crashes just like you would with HockeyApp. It will catch unhandled exceptions, but you can also manage exceptions that you handle in code so you can inspect them from the dashboard. Figure 11-8 shows a sample of this dashboard.

A435607_1_En_11_Fig8_HTML.jpg
Figure 11-8. The Flurry dashboard (courtesy by Flurry)

Flurry also offers the ability to report events, so you can track a user’s movement throughout your app.

It does not stop there. As you might have noticed, the graphs and data look similar to Google Analytics (which, by the way, can also be used in your apps), and it also has some Analytics-like data. You can see the demographic numbers of your audience, get information about active users or devices, and much more.

There is no notable integration to other services, other than their own.

Most of the data is available to you in real time, and with the service being free, it is worth trying.

Note

Flurry does not advertise Xamarin support on its web site. There are, however, some libraries available to help you integrate the SDK into your Xamarin app. Take a look at this repository to get you started: https://github.com/mattleibow/Flurry.Analytics .

Raygun

Another service that is about crash reporting and analytics is Raygun ( https://raygun.com/ ), which is broken into two products: Crash Reporting and Pulse. The first one is obviously all about the crashes, and the latter is about finding and fixing performance issues.

Neither product has a free tier; pricing starts at $49 per month for the crash reports and $99 for Pulse. There is, however, a 14-day free trial available for you without the need of a credit card.

Raygun supports not only apps, but like Application Insights , it supports a great variety of programming languages and platforms. Integrating into a .NET project is as simple as just installing the right NuGet package and implementing a few lines of initialization code.

Raygun supports a great number of development platforms and has a big list of integrations to choose from. You can choose to get your source code from GitHub, VSTS, and more. You can track issues in Jira, Zendesk, VSTS, and more, and you can deploy your app through the integrations with Octopus Deploy, Powershell, FAKE, and more. Besides the integrations that are available to you out of the box, Raygun also offers webhooks and an API, like almost all the other solutions mentioned in this chapter.

All of this makes for a powerful and complete solution, but it comes at a price.

Figure 11-9 shows the dashboard. All the data is available in real time, and you can drill down through the data. If you have worked with Xamarin Insights before, you will be happy to look at Raygun because it has similar functionality to track users and their sessions throughout your application.

A435607_1_En_11_Fig9_HTML.jpg
Figure 11-9. The Raygun dashboard (courtesy by Raygun)

Jenkins

As an alternative to VSTS, you can look at the Java-based Jenkins ( https://jenkins.io/ ). Although I do not have extensive hands-on experience with Jenkins, I do know that it roughly offers the same functionality as VSTS, or at least TFS. It can take care of automated builds for you, as well as integrating code, delivering artifacts, and so on. Basically, it can do anything that has to do with building and releasing.

Jenkins has been around for a long time and is completely open source; it is available on GitHub. Managing the system goes through a web interface, although you will find that it is less user-friendly than VSTS.

Managing configurations and build tasks is done through so-called Jenkinsfiles , which are rather powerful but need some adjusting. As far as I know, there are no Jenkins-as-a-service providers around, so you will have to set it up yourself on a web server of your choosing.

Using Jenkins is free of charge and has a great community behind it; therefore, you can find a lot of support and up-to-date plug-ins for it. With the plug-in system in place, you can establish connections with services such as HockeyApp, Test Cloud, and all the other goodies you have learned about.

TeamCity

Just like Jenkins and VSTS, there is also TeamCity ( https://www.jetbrains.com/teamcity/ ), which is a solution by JetBrains. Like Jenkins, TeamCity is built on Java and targets build management and continuous integration.

JetBrains does provision you with a hosted environment, which even has a free tier for up to 20 build configurations and 3 build agents. From there you can go to an enterprise license. For open source projects, you can request a free license, which gives you all the enterprise features as well.

TeamCity has some notable features such as gated commits , which you might already know about from VSTS. This means that no code gets checked in whenever a build is broken. It has extensive integrations with its own IDE (IntelliJ IDEA) but also Eclipse and even Visual Studio. Maybe the best feature is the built-in support for code inspections, coverage, and duplication. In Chapter 10, I briefly mentioned ReSharper , which is also a JetBrains product. TeamCity basically combines the best of these two products by integrating them for you.

You can use a variety of source control systems, including Git, CVS, TFS, and VSTS.

Figure 11-10 shows a typical TeamCity dashboard.

A435607_1_En_11_Fig10_HTML.jpg
Figure 11-10. TeamCity dashboard (courtesy by JetBrains)

Final Thoughts

I hope you have learned a lot from this final chapter. I know I have. It can be powerful to see what other parties are doing and how you can benefit from that. You can combine different solutions and thus the strong points of each service to create the perfect environment for you.

If you put all of this into context with the Xamarin app development, it is safe to assume that Microsoft products are still the easiest to integrate with each other, because they all come from the same company. Still, you might come across other solutions that provide you with just a little bit extra. The little details can make your life easier while producing awesome apps.

If there is any service or product that I have missed, which there are plenty, please let me know because I am always interested to see what it is going on in other places. I am also interested in the ways that you have set up a pipeline for yourself and how my book has helped you do that.

Once more, thank you for reading.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.118.95