Microsoft Q&A

Visual Studio Testing

252 questions

Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
Testing: The act or process of applying a test as a means of analysis or diagnosis.

252 questions with Visual Studio Testing tags

Sort by: Updated
0 answers

Why I can't Fake-Mock "System" in .net core 6.0(VS Enterprise 2022)

Why I can't Fake-Mock "System" in .net core 6.0(VS Enterprise 2022), I don't know what happened?   I was trying to use "using System.Fakes; " , But it alert "missing an assemly reference" after following …

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,436 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,580 questions
asked 2023-01-31T10:06:39.3233333+00:00
Angelina Jolie 0 Reputation points
commented 2023-02-03T07:13:10.4433333+00:00
Angelina Jolie 0 Reputation points
0 answers

How can I call a method of the original class from the its fake class method

I created a fake assembly called MyProject.Web.Customer.Fakes from the project MyProject.Web.Customer. I am trying to call Read method of the MyProject.Web.Customer from its fake object from the test method.The fake class there is a method I have given…

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
asked 2023-02-02T05:06:24.5466667+00:00
Polachan Paily 0 Reputation points
commented 2023-02-03T03:12:42.9866667+00:00
Anna Xiu-MSFT 11,196 Reputation points Microsoft Employee
2 answers

Visual Studio 2019 Not responding after Open it without any solution ?

Hello Dear I Got big problem with my VISUAL Studio 2019 Community >>> First i downloaded it and try top setup its okay but after finished it i can't try it maybe take like 2-5 minutes till open and evry press inside it take maybe 5 minutes too…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,436 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
701 questions
asked 2023-01-20T11:29:08.8833333+00:00
Mohamed Montaser 0 Reputation points
commented 2023-01-31T10:15:15.1066667+00:00
Anna Xiu-MSFT 11,196 Reputation points Microsoft Employee
2 answers One of the answers was accepted by the question author.

How to execute e2e test in visual studio

Hello, I want to know how to execute e2e test in VS 2022 Check the screen shot above.

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,436 questions
asked 2023-01-30T08:25:14.2166667+00:00
Cuiyun Peng (BEYONDSOFT CONSULTING INC) 20 Reputation points Microsoft Employee
accepted 2023-01-31T02:14:35.0633333+00:00
Cuiyun Peng (BEYONDSOFT CONSULTING INC) 20 Reputation points Microsoft Employee
2 answers

Gabled characters produced by Visual Studio 2022

Recently, I started working for migration of my software from Visual Studio 2008 to 2022. After a lot of difficulties with the new IDE, I succeeded in generating the .exe files without errors, one for "Release" version and the other for…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,436 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
696 questions
asked 2023-01-16T03:01:01.33+00:00
Jae Young Lee 0 Reputation points
commented 2023-01-25T13:28:12.2433333+00:00
Jae Young Lee 0 Reputation points
0 answers

Best way to unit test cancellation

Good evening. I have been trying to write a unit test that will test the cancellation of a method. Now I have a unit test written that passes, but I am do not think it is what I am looking to achieve. I have tried a few different ways to achieve the…

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,992 questions
asked 2022-07-22T02:01:05.437+00:00
Michael Mastro II 26 Reputation points
commented 2023-01-25T09:50:02.16+00:00
Christoph 0 Reputation points
2 answers One of the answers was accepted by the question author.

TypeLoadException with different NLog versions in MSTest

Hi, I have a project A (an application) which includes a package B, which in turn contains a third party package C3, which in turn contains another third party package package D3. Both packages A and D3 use the same third party package NLog but with…

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
asked 2022-12-21T16:27:46.807+00:00
Josep Arnau 21 Reputation points
accepted 2023-01-23T08:56:45.16+00:00
Josep Arnau 21 Reputation points
1 answer

Visual Studio 2019 web recorder greyed out on load test

Hello, I've installed Visual Studio 2019 Enterprise on a server, and currently, I only get the web recorder not greyed out when I run the test with the user account I installed visual studio with. This account is local admin. But when try to run it…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,436 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
asked 2022-12-12T18:33:51.543+00:00
commented 2022-12-27T13:48:14.657+00:00
Tianyu Sun-MSFT 13,076 Reputation points Microsoft Employee
1 answer

Getting build error after selecting "automatically deploy the database project before unit tests are run" checkbox in SSDT visual studio 2022

In new visual studio update “Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.4.3”, After selecting the “automatically deploy the database project before unit tests are run” checkbox in SQL Server Test Configuration, when I tried…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,436 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
8,557 questions
Microsoft Build
Microsoft Build
A Microsoft platform for building applications with Visual Studio and .NET on Windows.
369 questions
asked 2022-12-15T12:34:08.593+00:00
Abhinay 51 Reputation points
commented 2022-12-26T06:10:04.003+00:00
Tianyu Sun-MSFT 13,076 Reputation points Microsoft Employee
1 answer

how to use text files to run tests

hi i would like to know hoe can i use text files to run tests us it posible to use the as input and expected output? is so haw is it done in VS 2022?

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
asked 2022-12-22T02:10:39.933+00:00
safi פרבר 1 Reputation point
answered 2022-12-22T09:58:47.863+00:00
Anna Xiu-MSFT 11,196 Reputation points Microsoft Employee
2 answers

