test-explorer

How do you fix Specflow “<unknown project>” issue in Visual Studio

家住魔仙堡 提交于 2020-01-16 13:10:13
问题 Background I have been working on a project and noticed that one of my Specflow Scenarios needed updating. I updated the Specflow Scenario by splitting it into two different scenarios (one for an invalid test and one for a valid test). After this I then regenerated the feature.cs file, cleaned and rebuilt the solution. (I am using Microsoft Visual Studio Enterprise 2019 Version 16.4.1) Issue This is when the "unknown project" appeared in my Test Explorer that consists of one test... the one I

Why are scenario outlines shown as 'External' in the VS 2012 Test Explorer?

徘徊边缘 提交于 2020-01-13 08:56:06
问题 I have a scenario outline (a.k.a scenario template) and I wish to list my tests using the VS 2012's Test Explorer. The default test grouping is done by the "Project" name - if I stick to it, my tests coming from scenario outlines are in the group "External" and not under the group of my project. Why is this and is there a solution/workaround to it? My scenario is that I'd like to run all of my tests for a given project using the Test Explorer. Setting the same trait for all of them is silly

How do I send log4cplus appender output to a memory buffer?

不问归期 提交于 2019-12-23 05:52:10
问题 I'm writing a logger that works for both managed and unmanaged code so I'm using log4cplus under the Test Driven Development (TDD) paradigm with Visual Studio 2013 Unmanaged Code Unit Tests under Test Explorer. Trouble is, I can't figure out how to send log4cplus output to the Assert statements. How do I send log4cplus output to a memory buffer that I can access in the Unit Tests? If I have to write a customized appender , what would that look like? 回答1: You would have to create your own

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

微笑、不失礼 提交于 2019-12-18 05:05:11
问题 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

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

女生的网名这么多〃 提交于 2019-12-18 05:05:06
问题 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

Visual Studio Test Explorer For Python Django Tests with Database Access

邮差的信 提交于 2019-12-14 01:25:54
问题 Starting test runs from Visual Studio Test Explorer doesn't call database creation and Django setup() before running the test(s). My current workaround is to call something like this, which I keep in config.settings.test def setUpTestingWithDatabase(): import os from django.test.utils import setup_test_environment from django import setup os.environ["DJANGO_SETTINGS_MODULE"] = "config.settings.test" setup_test_environment() setup() by adding this code to the top of every test file: import sys

The test method is not being shown in test explorer VS2013

我是研究僧i 提交于 2019-12-11 12:31:27
问题 I'm at the beginning of testing a calculation method. I did clean, rebuild, x64 adjustments to the project and I have nunit test adapter and other related dlls yet I still cannot see the test method in test explorer pane. Could someone help, is there something missing about the code or what? namespace Ninja.Tests { [TestFixture] public class SinglePricingTests { [Test] public void ShouldCalculate() { var pricingModelTest = new PricingModel(); var Sut = new PriceCalculationService(); // Sut:

Windows 8 App in Visual Studio 2012 - NUnit Test Adapter sees unit tests but does not run them

可紊 提交于 2019-12-11 06:01:18
问题 I have a Windows 8 Store App with two projects within the solution - one project exclusively for tests. I have added NUnit and NUnit Test Adapter (https://www.nuget.org/packages/NUnitTestAdapter/1.0.0) for this through nuget. My tests are detected - but I cannot run or debug them. Looking at the test output window, I get the following error: Could not find test executor with URI 'executor://nunittestexecutor/'. Make sure that the test executor is installed and supports .net runtime version 4

How do I increase heap size for running .NET Core 1.x/2.x tests in Visual Studio 2017?

北城余情 提交于 2019-12-11 02:59:35
问题 My tests run all the way through on the command line (using dotnet.exe test ), but when running them within Test Explorer in Visual Studio 2017, some of the tests are crashing. Due to notes I have from prior debugging efforts, one particular test crashes with an out of memory exception (I had to reduce the scope of the test in order to prevent it from crashing). I am testing on .NET Framework 4.5.1, .NET Core 1.0, and .NET Core 2.0 (the current scenario is on .NET Core 1.0). What I am