Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
92 views

When attempting to add additional folders to my MSTest project and creating test class files within them that have tests that use the DataTestMethod tag with DataRow. Test explorer improperly ...
calkinss1's user avatar
Advice
0 votes
1 replies
36 views

So how do I convert a TRX file into html in azure test pipeline. We have a selection of pipelines which run tests on a nightly basis. The tests are designed in Visual Studio with C#, Playwright, ...
Kev's user avatar
  • 456
-1 votes
2 answers
101 views

I need to have every invocation from the ILogger interface of a test, but I mock the ILogger interface in the class that is going to be tested, so it won't write to console and therefore the ILogger ...
FlorianD's user avatar
  • 123
1 vote
2 answers
226 views

using Visual Studio 17.14.18 I'm asking Visual Studio to give me a code coverage report, which it does. But there are lots of methods being used by the completed / passing tests that are not included ...
TRH's user avatar
  • 474
1 vote
1 answer
61 views

We use MsTest for integration testing involving communication with hardware, and in our case, multiple threads are needed. We do not require any parallel text execution, so all tests run sequentially. ...
Mattias Ström's user avatar
0 votes
0 answers
55 views

I am currently loosing it about the attempt to generate test coverage reports for a current Corpo project. This worked flawlessly quite some time and is now running wild. The tests are done using ...
Thomas's user avatar
  • 84
2 votes
1 answer
112 views

With Microsoft Visual Studio Community 2022, Version 17.14.12 VisualStudio.17.Release/17.14.12+36408.4 Microsoft .NET Framework Version 4.8.09032 and this simple mstest project content: <Project ...
avigt's user avatar
  • 602
0 votes
1 answer
28 views