Unit testing C++ CLR

What is the best approach to write Unit Tests for C++/CLR? We have a solution that includes C++ native, C++/CLR and C#.Net code. When I try to add a C++/CLR reference to a C#.net Unit Test project, it compiles, but when I run the tests it says…

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
291 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,631 questions
asked 2022-11-08T11:49:22.9+00:00
Günther Humer 1 Reputation point
answered 2022-12-13T16:41:03.227+00:00
Günther Humer 1 Reputation point
2 answers One of the answers was accepted by the question author.

How to see code coverage percentage in VS22 Enterprise?

Hey, we're moving from VS2019 Enterprise to VS22 Enterprise. In 2019 the code coverage looks like described here:…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,436 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
asked 2022-12-09T09:56:17.903+00:00
Micha Vosse 21 Reputation points
accepted 2022-12-12T08:31:24.193+00:00
Micha Vosse 21 Reputation points
1 answer

How to write Unit test for DAL which call stored procedure and direct sql commands

Hello Everyone, I am writing unit test cases(using xunit) for DAL methods(which are calling stored procedures and some direct sql commands and not returning methods). How can I mock the results coming from db in unit tests. public class…

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,992 questions
asked 2022-12-10T22:50:24.95+00:00
Samuel David 1 Reputation point
answered 2022-12-11T18:55:54.67+00:00
Bruce (SqlWork.com) 28,196 Reputation points
1 answer One of the answers was accepted by the question author.

error System.Data.SqlClient.SqlException: 'Incorrect syntax near '´'.' in VB.NET (Windows Forms)

Im on vb.net framework version 4.8.1 Using an online database code Public Class register Private cmd As SqlCommand Private Sub register_btn_Click(sender As Object, e As EventArgs) Handles register_btn.Click Dim con As New…

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
696 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
1,832 questions
asked 2022-12-06T20:55:46.483+00:00
Mariwa 21 Reputation points
accepted 2022-12-06T21:23:36.663+00:00
Mariwa 21 Reputation points
0 answers

Compile error when adding Xamarin iOS app to solution with .NET 6 NUnit test project

This came up as a result of attempting to upgrade our test projects from .NET Core 3.1 to .Net 6 in our solution that includes a Xamarin iOS app. It happens on the macOS-11 build agent in azure dev ops and also on my development mac running Visual Studio…

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,818 questions
asked 2022-12-01T20:33:27.143+00:00
Bob Carney 6 Reputation points
commented 2022-12-02T13:58:46.747+00:00
Bob Carney 6 Reputation points
0 answers

Microsoft.CodeCoverage.Console.exe don't remove C++ compile time code

Hello, I generate C++ code coverage with Microsoft.CodeCoverage.Console.exe. I have the following code : template<typename type_t> [[nodiscard]] static constexpr type_t* allocate_array(const usize count) noexcept…

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,631 questions
asked 2022-11-18T09:46:30.333+00:00
julian lalu 21 Reputation points
commented 2022-12-02T09:30:48.94+00:00
julian lalu 21 Reputation points
1 answer One of the answers was accepted by the question author.

uwp code coverage does not take effect

I created a UWP project and then created a UWP Unit Test. Running all tests is normal, but Analyze Code Coverage for All Tests is invalid and the result is 0 What can I do?

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
Universal Windows Platform (UWP)
asked 2022-12-01T14:09:32.343+00:00
华 张 136 Reputation points
commented 2022-12-02T06:47:47.367+00:00
华 张 136 Reputation points
3 answers One of the answers was accepted by the question author.

Can't run vstest

Hello all, I try to automate the UnitTests for our Azure Build Pipeline, but getting this error: Starting: Test run for Test plans ============================================================================== Task : Visual Studio…

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
asked 2022-11-30T10:32:36.047+00:00
Bernhard Sumser 101 Reputation points
answered 2022-12-01T13:06:03.117+00:00
Bernhard Sumser 101 Reputation points
2 answers

Getting error (MyClassName).MyClassInitialize has wrong signature. The method must be static, public, does not return a value and should take a single parameter of type TestContext.

I'm running in VS 2022 with .NET Framework 4.8 I'm referencing NuGet packages MsTest.TestAdapter and MsTest.TestFramework 2.2.10. I'm getting this error for a lot of tests (MyClassName).MyClassInitialize has wrong signature. The method must…

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,992 questions
asked 2022-11-25T18:27:45.147+00:00
John Mann 1 Reputation point
answered 2022-11-29T10:14:16.057+00:00
John Mann 1 Reputation point
1 answer

Unable to see Intellitest dropdown in Visual Studio 2022

TL&DR Running Visual Studio Enterprise 2022 for Windows 10 Home [See ScreenShot] Created Library for Dotnet 6 (ClassLibrary2) Created Library Test for Dotnet 6 (ClassLibrary2Tests) No Intellitest Drop Down Dear Internet, …

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,436 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying a test as a means of analysis or diagnosis.
252 questions
asked 2022-11-29T02:51:21.55+00:00
Vic Jay 1 Reputation point
answered 2022-11-29T06:44:32.123+00:00
Tianyu Sun-MSFT 13,076 Reputation points Microsoft Employee