Codrina Valo
Codrina Valo

Reputation: 433

Is there any way to unit test xamarin.forms app and use the test set for c.i. with app center?

I am new to testing for xamarin forms and unit testing in general. I've created an unit test project for my xamarin.forms app, I wrote some basic unit tests and I was wondering if I can run these test using appcenter and continuos integration. I can run these tests only on windows pc locally, but my ci server runs on Mac so I was wondering what approach can I use to unit test my app.

Upvotes: 1

Views: 885

Answers (2)

Codrina Valo
Codrina Valo

Reputation: 433

we managed to run the unit test by adding a Bash Shell script and invoking the nunit console

/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono ../../../../NUnit.Runners.2.6.3/tools/nunit-console.exe 

APPName_Test/bin/Debug/APPName_Test.dll

later edit : report results from vsts enter image description here

Upvotes: 1

Sharada
Sharada

Reputation: 13601

To run unit tests in your Xamarin builds in AppCenter you can use a post-build script.

You can find an example for executing NUnit tests here, and more details on how to add a post-build script can be found here.

Upvotes: 5

Related Questions