Questions tagged [vstest]
Visual Studio Test (VSTest.Console.exe) is a test runner developed by Microsoft.
306
questions
0
votes
1answer
24 views
VSTest Task Parallelization for each test assembly
I have the scenario where I have multiple test assemblies: TestAssembly1.dll, TestAssembly2.dll, TestAssembly3.dll, ...
Each of these assemblies contains multiple tests but within one assembly tests ...
0
votes
0answers
23 views
coverlet not executing unit test cases
I am trying to run unit test cases and get code coverage via cobertura for .NET framework 4.6.
when i execute coverlet command no unit test cases get executed.
C:\Users\**\Desktop\Newfolder\coverlet....
0
votes
1answer
43 views
Failed to parse result files when VSTest is run Azure pipelines
I have added the below steps to run unit test in Azure pipelines for React UI.
Added a file , File name:jestTrxProcessor.js. The content:
var builder = require("jest-trx-results-processor/dist/...
0
votes
1answer
63 views
Publish test result fails for VSTest in Azure Devops
I have added the below steps to run unit test in Azure pipelines for React UI.
Added a file where package.json file resides:
File name:jestTrxProcessor.js.js
The content:
var builder = require("...
0
votes
1answer
31 views
Azure Devops can't run .NET Framework and dotnet core unit test in the same CI task
I have a solution with .NET framework / .NET Core projects.
library.csproj (.net standard)
library.UnitTests.csproj (.net framework)
WebApi.csproj (.net core)
WebApi.UnitTests.csproj (.net core)
And ...
0
votes
0answers
16 views
Running VSTest using msbuild. Or; whats the difference between 'dotnet msbuild' and 'msbuild'
We have a quite old and big codebase that is tested using NUnit. For years, we have used NUnit Console Runner, but since that runner still don't support .NET Core, we have decided to try out the ...
0
votes
1answer
58 views
xUnit tests run locally but not on Azure DevOps
I have xUnit tests which run fine locally but do not get run on Azure DevOps. The assembly under test is a .NET 5.0 assembly as is the test assembly.
Examining the log file from the VsTest task, I ...
0
votes
1answer
22 views
How can I am filter NUnit tests when running vstest.console.exe
2
1
I have a suite of automated tests (some with SpecFlow, some with NUnit), that I run as part of my TFS build (using visual studio online, with a hosted build agent).
Some of my tests (acceptance ...
0
votes
0answers
19 views
How to do parallel test execution in VsTest
We have using Jenkins as CI tool with VSTest.exe as testrunner. I want to reduce time using parallel with cuurent setup of Jenkins and VStest.
4
votes
0answers
38 views
Is it possible to run tests programmatically on assembly in memory?
Scenario
Dot net mutation tool that makes a mutation, runs tests, gathers results, and repeat like 2000 times. Mutations happen in memory, writing the mutated assembly to a disk for every mutation is ...
0
votes
0answers
18 views
vstest.console stops execution on failed test; exit code 1
Other posts indicate that vstest.console should continue running as if running all tests in the IDE. Is the expected behavior on a failed test to simply stop? If so, is there a way to circumvent ...
2
votes
0answers
72 views
What causes vstest to hang after executing all tests successfully
We are using the Visual Studio test framework and C# to write unit tests, and we recently ran into a problem where vstest.console.exe sometimes hangs after executing all the tests. All tests pass, but ...
0
votes
0answers
61 views
SpecFlow tests fail on retry in Azure Pipeline
Hi Stack Overflow Community,
We are running SpecFlow tests in a CI/CD Azure Pipeline. The SpecFlow Scenario Outline tests are failing during the Azure Pipeline Retry Process.
We are using the ...
-1
votes
1answer
340 views
Azure Devops VSTEST Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
I am having an error in the dotnet Core step
I am trying to integrate my selenium test to Azure devops
This the logs of the dot net step
2020-10-16T03:11:25.7523865Z ##[section]Starting: Run Selenium
...
0
votes
1answer
86 views
How to run a BOOST test using vstest.console.exe?
I am using BOOST test to test my C++ code. The tests typically look like below and the test project is built as a exe. In order to collect Code Coverage information, I am hoping to be able to run my ...
1
vote
0answers
17 views
Run tests functionality is disabled in TRX [closed]
I have a trx file generated on a vm after a test run using vstest.console.exe. When I open the trx file in Visual Studio 2017 on the same vm, the Run Deployed Checked Tests, Debug tests buttons are ...
1
vote
0answers
41 views
How to force parallelization of tests on Azure+Nunit?
We are setuping our current solution on azure devops.
We have a big bunch of tests(some unit tests, some integrations tests) all running with NUnit.
We have configured the test like this:
- task: ...
0
votes
0answers
28 views
How to filter tests by CustomAttributes using dotnet vstest with NUnit
I'm trying to run selective tests from command line that have different custom attributes like in the example below:
[Test]
[Category("Sanity"), Category("All")]
[...
0
votes
1answer
161 views
Where to find logs for failed VSTest in Azure Devops?
Have an Azure Devops pipeline for app service deployment running on hosted agent in Windows 2019 VM inside of a VNET. Last step of of deployment tasks is to run integration tests but its failing with ...
1
vote
0answers
50 views
vstest.console.exe does not pick up npm packages (jest and jest-editor-support)
I can run jest tests fine via a .njsproj but with a .csproj project and a node_modules located at \ClientApp vstest.console.exe does not find the packages needed.
https://stackoverflow.com/a/64064559/...
0
votes
1answer
39 views
Azure pipeline- VsTest - testAssemblies does not captures TestMethod log
Is there anyway where we can capture test method's logs
For example: - I wrote a test method which compares the same data type lists from database A and database B.
And then , Assert.AreEqual(listA....
0
votes
1answer
97 views
How to run VSTest.Console a dynamic number of projects?
In my quest of setting up our CI/CD Pipeline on Azure DevOps(previously on Jenkins), I'm trying to execute all the tests(NUnits) in my solution.
Currently, the command line is :
vstest.console.exe &...
0
votes
0answers
287 views
BoDi.ObjectContainerException: Interface cannot be resolved: TechTalk.SpecFlow.UnitTestProvider.IUnitTestRuntimeProvider('nunit')
I have a test project in VS 2019 with Specflow.
I updated to Specflow 3.4.3.
I want to use MsTest as test provider, therefore I have installed the Specflow.MsTest nuget package.
Building the project ...
0
votes
1answer
159 views
Run tests in parallel using VStest not working
I am trying to implement parallel testing using VSTest Task as mentioned in the below article.
https://docs.microsoft.com/en-us/azure/devops/pipelines/test/parallel-testing-vstest?view=azure-devops
...
0
votes
0answers
25 views
Teamcity build fails because of deps.json
TestProj1 is referred in TestProj2,
While Teamcity trying to do "TestProj2" build on build server, Teamcity is looking for "TestProj1.deps.json" on TestProj2 bin folder location
as ...
-1
votes
1answer
217 views
How to provide multiple test categories in vstest task in azure pipelines
My project has some Nunit tests with certain tags called categories.
For example: 32 bit app tests have x32 as tag and 64 bit app tests have x64 as tag.
Now using vstest task i am able to run tests ...
1
vote
1answer
55 views
NUnit tests are not restarted through VSTest in DevOps
I am using VSTest to run tests via Azure DevOps. Tests run successfully, but using the option rerun failed tests: true, an error appears during the restart phase.
NUnit 3.12.0 ;
NUnit Adapter 3.16.1.0 ...
0
votes
1answer
73 views
How do I specify a set of tests using VSTest in a Pipeline
Using azure pipelines I want to build and run web service tests.
Using the classic pipeline builder (so not the YAML) I want to be able to select a specific set of tests to run. My tests are grouped ...
0
votes
1answer
128 views
Can't run my build release task on azure release pipeline error Exception: An error occurred while initializing the settings provider named 'MSTest'
I have not been able to resolve this issue, been working on it for over 2 to 3 days. Here is my setup
and what i have done so far.
building release on a on premise agent.
agent has latest version of ...
0
votes
0answers
31 views
Specflow: Executing script to generate allure report after all test run
I'm using specflow. In my project I've several feature files. Want to run specific script to generate allure report after execution of all the feature test is done.
Using [AfterTestRun] and executing ....
2
votes
1answer
40 views
UWP Unit Tests Don't Run from MSIX
We've changed the minimum target version of our app (and unit test app) to 1809 (17763) and now MSBuild generates MSIX files instead of APPX files. VSTest doesn't seem to like it...
I've tried both ...
5
votes
1answer
251 views
Not Contains TestCase filter not working in VSTest 16.6.1
According to the official TestCase documentation, you can use a "not contains" (!~) filter in a TestCase filter.
I'm trying to use this filter in an Azure Devops pipeline, but the filter is ...
0
votes
0answers
74 views
how to run performance load test using vstest.console.exe
I have the latest version of Visual Studio 16.6 with support for creating Web Performance Test.
We have created a bunch of .webtests and .loadtests calling these webtests.
Now these .loadtests work ...
0
votes
1answer
49 views
Test methods are not executed when associating same test method to multiple test cases in VSTest running XUnit tests
We have an ASP.Net application and UI tests written with xUnit. Test plans are in VSTS, and in some cases same xUnit test method is associated to multiple test cases.
An azure build pipeline executes ...
0
votes
1answer
136 views
VSTest: Order the execution of test assemblies
Our codebase has more than 100 projects with tests in each. Some test assemblies take more time while some other assemblies are taking less time for the execution of the tests.
The Azure DevOps ...
1
vote
1answer
200 views
Azure Pipelines - VS Test task fails upon providing filter criteria
In my Azure Pipeline, I'm trying to build and run the code. So I have included "NuGet Restore", "Build Solution" and "VS Test" task.
When I'm trying to apply filter criteria in VS Test, it shows ...
1
vote
1answer
95 views
How to clean up database using SQL Unit Test Project
I have created SQL Unit Test project using the built-in Visual Studio Test project. I am able to create test cases for all scenarios using Pre-Test, Test and Post-Test conditions. Also, I am able to ...
0
votes
1answer
104 views
No test assemblies found matching the pattern: **\*.Test.dll in build pipeline task
I've looked at other answers and they don't seem to be working for me.
My build works fine and I can find *.Test.dll files located under the agent's _work/2/s folder (several folders deep) where the ...
0
votes
1answer
104 views
How to find the test that caused a timeout
At least one of my tests hangs and causes the test run to abort eventually:
Aborting test run: test run timeout of 7200000 milliseconds exceeded.
Results File: D:\TF\2\s\TestResults\xxxxx.trx
Test ...
0
votes
2answers
199 views
Secrets as environmental variables in vstest
In my tests I'm using environmental variable. Due to security reasons, when setting it in azure devops pipeline I need to mark it as secret. Is it possible to pass it as argument, within vstest task?
0
votes
0answers
51 views
Replace not working in 'AppDomain.CurrentDomain.BaseDirectory.Replace(“\\bin\\Debug”, “”);' only when I run using VSTest agent from Azure Devops. why?
Here is the code:
Thread.Sleep(4000);
ITakesScreenshot ts = (ITakesScreenshot)driver;
Screenshot screenshot = ts.GetScreenshot();
string pth = System....
0
votes
1answer
1k views
Azure DevOps - Running VsTest for C# Unit Test
I have created a C# Console App and a C# Unit Test by following this Microsoft Article here:
https://docs.microsoft.com/en-us/visualstudio/test/walkthrough-creating-and-running-unit-tests-for-managed-...
0
votes
0answers
14 views
vstext.console.exe - how to export coverage report with predefined name
I am trying to get code quality metrics along with code coverage via MS Test in SonarQube. I am able to build and list unit tests. However I am not able to import .coverage files generated by vstest....
0
votes
1answer
73 views
xUnit doesn't run on Azure DevOps CI pipline
I am trying to run xUnit tests using the Azure CI pipeline, despite the unit tests running successfully in Visual Studio 2017, but on Azure DevOps no results. Below are screenshots for the vs ...
0
votes
1answer
1k views
System BadImageFormatException Format of the executable (.exe) or library (.dll) is invalid
CI pipeline taking about 50 min to complete and most of the time is consumed by the test. Have good number of unit test and data driven tests. Have decided to run test in parallel and the approach ...
0
votes
2answers
417 views
How do I run NUnit tests in Azure Devops without having the test adapter in every project?
My team has many test projects containing NUnit tests (version 3). We do not use the Visual Studio test runner and we do not have the test adapter (NUnit3TestAdapter) referenced in any of our projects....
0
votes
1answer
338 views
Azure DevOps VsTest task version 2.167.1 failing
Azure DevOps VSTest task is failing on private agent with an error ##[error]Error: The process 'C:\agent\_work\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.167.1\Modules\DTAExecutionHost.exe' ...
0
votes
0answers
262 views
NUnit Adapter 3.8.0.0 and Nunit 3.11 does not discover tests in Azure
I have written test scripts in VS2017 which run using NUnit Adapter 3.8.0.0 and Nunit 3.11
locally/test explorer, but when I want to run the same tests in Azure pipelines I get the below
error, not ...
5
votes
1answer
2k views
When running `dotnet test` show output of the `dotnet vstest` output sink
Edit: Below is the former question originally posted with the title
xunit show ITestOutputHelper output when run in the console
After investigation (see comments), the question is still very much ...
2
votes
1answer
60 views
vsTest targets wrong .NET version
My Azure DevOps build pipeline has a vsTest task in it. The test is specified in azure-pipelines.yml like so:
- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
arguments: '/Framework:....