334 questions with Visual Studio Testing tags

Sort by: Updated
0 answers

Linq select new Not Covered %100 in Unit test

Hi Everyone, In unit tests linq select not cover exactly, ı am shared two picture downside. First one result of foreach and select new coverage result. It is exactly made same job. foreach cover %100 but linq select not Second Picture is about record…

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.
10,521 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 tests as a means of analysis or diagnosis.
334 questions
asked 2023-02-06T14:07:12.48+00:00
OZBEKHAN POLAT 0 Reputation points
commented 2023-02-06T14:44:30.97+00:00
Reza Aghaei 4,941 Reputation points MVP
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 tests as a means of analysis or diagnosis.
334 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 27,221 Reputation points Microsoft Vendor
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
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,785 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 tests as a means of analysis or diagnosis.
334 questions
asked 2023-01-30T08:25:14.2166667+00:00
accepted 2023-01-31T02:14:35.0633333+00:00
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.
4,785 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.
961 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 tests as a means of analysis or diagnosis.
334 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…

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.
10,521 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 tests as a means of analysis or diagnosis.
334 questions
asked 2022-07-22T02:01:05.437+00:00
Michael Mastro II 51 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 tests as a means of analysis or diagnosis.
334 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.
4,785 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 tests as a means of analysis or diagnosis.
334 questions
asked 2022-12-12T18:33:51.543+00:00
PEDRO MIGUEL RODRIGUES REIS 1 Reputation point
commented 2022-12-27T13:48:14.657+00:00
Tianyu Sun-MSFT 28,841 Reputation points Microsoft Vendor
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.
4,785 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.
13,114 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 tests as a means of analysis or diagnosis.
334 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,126 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 28,841 Reputation points Microsoft Vendor
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 tests as a means of analysis or diagnosis.
334 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 27,221 Reputation points Microsoft Vendor
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…

.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
324 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.
3,600 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 tests as a means of analysis or diagnosis.
334 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
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…

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.
10,521 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 tests as a means of analysis or diagnosis.
334 questions
asked 2022-12-10T22:50:24.95+00:00
Samuel David 21 Reputation points
answered 2022-12-11T18:55:54.67+00:00
Bruce (SqlWork.com) 59,471 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…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,636 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.
961 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 tests as a means of analysis or diagnosis.
334 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…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,315 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 tests as a means of analysis or diagnosis.
334 questions
asked 2022-12-01T20:33:27.143+00:00
Bob 6 Reputation points
commented 2022-12-02T13:58:46.747+00:00
Bob 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…

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.
3,600 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 tests as a means of analysis or diagnosis.
334 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?

Universal Windows Platform (UWP)
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 tests as a means of analysis or diagnosis.
334 questions
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 tests as a means of analysis or diagnosis.
334 questions
asked 2022-11-30T10:32:36.047+00:00
Bernhard Sumser 111 Reputation points
answered 2022-12-01T13:06:03.117+00:00
Bernhard Sumser 111 Reputation points
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.
4,785 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 tests as a means of analysis or diagnosis.
334 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 28,841 Reputation points Microsoft Vendor
0 answers

UWP Unit Test can not connect to test process.

I have a UWP project LenovoVision that has two reference libraries CameraConfiguration and Lenovovision.Core. Now I create a UWP Unit Test project that references the above three projects. When I click Run All Tests under Test, the output…

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 tests as a means of analysis or diagnosis.
334 questions
asked 2022-11-21T05:38:26.557+00:00
华 张 136 Reputation points
commented 2022-11-25T04:20:21.927+00:00
华 张 136 Reputation points
1 answer

Net Core 6: Microsoft Fakes and WPF Issue

Hello, I hope I posted in the correct forum... I'm in the progress of migrating our WPF from .Net 4.7.2 to .Net Core 6 I run into issues with our test projects that reference WPF and use Microsoft Fakes Please see my demo repo here: …

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,700 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 tests as a means of analysis or diagnosis.
334 questions
asked 2022-08-23T15:47:50.847+00:00
Roy Rosenberg 1 Reputation point
answered 2022-11-18T22:35:55.253+00:00
Roy Rosenberg 1 Reputation point
1 answer

Query regarding App Centre Test Subscription

Does App Centre Test subscription ($99) includes build and distribute features as well ? Please clarify

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 tests as a means of analysis or diagnosis.
334 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,126 questions
asked 2022-11-13T12:16:50.827+00:00
Nilesh G 1 Reputation point
answered 2022-11-14T09:58:05.367+00:00
Tianyu Sun-MSFT 28,841 Reputation points Microsoft Vendor