Dinash
Dinash

Reputation: 3047

Build and Execute Xamarin.iOS Unit Test from Command Line

I have been trying to run the iOS unit test from command line. I am using Xamarin Studio on Mac for now, I Created a iOS Unit test project as follows

Add New Project --> iOS --> Tests --> Unit Test App

And added a simple Unit test class and its code snippets as shown below:

using System;
using NUnit.Framework;

namespace iOSUnitTest
{
    [TestFixture]
    public class iOSTestSample
    {
        public iOSTestSample()
        {
        }

        [Test]
        public void MySampleTest() {
            Assert.True(true);
        }

        [Test]
        public void MyFailerTest()
        {
            Assert.False(true);
        }
    }
}

From Xamarin Studio, I am able to run the application which deploys a app into simulator and execute the test cases. I am trying to automate it through a script.

Till now, I am able to get the Unit Test project build and install the app into the running simulator.

I am not sure how to automate the unit test execution once the app is installed.

Upvotes: 2

Views: 402

Answers (1)

poupou
poupou

Reputation: 43553

This blog post (and the ones linked( might be a bit out-dated but it shows you how to automate unit testing (both simulator and device builds) with the tools that ships with Xamarin.iOS.

Upvotes: 2

Related Questions