1

I would like to automate my test and release process of my Monodroid app via Jenkins.

I found some infos for using Jenkins with "normal" Android projects:

Has anyone experience on building a Monodroid app on Jenkins and running nunit tests?

Are there some ready-to-modify scripts?

Tobias Schittkowski
  • 2,221
  • 2
  • 16
  • 25

2 Answers2

4

Yep, it can be done, well, almost... There's actually a few bits that do work and a bit that sadly isn't fully automated yet at this point.

The good news

It is possible to run a .NET build from within Jenkins. There's a good blogpost about it that explains what you need to do in a step-by-step manner. http://jenkinsheaven.blogspot.com.au/2011/04/building-build-first-net-build.html

Since Mono for Android (on Windows at least) is a feast of MSBuild goodness, you can simple schedule

MSBuild /t:Package /p:Configuration=Release MySolution.sln

Where the guide says you should enter the MSBuild command. That way you will get a .apk file from the build.

The bad news

At this point there's not a lot going on in the unittesting department. There's a port of NUnit Lite for Mono for Android, which allows you to run tests. But the one I found doesn't support running the tests automatically... yet.

You can download the bits here if you feel adventurous and want to add support for it yourself: https://github.com/SpiritMachine/NUnitLite.MonoDroid

The pro tips (tm):

  • Make sure you activate the license of Mono for Android on the build server. Without it, you create APK files that cannot run on the device, because they lack an important bit of code.

  • Add the correct signing properties to your .csproj file, normally a debug key is used to sign the package, but by overriding a few MSBuild properties you can specify the propery release key. There's a manual on how to do this here: http://docs.xamarin.com/android/tutorials/Preparing_Package_for_Android_Marketplace?highlight=signing

Willem Meints
  • 1,152
  • 14
  • 33
1

Check out this question.

In particular, that Calabash supports Android.

I haven't had the time to look at this closely yet, but at the moment it seems like Jenkins and this is the best option for continuous build/deployment getting around.

Community
  • 1
  • 1
manadart
  • 1,750
  • 11
  • 13