Mstest.exe can't run load tests - mstest

I'm looking for a way to automate load testing, but for some reason, when I'm trying to run through command line (mstest.exe /testroncatiner:) I receive the following message:
File extension specified '.loadtest' is not a valid test extension.
If I'm trying to run .dll file then another message appears:
No tests to execute.
Canyou please tell me what am I doing wrong? I have installed Visual Studio 2017 Enterpise

Make sure that you have the web performance and load test component installed. You can find it in the Individual components section of the Visual Studio installer.

Related

VS2010 Build Fail with error: Cannot open 'PathToFile.rsp'

I'm having a problem when trying to build my project and i don't know where to look.
The problem is that the build fails every time. it gives me the following error
Error messages on build
When I searched for those files I found that they weren't in that folder
The strangest thing is that if i build the same project on the visual studio, or if I run MSBuild from Visual Studio 2010 command line the project builds without problem. Also, I have configured another builder in another computer, and when I run the build there with the same Build definition it builds correctly. My guess is that it have to be some configuration that i'm missing, but I don't know where to look.
The computer is running Windows Server 2012

Can vstest.console.exe run web performance tests?

I migrated my web performance tests project's build to TFS 2013 build process template for auto nuget restore by following this document.
My solution has .webtest files which are the containers for web performance tests. But VsTest.console.exe doesn't recognize the .webtest tests. I looked at the discoverers and found that none of the ones installed support the .webtest extension.
I tried to find test adapters for running .webtests using vstest.console.exe but found nothing.
This document says the following for vstest.console.exe:
You can run automated unit and coded UI tests from the command line.
And this for mstest.exe:
You can run automated Web performance and load tests from the command line either locally or by using a test controller or test agents.
Why doesn't vstest.console.exe support .webtests ? Wasn't it designed as a replacement to mstest.exe for running any kind of tests using adapters ?
Also, if it means that I need to write a custom adapter that can read and run tests with .webtest extension, what does it take for me to do that ?
vstest.console can run webtests using the following:
"c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" SmokeTest.orderedtest /Settings:..\..\..\local.testsettings"
You need to create an orderedtest and put your webtest in it.
vstest.console can run .webtest Webtests. Enter the path to the exe in quotation marks and then the path to the webtest:
"c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" WebTest1.webtest
Looks like vstest.console.exe cannot run load tests and web tests. My only option is to use MsTest.exe through TFS 2013 by customizing the build process template to suit my needs.
Edit: I'm wrong. You can run web tests using vstest.console.exe.

Running Load Tests against Visual Studio Online From TFS Build

I created a Load Test that I would like to run every night so that I can compare the results over time.
I'm trying to trigger the load test to run from a TFS build. Tests are run by Visual Studio Online agents.
Here is the MSTest command that is being executed, however I'm getting an error and the load tests never run.
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe" /nologo /usestderr /testSettings:"F:\Builds\8269\Tests\LoadTests\src\Tests\xxxxx\Remote.testsettings" /searchpathroot:"F:\Builds\8269\Tests\LoadTests\bin" /resultsfileroot:"F:\Builds\8269\Tests\LoadTests\tst" /testcontainer:"F:\Builds\8269\Tests\LoadTests\bin\LoadTest2.loadtest" /publish:"https://xxxxx.visualstudio.com/defaultcollection" /noprompt /publishbuild:"vstfs:///Build/Build/13578" /teamproject:"Tests" /platform:"Any CPU" /flavor:"Release" /runtitle:"MySweetLoadTests"
Error...
The current SynchronizationContext may not be used as a TaskScheduler.
From here (The current SynchronizationContext may not be used as a TaskScheduler)
It says I need to setup a SynchronizationContext, however I'm not sure how to do that within a load test.
Thanks!
This now supported. Please refer to the blog.
http://blogs.msdn.com/b/visualstudioalm/archive/2015/08/24/cloud-load-test-support-in-mstest-exe-command-line-and-xaml-builds.aspx

Using XUnit with Visual Studio Online

I've setup my build as below using the build definition. I'm using XUnit and locally my tests are discovered and run. I've tested the glob **\*spec*.dll and it finds all my test dlls and the build log shows that those dlls are in fact built.
However in the build log I get
Run VS Test Runner
No test found. Make sure that installed test
discoverers & executors, platform & framework
version settings are appropriate and try again.
Which seems to suggest it is trying to use the MSTest test runner instead of the XUnit test runner. How do I tell the build for visual studio online to use the XUnit test runner and discoverer?
This might be out of date now, but this is how I have it setup and working - downvote and let me know if it's wrong and I'll delete this. I got it from a blog post/MSDN page, but I can't locate it any more.
First you need to create a TFVC Team Project (doesn't matter if you don't use it again).
Into $/MyTFVC/BuildProcessTemplate/CustomActivities/
Checking the following files from xunit.net:
Now in VS, click the BUILD, Manage Build Controllers... option. Select the "Hosted Build Controller (Hosted)" and click "Properties...".
Enter the path where you checked in the DLL's into the "Version control path to custom assemblies" field:
You should be good to go.

Visual Studio Invalid Bootstrapper

I have a bunch of programs set up as prerequisites in the VS bootstrapper. Recently, everytime I build on my machine and try to run setup.exe, I get an error ".....msi has either changed or been corrupted since the package was originally published". I know this isn't a problem with the setup or the msi files because I done the exact same thing on another development machine and copied the output to my machine and it's worked. I figure it must be something within the visual studio - bootstrapper connection. Anybody have any ideas?
Have you tried checking the log file ActivityLog.xml. It's under AppData\Roaming\Microsoft\VisualStudio\10.0
You need to run Visual Studio this way "Devenv /log"

Resources