VS Test fail in Azure DevOps while all tests are sucessed - visual-studio

After we upgrade to VS2019 and use VS test task v2.0 in Azure DevOps, our test task keeps failing with the following message:
Our Visual Studio 2019 is version: 16.2.5
The task version is: Visual Studio Test 2.157.3
What's wrong with the VS test task?
Update, the error message is:
[error]Error: The process 'C:\BldWorkarea\SLB1_VSTS\ZhouShuRen_work_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.157.3\Modules\DTAExecutionHost.exe' failed with exit code 1

VS Test fail in Azure DevOps while all tests are sucessed
It seems the issue for the version of that VS test task. You can check the following ticket for some more details:
VSTest 2.154.0\Modules\DTAExecutionHost.exe' failed with exit code 1
As workaround, you can switch the task back to V1.
Hope this helps.

Related

No ProjectInfo.xml files were found

i am using visual studio 2015 and tfs for build the project,
I started the build but got stuck with the error described below,
2016-03-17T09:38:15.2135195Z ##[error]No ProjectInfo.xml files were found. Possible causes:
2016-03-17T09:38:15.2135195Z ##[error]1. The project has not been built - the end step was called right after the begin step, without a build step in between
2016-03-17T09:38:15.2135195Z ##[error]2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 12.0 upwards are supported
2016-03-17T09:38:15.2135195Z ##[error]3. The build step has been launched from a different working folder
2016-03-17T09:38:15.2135195Z Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
2016-03-17T09:38:15.2135195Z 15:08:15.15 Creating a summary markdown file...
2016-03-17T09:38:15.2135195Z ##[error]Post-processing failed. Exit code: 1
2016-03-17T09:38:15.2135195Z ##[error]Unexpected exit code received from batch file: 1
Can any one help me in this?
Assuming you are using TFS2015 vNext build, and you are trying to add build tasks below to execute a SonarQube analysis:
· SonarQube for MSBuild – Begin Analysis
· SonarQube for MSBuild – End Analysis
From your error log, you need to make sure the End Analysis task should be used to create a step that is executed after the “Visual Studio Build” task step. Review blog Build Tasks for SonarQube Analysis get more information of how to use SonarQube analysis tasks.

How to get NCover from TestDriven.NET to generate code coverage via the command line

I have VS 2010 Premium SP1 and using MSTest
The project has a web reference to a Web Service
The tests are integration tests
TestDriven.NET-3.8.2877 RTM which includes NCover 1.5.8
My problem is that it runs the MSTests and creates the pass/fail *.trx file but will not create a coverage report. I get the coverage report if I right click and select test with\NCover. The problem is I want to run in in the command line so I can just make it a task in my continuous integration pipeline.
The error returned is:
Profiled process terminated. Profiler connection not established.
I searched for solutions and tried the following:
Using the //reg in the command line
Updating the config.exe file to use .NET 4.0
Forcing the NCover DLL to register
Here is my command line:
ncover.console.exe //x mstest_coverage.nccov "c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /testcontainer:D:\Perforce3666\serviceengine\SessionStorage\dev\SQATesting\SessionStorage.SQA.Testing\bin\Release\SessionStorage.SQA.Testing.dll

Chutzpah - is it possible to integrate chutzapah test running with visual studio build

Is it possible to integrate chutzapah test running with visual studio build?
What I mean here is - if any test fails the build fails.. .that way..
I think you have 2 ways of doing this:
install the Chutzpah test adapter on each build machine and get the running the tests in test explorer.
Then customize your msbuild scripts to run the tests.
Use the command line + custom msbuild task
It looks like Chutzpah has a command-line runner, so you can create a PowerShell script which gets called from your build server to run the tests. See the Chutzpah documentation for more information, but it should be chutzpah.console.exe under: Chutzpah.3.2.4\tools
Next if you want to integrate with Visual Studio build it means msbuild integration. Take a look at the exec task on how to run custom commands and react based on the results

Error creating a test project

I get following error everytime I try to create a new Test Project:
Microsoft Visual Studio
Failed to get service ITestToolSettingsManager.
OK
I am currently running Visual Studio 2010 Ultimate with Feature Pack 2 on Windows 7 Ultimate 64-bit.
I have also tried following with no avail:
Run VS under admin mode
Reset VS settings by going to Tools --> Import and Export Settings
Run "devenv \setup" --> this fails
Run "devenv \InstallTFSTemplates"
Run "devenv \ResetSettings" --> this fails
Your help in resolving is much appreciated.
Kind regards,
HG
Probably same deal I had File => new project test projects Fails.
Installed Templates => Visual C# => Test => Test Project
works
found answer at
http://social.msdn.microsoft.com/Forums/en-US/vsunittest/thread/8739096e-afb3-4760-baeb-ae707fb3ab09

TeamCity - Configure MSTest Settings to execute a command before the tests

I try to configure the MSTest Settings ssection [Step 3 Runner: Visual Studio (sln)]. My particular configuration require to call a set of scripts (TestSetup.cmd) before the tests. Everything works fine in Visual Studio, but I don't know how to call the scripts from TeamCity.
I tried to add in the MSTest metadata the .vsmdi file but without success. The script are not executed.
My question is how to call the command from TeamCity in the MSTest Settings section?
Thank you and best regards!
testrunconfig file:
This is a default test run configuration for a local test run.
MSTest Settings screen shot TestSetup.cmd
Versions :
TeamCity Enterprise 5.1.3
Microsoft Visual Studio Team System 2008 Development Edition
I
Add a build step before the MSTest runner which runs your testsetup.cmd.

Resources