test-explorer

Why can't the NUnit Test Adapter find my FsUnit tests?

大城市里の小女人 提交于 2019-12-10 17:17:38
问题 I'm using Visual Studio Professional 2015 and I have version 2.0.0.0 of the NUnit Test Adapter installed. It doesn't discover any tests on building the following code: namespace SmallestDivisibleIntegers module Core = let f n = [2..4] |> List.map (fun x -> x + n - n % x) module Tests = open FsUnit open NUnit.Framework open Core [<Test>] let ``Correct answers`` () = f 1 |> should equal [2; 3; 4] f 4 |> should equal [6; 6; 8] f 43 |> should equal [44; 45; 44] f 123 |> should equal [124; 126;

Test are being shown under “External” category in Test Explorer when Grouped By Project

 ̄綄美尐妖づ 提交于 2019-12-08 15:50:02
问题 Whenever I try to run tests on Test Explorer from Visual Studio 2012, SOME test are being categorized as "External", even though the Group By is set as "Group By Project" Then the source code is not recognized 回答1: This is due the pdb file is not included in the compilation. If you're compiling in a solution configuration other than debug you must ensure that pdb is included. To achieve that you must open the advanced build setting: Right click on project and select properties Click on build

Visual Studio Test Explorer window will not open

 ̄綄美尐妖づ 提交于 2019-12-08 14:26:00
问题 For some reason I can't open the test explorer window in Visual Studio 2012. I click Test->Windows->Test Explorer and nothing happens... This problem may have been caused by recently uninstalling DotCover. I did this because my licence expired and I was having issues running tests without it (context menus weren't working). Any suggestions or advice much appreciated! Thanks. 回答1: In VS2012, Test Explorer has a bug in that the window doesn't get focus when you click Test > Windows > Test

I cannot get specflow's code behind files to regenerate

独自空忆成欢 提交于 2019-12-08 13:09:24
When I edit a specflow feature file test, it doesn't update the code-behind file. When I try to manually regenerate the code-behind files by right-clicking the project and choosing 'Regenerate Feature Files' I get an error: Error: cannot find custom tool 'specflowsinglefilegenerator' on this system I've discovered that this usually means I don't have Specflow Extention installed. However, when I look in Extensions and Update in Visual studio I can see that 'Specflow for Visual Studio 2017' is installed. If anyone knows what I can do that would be very helpful. This started when I re-cloned the

I cannot get specflow's code behind files to regenerate

那年仲夏 提交于 2019-12-08 08:50:40
问题 When I edit a specflow feature file test, it doesn't update the code-behind file. When I try to manually regenerate the code-behind files by right-clicking the project and choosing 'Regenerate Feature Files' I get an error: Error: cannot find custom tool 'specflowsinglefilegenerator' on this system I've discovered that this usually means I don't have Specflow Extention installed. However, when I look in Extensions and Update in Visual studio I can see that 'Specflow for Visual Studio 2017' is

How to get console output in Visual Studio 2012 Unit Tests

孤街浪徒 提交于 2019-12-06 16:46:35
问题 I have a managed C++ unit test in VS 2012. The test runs fine and I can verify that a loop with multiple cout calls is executed. However when I look at the test explorer the test is marked as passed but there is no hyper link for the output as I am used to for c# projects. The code at the end of my test is for (int i = 0; i < 4; i++) { cout << parameters[i]; cout << endl; } which I can verify runs as I step through it in the debugger. I have also tried with cerr but no difference. 回答1: You

How to get console output in Visual Studio 2012 Unit Tests

纵饮孤独 提交于 2019-12-04 23:51:32
I have a managed C++ unit test in VS 2012. The test runs fine and I can verify that a loop with multiple cout calls is executed. However when I look at the test explorer the test is marked as passed but there is no hyper link for the output as I am used to for c# projects. The code at the end of my test is for (int i = 0; i < 4; i++) { cout << parameters[i]; cout << endl; } which I can verify runs as I step through it in the debugger. I have also tried with cerr but no difference. You can use Debug::WriteLine() (in the System::Diagnostics namespace) or Console::WriteLine() to write output to

What is the $RANDOM_SEED$ file generated by Visual Studio build of C# solution?

白昼怎懂夜的黑 提交于 2019-12-03 09:04:40
问题 We noticed that on a certain dev machine a Visual Studio (2015 update 3) debug build of a C# solution was generating a $RANDOM_SEED$ file alongside every built DLL. The content of the file is just a single number e.g. 1443972318 Deleting the file(s) then rebuilding resulted in the file being regenerated, with a different number. This behaviour was also observed when rebuilding a single project in the solution (one which has only the standard C# project refs/dependencies + System.Management).

xUnit v1 tests appear in xUnit GUI (xunit.gui.clr4.exe) but not VS 2012 Test Explorer

我的未来我决定 提交于 2019-11-29 07:32:46
I have an F# Class Library with the "xUnit.net" and "xUnit.net Runners" packages installed using NuGet. I have the following code: module XUnitTest open Xunit [<Fact>] let Test () = do Assert.True (1 = 2) () When I run the xUnit GUI (xunit.gui.clr4.exe, which NuGet adds to (projectdirectory)\packages\xunit.runners.1.9.1\tools), and load the assembly built by this project, the Test () method appears, and fails when I run it, as expected. However, I cannot get the test to appear in VS 2012's Test Explorer, no matter how many times I rebuild, restart, etc. If I click Run All, the build output

Getting list of tests from Test Explorer in VS

青春壹個敷衍的年華 提交于 2019-11-28 07:22:07
问题 This is kind of a "high level"/simple question. I'm trying to get just a list of all the tests that are populated in my Test Explorer in VS2012. I'd like to compare it to a list of tests and I was wondering if there is any way to just get all the names out of the Test Explorer, like a copy/paste, export to csv or anything of that nature. 回答1: Select all tests in Test Explorer and add them to a playlist file. Playlist feature needs VS 2012 Update 2. See http://msdn.microsoft.com/en-us/library