0

I'm setting up a new Hybrid Mobile Application with Xamarin and I want to use Bitrise for the Continuous Integration. But I don't know how to properly create tests.

Right now, I've setup a Workflow where I build the project, in order to run tests I read that I need to use the NUnit Runner step (which I added) but I don't know where I should put my tests in my projects for this step to execute them.

I tried to add a new NUnit Project with Visual Studio in my solution My test look like this :

using NUnit.Framework;

namespace Tests
{
    public class Tests
    {
        [SetUp]
        public void Setup()
        {
        }

        [Test]
        public void Test1()
        {
            Assert.Pass();
        }
    }
}

So it should execute withput any problem right ? But when my Workflow is executed I end up with an error like this one: Failed to read test result, error: test result not exist at: /Users/vagrant/deploy/TestResult.xml

I've got all the default settings for the NUnit step in my Workflow.

What am I doing wrong ?

Thurluth
  • 5
  • 4

1 Answers1

0

There are multiple unit testing frameworks, NUnit, XUnit & Microsoft Testing Framework. According to some documents, Bitrise is able to support two of them: NUnit & XUnit.

So when I tried to Add a new Unit Test project to my Xamarin solution, I chose NUnit and in the Toolbar clicked Build->Rebuild UnitTests.

Then I selected View->Debug Pads-> Unit Tests and then Run All. You ll see that the default test will run & a test results box will appear saying all the tests pass.

Community
  • 1
  • 1
Saamer
  • 4,687
  • 1
  • 13
  • 55