In the new team I work for we use a lot of unit tests, we use MSTest in VS2010.
I have prepared about 10 loadtest to use these unit tests in various ways. How do you launch all the loadtest (randomly or with a specified order)?
I'm having trouble how to get the standard VS environment to do this.
Or maybe there is a plugin to add to Visual Studio?
Open the Test View window, by selecting Tests --> Windows --> Test View
In the Test View, select Group By: Test Type.
Right click on the Load Test category and Run Selection.
Related
I have the following problem where Associated Automation not showing tests.
The project has been checked in and the Unit Tests show up fine on Test Explorer
When I query and search for a Test Case in TFS then attempt to link a Unit Test to the Test case via the associate button, nothing appears in the Choose Test window.
Any help please?
I have several ms unit test projects in my solution, when I go to Test Explorer all the unit test projects show up in the list:
When I hit "Run All" there is only one project that is discovered and run.
I can execute the other projects by selecting them individually and hitting "Run Selected Tests" but the Test Projects will not execute together automatically.
These tests use to run fine in the solution but have stopped within the last month or so running when "Run All" is used.
Thanks for any help!
I am using Visual Studio 2015 and faced the same problem few days back - when I clicked on 'Run All', all my Coded UI Tests ran but not my Unit/Integration Tests. Looking at your screenshot, it seems like you are facing the same problem where none of your 264 Unit Tests ran.
In my case -- Clearing my Temp files, resolved the problem for me.
Go to your START Menu and type %temp%
Once your Temp folder opens up, just delete all the contents.
Now go to your Visual Studio IDE, and from your Test Explorer window - click on 'Run All'
You should now see all the test projects(Coded UI, Unit Tests) being identified and executed.
Let me know if this does not solve your problem.
So I created a few test methods for very simple code and when I right click and run each test separately, they all pass. Then I click "Analyze code coverage for all tests" and one of the tests is failing. Nothing has been changed in between these two actions (no save, no build, no touching of the code). What could cause this? Are there some settings that I need to be aware of?
I converted a project with nunit tests, so that it had mstests instead. It compiles, and when I right click on the project, I can select "run unit tests." It works, and the tests execute successfully.
However, I cannot see my tests in either the "Test List Editor" or the "Test View." I've tried:
selecting the "refresh" button in both those lists
rebuilding the solution
re-starting visual studio
Activated background discovery (I do have VS 2010 SP1, and resharper)
None of these, alone or in combination, has worked. What else can be tried, to force Visual Studio fully to recognize these tests?
The answer, I found, is that I must convert a class library to an MsTest project.
Also make sure that your test class is public, I spent almost one day trying to figure out why the MS test frame can't discover my test until I modified the access modifier from the default to public
I have a Visual Studio 2008 solution that contains around 30 projects. Some of these are web services / WCF services / ASP.NET MVC applications.
When I run all unit tests (Ctr+R, A) it insists on spinning up all the Development Servers for these various projects. This means that it takes far too long to run the tests and, actually, none of my unit tests require these frameworks.
So, how do I stop Visual Studio doing this?
Click on the projects in your solution and bring up the properties window (F4).
Change Always start when debugging to false.
If you're running the tests, not debugging, then the "Always start when debugging" setting will have no effect.
Instead, have a look at the test settings that you're using to run the tests. (Find which settings you're using by going Test > Select Active Test Settings. You can then edit the test settings by going Test > Edit Test Settings and selecting your active test settings)
I have found the following test settings can force the ASP.NET development server to start up, although there could be more!
Non-default test host: In the edit test settings window, choose the "Hosts" section. Host type should be set to "Default", not "ASP.NET"
Code Coverage: In the edit test settings window, choose the "Data and Diagnostics" section. Select "Code Coverage" and click "Configure". The development server will start for each service that is selected here for ASP.NET Code Coverage. (Normal code coverage is identified by an icon of a blank page with two gears on top of it. ASP.NET code coverage is identified by an icon of a globe with two pages on top of it.) To change from ASP.NET code coverage to normal code coverage, deselect the ASP.NET code coverage, then choose "Add Assembly...". Browse to the bin folder of your web service project and choose the dll of the web service.