Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
2 answers
73 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
  • 113
1 vote
1 answer
50 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
2 votes
1 answer
92 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
  • 600
0 votes
1 answer
72 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
2 votes
1 answer
97 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,375
-1 votes
1 answer
64 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,966
1 vote
1 answer
167 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 vote
1 answer
99 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
0 votes
1 answer
157 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
5 votes
1 answer
651 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
0 votes
0 answers
72 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
603 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
0 answers
89 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
103 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
0 answers
49 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
0 votes
1 answer
125 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
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
2 votes
1 answer
69 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
1 answer
307 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
0 votes
1 answer
157 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
1 vote
0 answers
268 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
2 votes
2 answers
279 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
1 answer
60 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
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
0 votes
0 answers
49 views

I have an existing library containing unit tests. I want to transform that library into a service that periodically runs the unit tests and emit metrics. I solved the bits to create a service and to ...
stan's user avatar
  • 57

1
2 3 4 5
74