I had everything working until a few days ago. After latest update of VS, VS is not able to discover tests. I have tried updating MSTest.TestFramework, MSTest.TestAdapter, Microsoft.Net.Test.sdk nuget pacakges as well but VS studio is still not able to discover the tests.
Warning : A testsettings file or a vsmdi file is not supported with the MSTest V2 Adapter.
[12/21/2019 11:19:36 AM Warning] No test matches the given testcase filter `FullyQualifiedName=Microsoft.ConvAI.FrontEnd.End2EndTests.ConvAIClientTests.VerifyBotGetsRecognitions` in D:\Git\Skyman\conversational-ai\src\Testing\Microsoft.ConvAI.FrontEnd.End2EndTests\bin\Debug\netcoreapp2.1\Microsoft.ConvAI.FrontEnd.End2EndTests.dll
[12/21/2019 11:19:36 AM Informational] ========== Run test finished: 0 run (0:00:07.7975681) ==========
Can someone please help me to fix this?
It was runsettings file which I had to uncheck "Run settings file" from "configure run setting" option under test menu.
Related
When I go to Test > Analyze Code coverage > All Tests, the output is "0 found". How do I get Visual Studio 2013 to pick up my XUnit tests?
This shows up in the output window the first time I try (Output > Tests).
------ Discover test started ------
NUnit VS Adapter 2.0.0.0 discovering tests is started
NUnit VS Adapter 2.0.0.0 discovering test is finished
========== Discover test finished: 0 found (0:00:00.4240424) ==========
If I try a second time, the output window is blank.
Am I supposed to look somewhere else?
I'm using ReSharper to run my tests. ReSharper works, but VS's Test > Run all Tests doesn't find any tests either.
As per Lex Li, I installed the NuGet package xunit.runner.visualstudio, which resolved the issue
I have to enabled diagnostic mode of MSBuild project build output verbosity to see this:
1>Done executing task "EnableExtension" -- FAILED. (TaskId:81)
1>Done building target "DeployVsixExtensionFiles" in project "myextension.csproj" -- FAILED.: (TargetId:93)
...
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.27
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
My problem is I cannot debug the Visual Studio extension package I'm working on, as the build output says something has failed. What's wired, the obj and bin folders with all content inside (including vsix package), has been created. I don't really know what special I've changed, because few hours ago everything was fine.
How can I investigate what has gone wrong ?
Btw: I'm using VS 2012 Premium Update 1
EDIT:
I remembered what I've done. While being in debug mode, I entered Tools -> Extensions and Updates, and uninstalled my currently debugged extension (without restarting VS after that operation). Further attempt of debugging (F5 after CLOSING Experimental Instance of VS) results in this mysterious build behavior.
My current workaround I've come up with after some time is to change the display name of the extension package in the source.extension.vsixmanifest file:
<Metadata>
...
<DisplayName>Change this name to sth else and press F5</DisplayName>
...
</Metadata>
Nothing else needs to be changed (unfortunately reversion to old name still fires this error, but at least developing and debugging can be continued).
UPDATE:
I've checked the windows registry for such problematic name, and found following PendingDeletions key:
HKEY_USERS\S-1-5-21-1832937852-2116575123-337272265-599953\Software\Microsoft\VisualStudio\11.0Exp\ExtensionManager\PendingDeletions
Under this key there is value pointing at my extension I've previously uninstalled (while being in the debug mode):
C:\USERS\G_159\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\11.0EXP\EXTENSIONS\JAROSLAW WALISZKO\MYEXTENSION\1.0\
Removal of this entry fixes that case.
Davide Icardi commented:
Another solution is to manually open the Visual Studio experimental instance. Starting it caused all the pending extensions to be deleted automatically.
To start the experimental instance, run this command in a developer command prompt:
devenv.exe /RootSuffix Exp
Update: I'm dumb - after installing the VS 2013 SDK, there's a shortcut to start the experimental instance in the Visual Studio 2013 folder of the Start menu.
I try to configure the MSTest Settings ssection [Step 3 Runner: Visual Studio (sln)]. My particular configuration require to call a set of scripts (TestSetup.cmd) before the tests. Everything works fine in Visual Studio, but I don't know how to call the scripts from TeamCity.
I tried to add in the MSTest metadata the .vsmdi file but without success. The script are not executed.
My question is how to call the command from TeamCity in the MSTest Settings section?
Thank you and best regards!
testrunconfig file:
This is a default test run configuration for a local test run.
MSTest Settings screen shot TestSetup.cmd
Versions :
TeamCity Enterprise 5.1.3
Microsoft Visual Studio Team System 2008 Development Edition
I
Add a build step before the MSTest runner which runs your testsetup.cmd.
I am using Bamboo [from Altassian] and it uses the devenv.com builder to build solution files. Currently, I seem to be getting a "false" error in my builds - that I've tried to solve by myself but just can't - so I thought I would ask.
Each build succeeds normally - without errors stemming from code - but seems to instead give this error
Package 'Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage, Microsoft.VisualStudio.QualityTools.TestCaseManagement, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed to load.
I've no idea why this is causing problems in the devenv.com environment and I can't figure out either how to "ignore" this error by some build command?
Try this ( from MSFT support )
Can you check if the dll is in the global assembly cache (open a VS 2010 command prompt
(Start | All Programs | Microsoft Visual Studio 10.0 | Visual Studio Tools))
Type in
Gacutil –l > list.txt
Notepad list.txt
Do you see an entry like
Microsoft.VisualStudio.QualityTools.TestCaseManagement, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL
If so, from the same command prompt, run fuslogvw, go to settings, select log bind failures to disk, select ok
Run your command line
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com /Build "Release|Mixed Platforms" "D:\Builds\19\Test VizXView\VizXView v1.8 Test Release Build - Weekly\Sources\VizXView v1.8\VizXView 1.8.sln"
Click on the refresh button in fuslogvw. Do we get any bind errors?
I had a similar issue related to running unit tests on a build server that was using devenv.exe (not devenv.com). I had a premium VS installed on the build server but I'd written the unit tests with ultimate (which 'has' load testing, even tho I'd not used it). I used fusion viewer to work out that the missing dll was LoadTest.dll which I copied from my laptop to the buildserver, I also removed references in my solution that were in version control to: *.vsmdi and *.testsettings (they're deprecated) and I removed from the build def a reference to a .testsettings file.
My guess would be that even though I wasn't running a load unit test the build agent was trying to load the LoadTest libs just in case. Hope that helps
edit ---
ok, my own problem here was that I've got both vs2010 and vs2013 on my laptop. When I added the first test project to my VS2010 solution, the project added actually has a dependency on the 2013 version of the UnitTestFramework.dll. My build server only has vs2010 on it so I got the missing assembly error. Switching the reference to the 2010 version fixed this.
I've recently installed VS 2010 Ultimate, and decided to move a project to TeamCity, The project contains a few *.dlls with unit tests inside.
In VS 2008 the setup procedure, at the build runner stage, would consist of :
Setting the path to the *.sln file
Setting the VS version (2008)
Setting the target(s) such as : "Clean Build"
Setting the configuration such as : "Debug"
Setting the platform sucha as : "any cpu"
Checking the "Enable MSTest tests" checkbox
Setting the path to MSTest.exe (pickable from the list of shortcuts)
Listing the assembly files : (1st one beging the dll called : Microsoft.VisualStudio.QualityTools.MSBuildTasks.dll)
Picking the MSTest *.trx test results file
In VS2010 the forementioned dll file is gone, and I'm unable to setup the MSTests, does anyone have a recipe how to do that?
edit : replaced config file with the *.trx file line
I am currently using MSTest with VS2010 on TeamCity and the tests are working perfectly. These are the only steps I had to do for the MSTest part:
Checking the "Enable MSTest tests" checkbox
Setting the path to MSTest.exe (pickable from the list of shortcuts)
Listing the assembly files
I did not have to select the .trx test results file or add Microsoft.VisualStudio.QualityTools.MSBuildTasks.dll to the list of assemblies, and all of the other fields in the 'MSTest Settings' section are empty.