Forum Xamarin.iOS

How to write tests for continuous integration ?

I have established the Continuous integration for the Xamarin app that I am making. I have set the Xamarin.iOS project as the startup up project and made everything according to the link that tells about this “ . According to the basic idea that I have about continuous integration the application the CI server should do some testing in order to check whether the application is in working condition right now. I not sure about how according to the tutorial the tests would execute or where I need to write them to execute them in order to check whether the app is in working condition. I have put the following build command in the execute shell section.

/Library/Frameworks/Mono.framework/Commands/xbuild /p:Configuration=Debug /p:Platform=iPhone /p:BuildIpa=true /target:Build .sln

Is it that I need to write some test code and then write a script in execute section to test the code. OR If my complete understanding is wrong could someone tell me how to establish the Jenkins and then EXECUTE the tests in order to check whether the app is in working condition all the time ?

Best Answer


  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    Have a look at the Xamarin.UITest guide. It should help explain what is involved in automated testing.

  • Hi DaveHunt,
    Is there only the UI test that is to be put ? Because I was thinking that some "non-UI" tests should be executed , which would tell us that the commit that I have pushed on the branch is keeping the app in the workable condition or not(I think those are called integration tests). Maybe something from the test project that is entered in the project?. I knew about UI testing but how I would call that from the Jenkins ?

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    I think you're talking about unit tests. For that you would use NUnit. Here's a video that covers testing with both UITest and NUnit.

  • Utkarsh.5051Utkarsh.5051 USMember
    edited September 2016

    You are right @DaveHunt but when and how the unit tests would execute when the code is pushed to a branch ? Which changes do I need to write to the configuration of the Jenkins for the project in order to execute the tests as well. I guess that I need to write the integration tests for the application so that new changes don't break the old ones. But where and how should I go about it?

  • Thanks. I think that this would help me.

Sign In or Register to comment.