MSTest Not Working on Visual Studio 2019 16.4.0 - c#

I'm using MSTest for a test project which was working until I updated Visual Studio 2019 16.2.x to 16.4.0. now when I run all, integration tests that use database not working without any error. But at the build time this message appears as a build result:
but the Test Output Pane is empty.
What should I do??

After searching for the problem, I found that the problem is about .NET Core SDK. Therefore, I reinstalled the dotnet-sdk 2.2.4 and 3.1.100 and tests are working now.

Related

C# code written in Visual Studio won't run in Visual Studio Code

I am trying to run a .NET Core Application in Visual Studio Code that was created in Visual Studio 2019. I'm having trouble with the dotnet run part, though. It keeps giving me this error:
Unable to run your project.
Ensure you have a runnable project type and ensure 'dotnet run' supports this project.
A runnable project should target a runnable TFM (for instance, netcoreapp2.0) and have OutputType 'Exe'.
The current OutputType is 'Exe'.
I have tried dotnet restore, dotnet build, dotnet clean, etc. Any suggestions on how to get this to run?
Terminal Output
I am not sure if this is your problem, but I experienced something similar recently. Some applications coded in VS will not run in VS Code. VS 2019 utilizes IIS Express to run applcations on localhost. I do not believe VS Code has this ability as a text editor, compared to the power of VS 2019 as a IDE.

C# Nunit tests from VS 2013 (Nunit v2.x), won't show in Test Explorer in VS 2017 (Nunit 3.x)

Good Morning
Note: I am new to VS and C# coding. Learning and have the following issue.
PROBLEM STATEMENT:
C# Nunit tests from VS 2013 (Nunit v2.x), won't show in Test Explorer in VS 2017 (Nunit 3.x)
BACKGROUND:
Recently identified good scripts for our application written with VS 2013 with C# based on NUnit 2.x.
I have copied them into my machine with VS 2017 and Nunit v.3.10.1 and Nunit3TestAdapter v.3.10.0.
Note: The Tests are running fine in another machine with VS 2013 and Nunit v2.x
Machine and VS config:
- Windows 10 pro 64 bit OS with 64 bit processor
- VS 2017: Default Processor Architecure is set to X64
- At present, "Active Solution Platform" is set to X86 for build settings for my test project (Build > Configuration Manager).
- VS Nuget Package for Nunit: v.3.10.1
- VS Nuget Package for Nunit3TestAdapter: v.3.10.0
What i have done or tried:
- The test project cs file contains [TestFixture] and [Test] in the correct places
- I have tried cleaning / rebuilding the solution multiple times
- I have tried restarting Visual Studio multiple times
- I researched many articles here and in other venues
- Can't get a straight answer yet if it is possible, or impossible or what is the solution.
Thank you very much!
Andrew
Install NUnit3TestAdapter Visual Studio plugin.
In Visual studio, go to Tools -> Extensions and Updates. At the dialog, choose Online from navigation pane, and in the search bar type NUnit, pick the NUnit 3 Test Adapter plugin and install it. Once done, you will be required to restart Visual Studio and rebuild your test project.
With the help of my friend Fahad, the issue seems to be resolved with the following steps:
Unistalled Nunit3TestAdapter v.3.10.0 and Nunit3 v.3.10.0
Manually removed all the "nunit.*" references
Installed the following via NuGet:
Nunit3 v.3.10.1 and Nunit3TestAdapter v.3.10.0
Nunit.ConsoleRunner v.3.8.0
Updated VS 2017 to the version 15.7.3
So at this point I see all the Tests in the Test Explorer. I have another issue with them not running due to this (but possible it is a different issue):
Warnings for not able to run Tests

Visual Studio 2017 For Mac doesn't show all Nunit Tests

So Visual Studio doesn't seem to register all my Unit Tests. I have no idea how to solve this, and google hasn't been able to help.
Most of the tests is for some reason labeled as "Inconclusive Tests". This is how the built in Unit Tests displays:
P.S. The test runner works fine when I run the tests in a terminal.
.NET Core test projects in Visual Studio for Mac 7.2 has a bug that would cause the test names to appear blank in the Unit Tests window. This problem was fixed in Visual Studio for Mac 7.3.

"Inconclusive: Test not run" error running unit tests in debug mode in Visual Studio / Resharper

I am getting the above error "Inconclusive: Test not run" error when trying to run my unit tests in debug mode in Visual Studio.
I am using Visual Studio 2017 patched with the latest .NET Core 2 release Version 15.3.5 and Resharper Ultimate 2017.1.3
This has only started happening since I installed the latest .NET Core 2.0 patch recently.
This bug has been fixed in R# 2017.2 release build
Another possible answer is to prevent VS from using test settings file. Located in "Test->Test Settings" menu. After changing branches it got enabled somehow without me noticing and tests stopped running. Unchecking it brought my tests back to runnable state.
Test settings file

Unable to run SpecFlow on VS 2012

I have just updated from VS 2010 to VS 2012.
I have installed specFlow 1.9 and NuGet package.
I have also installed specflow package through Manage NuGet packages.
Also configure my app.config to Ms test. Added all the required dll's and genereted the feature file as well as my .cs files.
But still im not able to run or Debug my the specFlow Tests.
While the same settinngs worked on VS 2010. And pressing F5 button also does not work.
Is there any Step that I am missing here or any setting that needs to be done prior to running the tests.
I had the same problem. Found this post on the SpecFlow google group. Setting ReSharper as test runner tool made it work for me. I'm running SpecFlow 1.9.3.1 on Visual Studio 2013.
https://groups.google.com/forum/#!msg/specflow/sb38tqgDaq4/pAeprtPu_PcJ

Categories