When mocking like this: transmissionsRepository = new Mock<TransmissionsRepository>(transmissionsContext, httpContextAccessor.Object, transLogger.Object); controller = new UtilityController(...
Post Impatica's user avatar
0 votes
1 answer
98 views

I just ported all our test projects to MSTest.Sdk But now I wonder how to deal with the TestHelperProject (This is a project providing Assert-Helpers, Config-Helper etc for the tests) so it is not a ...
Robert's user avatar
  • 41
0 votes
1 answer
117 views

I'm currently using .NET Framework 4.7 along with MSTest (all packages are up to date). I'm trying to deserialize a JSON string using System.Text.Json as shown here: using System.Text.Json; private ...
undrgng's user avatar
2 votes
1 answer
102 views

For a project I'm working on, I'd like to insert testdata before every test and then rollback the transaction for the next test to start with a clean slate. The skeleton code below works fine for that:...
Caramiriel's user avatar
  • 7,385
0 votes
1 answer
84 views

Each unit test is supposed to be self contained, but unless we had some way of killing the entire process for each test, there is no way in .NET to guarantee another test hasn't done anything that ...
Brad's user avatar
  • 1,423
-1 votes
1 answer
69 views

The method marked with [TestCleanup] will be run after test methods marked the [TestMethod]. But I want to run different clean-up logic for each test methods. How to do that?
zwcloud's user avatar
  • 4,976
0 votes
1 answer
63 views

So we have numerous pipelines that run Selenium or Playwright tests overnight. The test suites are built using C# with selenium or Playwright and MsTest. The end result does not display the actual ...
Kev's user avatar
  • 456
1 vote
1 answer
181 views

I'm upgrading a Xamarin Forms project to MAUI taking the projects to .NET 8 and everything seems to be working alright until I try and run tests. The app works and all of my tests show in the Test ...
dghalbr's user avatar
  • 71
-1 votes
1 answer
92 views

I have a project that checks for a particular solution build Configuration (DevDeploy) to deploy itself to a dev server: I don't want that project to build and therefore prevent running a dev ...
Daryl's user avatar
  • 19k
1 vote
1 answer
104 views

As a learning exercise, I'm trying to test some F# code using MSTEST. I've run into a problem that is driving me crazy, not because I can't work around it, but because I don't understand how to ...
John Christopher Linstrum's user avatar
2 votes
1 answer
46 views

Issue Is there a way when using MSTest that has a class decorated with DynamicData to get the current iteration. Example: // Some static file public static IEnumerable<object[]> TheData() { ...
Post Impatica's user avatar
0 votes
1 answer
173 views

I'm using MSTest with parallel execution at the class level in my .runsettings file. Some test classes handle web tests, while others perform the same operations without web tests. The Issue In ...
Mustapha BOUFARA's user avatar
1 vote
1 answer
83 views

I use Visual Studio 2022 and MS Test. To generate code from proto file I use Grpc.Tools (2.69.0) and Google.Protobuf (3.29.3) nugets. I don't know how DynamicData feature works under the hood, but it ...
theateist's user avatar
  • 14.5k
5 votes
1 answer
685 views

I am using Visual Studion 17.12.5 and I am experiencing the following problem. After upgrading the MSTest-package from 3.7.3 to 3.8.0 and Microsoft.NET.Test.Sdk from 17.12.0 to 17.13.0 the most of my ...
Joe Care's user avatar
  • 105
2 votes
1 answer
1k views

With the demise of Specflow we have completed a test conversion of one of our test projects to Reqnroll. All appears to be working very well with 1 annoying situation involving Scenario Outline's They ...
Kev's user avatar
  • 456
0 votes
0 answers
78 views

I have a unit test that currently posts an array of order lines to a third party vendor. They have requested that I change the code to send each order line as a single JSON payload. Making the code ...
ChrisP's user avatar
  • 47
0 votes
1 answer
63 views

Let's say I have a class ComponentDefinitionRoot which implements the IEquatable interface: class ComponentDefinitionRoot: IEquatable<ComponentDefinitionRoot> { public string Id {get; set;} ...
David Mason's user avatar
  • 1,551
0 votes
1 answer
638 views

I have created a (fresh) solution in Visual Studio 2022 17.12.4 with the following projects: ClassLibrary1 (.NET framework 4.8) Has System.Text.Json installed version 9.0.1 Has a static method Just....
J.P.'s user avatar
  • 11
0 votes
1 answer
79 views

I have the following unit test which runs fine locally (simplified and anonymised): [TestMethod] public void GotoPageCommand_Calls_PCCollection_SearchPage() { var page = 100; var sut = CreateSut();...
Blingers's user avatar
  • 891
0 votes
0 answers
95 views

I'm struggling to get this bidirectional stream gRPC endpoint to work in unit tests with canceling an application's startup. I've tried googling and copilot all day yesterday and I'm going in circles. ...
ZyronnSorrow's user avatar
0 votes
1 answer
62 views

I'm working with a custom test adapter being used in MSTest + dotnet test + Visual Studio, and have come across many transitive dependencies clashing in versions (specifically System.Memory, System....
user avatar
0 votes
1 answer
110 views

We recently started to use VerifyTests/Verify on Mstest .Net 8. Projects. One of my colleagues has an error on local build: CS0119  'TestContext' is a type, which is not valid in the given context ...
Michael Freidgeim's user avatar
0 votes
1 answer
153 views

When I am debugging unit tests in Rider, I am getting a COMException: System.Runtime.InteropServices.COMException (0x80070490): Element not found. (Exception from HRESULT: 0x80070490) at Microsoft....
Developer's user avatar
  • 457
0 votes
0 answers
52 views

I am trying to find the correct configuration steps for MSTest in VSCode. Platform: Ubuntu VSCode: 1.95.3 C# Dev Kit: 1.15.2 (pre) I have two MSTest project below: Codificer.Testing & ToolKit ...
IAbstract's user avatar
  • 19.9k
1 vote
0 answers
196 views

I am updating nuget packages for my solution so when updated MSTest.TestAdapter.2.2.10 -> MSTest.TestAdapter.3.6.3 MSTest.TestFramework.2.2.10 -> MSTest.TestFramework.3.6.3 Locally things ...
Mandeep Singh's user avatar
0 votes
1 answer
135 views

I am trying to read an xlsx file using CloseXlm so I created the below ReadFile method. In order to test it, I've created a test method using MSTest and another method that creates an xlsx file and ...
Luciano Umpierrez's user avatar
0 votes
1 answer
66 views

using Microsoft.VisualStudio.TestTools.UnitTesting; using System; namespace PdbLib { public static class AssertExtensions { public static void AssertVec3Equal(this Assert assert, Vec3 ...
user366312's user avatar
  • 17.5k
1 vote
0 answers
23 views

TLDR: I have a unit test DLL file from another solution. I want to reference that dll and run its tests IN ADDITION TO the tests already in the current project / solution. We have developed an app ...
Jonathan Hart's user avatar
1 vote
2 answers
128 views

I am trying to make a subclass of Task that cancels itself and waits when it is disposed. While unit testing I got strange failing test cases. In the end it boiled down to repetition; I could even run ...
GreatBarrier's user avatar
2 votes
1 answer
75 views

I'd first like to state that I'm new to StackOverflow, unit testing with NSubtitute and to working with actions/delegates in C# - so apologies in advance for any misuse of formatting and/or ...
GraySquid's user avatar
0 votes
0 answers
48 views

I am getting below COM Exception when running more than one test case at a time. "Create an instance of a component with CLSID COM's {} from IClassFactory failed due to the following error: ...
Ak C's user avatar
  • 53
0 votes
1 answer
314 views

I am facing an issue where the .runsettings file is not affecting the execution of my tests when I run them through the ReSharper test runner. However, when I run the tests using Visual Studio’s built-...
Roy Guggenheim's user avatar
1 vote
2 answers
114 views

Suppose we wish to test the following method. It's a contrived network call that logs a warning if the request failed and then throws after three attempts. private async Task<...
user1393477's user avatar
0 votes
1 answer
164 views

I have an MSTest unit test that runs fine without the [DataSource] attribute. However, when I add a [DataSource] attribute to read from a CSV file, MSTest fails to discover the test. Here's the test ...
Pulkit Sharma's user avatar
0 votes
1 answer
163 views

I am trying to write a custom TestMethodAttribute that allows to annotate a test with some meta information that should be output in the .trx file generated by the test runner of MSTest. I therefore ...
Michael Lihs's user avatar
  • 8,380
1 vote
0 answers
272 views

I'm writing unit tests where the SUT is a queue; the language is C#, and I'm using the MSTest framework. One method in the queue, async Task<int[]> DequeueAsync(int count), waits until the ...
JustAsking's user avatar
0 votes
1 answer
180 views

I am building a project for Revit and now want to build unit tests for my C# code. The issue I am running into is that whenever I actually build the project and reference my project I get an error ...
JayPee's user avatar
  • 21
2 votes
2 answers
298 views

I am writing tests in MSTest for a WPF application that contains calls to async void methods (fire-and-forget pattern). My goal is to run this code synchronously during tests. Is this possible? I have ...
Rye bread's user avatar
  • 1,901
0 votes
0 answers
163 views

Background I'm using MSTest and NSubstitute to build unit tests against some Azure Functions. These are .net 8, running in isolated mode. I'm working in VS2022 and using Test Explorer to run the tests....
user71030's user avatar
  • 447
0 votes
1 answer
72 views

I am quite new to Selenium and MSTEST. I have been able to run some test cases but struggling to organize things. I have a scenario where I have a test case which tests the creation of an Account ...
Jimmy's user avatar
  • 1
0 votes
1 answer
277 views

I'm trying to get MSTest unit tests updated from .Net 4.7.2 to .Net 6.0 for 2 large solutions and have picked on a single test project in each to convert first, leaving the remaining test projects in ...
Chris Martin's user avatar
0 votes
1 answer
36 views

I have a test where a json with a number is deserialized, then serialized, then both jsons (original an deserialized-serialized) are compared for string equality. The project is built for net8.0 and ...
Kjara's user avatar
  • 2,956
1 vote
0 answers
37 views

In my unit tests, I want to be able to validate the content message of the exception but since our build servers farm has clients in french and english, the message changes between runs and ends up ...
bkqc's user avatar
  • 1,031

1
2 3 4 5
74