How to run UUP NUnit tests with Visual Studio 2015?

This question concerns, in particular, the execution of unit tests of the Universal Windows Platform (UWP) written in C # for NUnit.

How can I detect and run these tests in Visual Studio?

I could not find the final articles about this on the Internet, which is really amazing.

+5
source share
1 answer

I had this if xUnit was the only way to write tests. NUnit Wiki for Xamerin / UWP

My current setup

  • Visual Studio 2015 Community
  • Adapter for testing Nunit (3.2.0)
  • Nunit 3 Templates (1.2)

I added a new project in the Cross Platform section (where NUnit templates were installed at the time of this writing). I added a template for UWP. This is created by projects.json , so you can just change your xUnit, but it's easier

 { "dependencies": { "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0", "NUnit": "3.0.1", "nunit.xamarin": "3.0.1", "Xamarin.Forms": "2.0.0.6490" }, "frameworks": { "uap10.0": {} }, "runtimes": { "win10-arm": {}, "win10-arm-aot": {}, "win10-x86": {}, "win10-x86-aot": {}, "win10-x64": {}, "win10-x64-aot": {} } } 

From what I can say, this is more of a test runner than a test project. Both xUnit and NUnit seem to want you to create a PCL project with all your tests, and then reference it in that user interface project and run your tests. At the time of writing, I want to check if there is a shadow copy, so you can run without a debugger and run the tests again and again. I hope this is possible, I will let you know later, if possible. Hope this helps

+1
source

Source: https://habr.com/ru/post/1234155/


All Articles