UWP Unit Tests Don't Show Up in Rider - unit-testing

I have a solution with two unit testing projects. One is for .NET and the other is for UWP. The .NET Framework and .NET Core tests show up in Rider but the UWP tests don't show up. They show up in Visual Studio. You can see the project here. It appears that dotCover is supposed to support UWP. I assume that Rider uses the same engine. Also, I opened dotCover and found my app unit testing app among the packages but it doesn't pick up any of the tests either. I'm using MS Test but can switch if need be.
This is what I see in dotCover:
Does Rider support UWP for unit testing? If not, can I do this with dotCover? What am I doing wrong?

Right now, even ReSharper does not support discovering UWP tests in Visual Studio 2019 due to a lack of API. That's why it does not work in Rider as well.
However, we've implemented our own test runner to run UWP tests https://youtrack.jetbrains.com/issue/RSRP-473827, and it will be available in upcoming releases in both ReSharper and Rider.

Related

Unit test .Net Framework 3.5 project in VS 2017

I have some legacy projects with test libraries.
The projects (and unit tests) target .NET 3.5.
We are using VS 2017 enterprise.
I was able to locate some nuGet packages that would allow the tests to build correctly, but Test Explorer does not see the tests at all. I presume this is because there is no Test Adapter.
The packages I am using are:
Microsoft.UnitTestFramework.Extensions v1.0.0.3
Microsoft.VisualStudio.QualityTools.UnitTestFramework.Updated v15.0.26228
Most of the packages I found would not install due to a lack of .Net 3.5 support. Which makes some sense in 2017, but still.
Does anyone know what Test Adapter I can use to make legacy .Net 3.5 unit tests visible to VS 2017 Test Explorer?
Things I can't do:
use a different version of VS
re-target the libraries to a different framework version (they are for SharePoint 2010)
Rewrite all the tests for a different test framework (unless there's a very straight forward translation of the attributes/asserts I could do with find and replace, as there's a lot of tests)
Appreciate any tips!

Cross platform Xamarin PCL project unit testing

I want to do unit testing my pcl xamarin project for ios,android and windows(not important).How can i do it with proper way.(i heard about Nunit or Xunit)
Project were created with visual studio and xamarin.
NUnit 3 has support for testing Xamarin PCL projects. It is an involved process and StackOverflow questions should be much more targeted, not general how-to's, that is why you are getting down voted.
To get you started, read Testing Xamarin Projects using NUnit 3.

Unit testing for modern PCL, compatible with .NET Core

I use Class Library (Portable) project template in Visual Studio to produce modern PCL, compatible with .NET Core. Unfortunately, I unable to run unit tests for PCL with neither NUnit nor XUnit:
First of all, I can't create Class Library (Package) or Console Application (Package) for unit testing project. VS 2015 currently does not allow to reference modern PCL from these types of project: https://github.com/aspnet/Home/issues/1099
Therefore, I should use Class Library (Portable) project for unit testing project.
That's why I can not follow articles http://www.alteridem.net/2015/11/04/testing-net-core-using-nunit-3/ (for NUnit) and https://xunit.github.io/docs/getting-started-dnx.html (for xUnit). Both articles use Class Library (Package) and Console Application (Package) projects.
I can't install 'xunit' package to Class Library (Portable) project. It fails with that error: https://github.com/xunit/xunit/issues/587
I can successfully build Class Library (Portable) project with NUnit 3. But currently there are no test runner that can run NUnit 3 tests for .NET Core. Not sure if latest version of Resharper supports that - in any case Resharper is not an option for me.
It looks that I need to wait either for bug fixes in modern PCL support or for .NET Core-compatible NUnit 3 test runner. Could you recommend any workaround?
The NUnit team and I have released full .NET Core support, including running tests within Visual Studio's Test Explorer. See NUnit 3 Tests for .NET Core RC2 and ASP.NET Core RC2 for more info.

c++ unit test/mock framework integrated into visual studio 2012

I want to use unit tests in VS 2012 in c++. VS allows to write unit tests, run them and see the output in test explorer window. Unfortunately it seems that VS lacks a mock framework. Do You know how to integrate for example Google Test/Mock framework into VS, so that I can still see the test results in test explorer window?

Tutorial for Visual Studio Unit Testing Framework?

I would like start to learn Visual Studio Unit Testing Framework on VS 2012 Express for Web.
Mainly for ASP.NET MVC project.
I already buy the hard copy of Art of unit test from amazon.
But it is lack of tutorial aims for VS unit testing framework.
So any resource i can have?
Another question, when i research on this forum,
I found someone said MSTEST is different from VS unit test framework.
Is the VS 2010 Express built-in unit test is subset of VSTS?
Thanks you.
For all practical purposes mstest is the unit testing framework in Visual Studio 2010. It continues to be the primary unit testing framework in 2012 as well. However now we support extensibility and many 3rd party frameworks like xunit/nunit/gtest etc have adapters for our platform.
For ASP.NET the best place to start is to download the MVC3/MVC4 solutions from Microsoft which contain a rich suite of unit tests with them.