I've created a UWP Unit Test App in the past and remember it working fine.
I just tried to create a new one from scratch and hit F5 (no references, one empty test method) - out of box template.
I get a successful compile and launch, however the app window is empty and does not present the UWP testing UI.
Is this a known issue, or some basic prerequisite I've overlooked?
I'm running Visual Studio 15.5.5 on Windows 10 1709 (16299.192)
Thanks
-John
The Unit Test App should not be launched directly, instead it should run through the Test Explorer. In Test menu, choose Windows, and then choose Test Explorer. In the Unit Test Explorer window click Run all. This should execute all your tests. For more information follow the walkthrough here.
Related
I have a solution with a test project in it, based on nUnit. All of the tests I created show in the test explorer window, I can execute, etc.
I added another unit test project to the solution, created references exactly like the first project, same nUnit version, same Platform target (Any CPU), same code structure, etc., just for a different product. But I added tests (with Test attribute) to that project and they don't show in the Test Explorer.
All of my tests in the original project still show but no tests in my new project show.
How do I get tests from multiple projects to show in the Test Explorer window?
Is the Test Explorer window tied to a specific project?
I spent a day trying to figure this out but once I posted the question, as luck would have it, I figured out the solution. I changed the nUnit version back to 3.7.1.0 and it works - both projects now show tests in the Test Explorer window.
I just installed Visual Studio 2013 Premium and was having a good time playing with it and writing unit tests (using MS unit tests). However, the "Test Lists" window and some other Test related windows suddenly disappeared AND they have disappeared from the menu item
Test->Windows. In fact I remember Test->Windows having 4 items under it and now I only see two: Test Explorer, Code Coverage Results. i stress they WERE present in Visual Studio 2013. Clearly, I hit some key combination that made them disappear or something happened to make them disappear. How do I get Test List back? Please don't see they are under Tests->Windows, because for me, they are not (at least now. they were!)
Anyone else seen this? Any solutions? I tried restarting Visual Studio, rebooting.
Also, previously, under the "Test" menu, there was a Debug->"Test in Context" and a Run->"Test in Context", or something like this. It was very handy. If your cursor was with in some test, you could run just that one. I'm guessing this is related.
For all I know, these features have been "optimized" into the new test-window... a.k.a. they have been removed. Some other unit test related features are also gone (the context menu item for "create unit tests" is gone for example, yet can still be called via the command window)
Personally I think this is Microsoft's way of pushing everybody towards the Team Foundation Server but that's just my two cents.
I just had the same issue. In my case I needed to install the NUnit plugin ("Nunit test adapter"). After restarting the tests came back.
Start Developer Command Prompt:
cd to UnitTest-folder\bin\Debug which contains .dll
enter command: mstest /testcontainer:UnitTestMyTest.dll
(this creates the test-result)
in VS:
menu View / Other Windows / Test Results
manage Test Runs: window Test Runs -> connect to Test Run
browse to test-folder\bin\Debug\TestResults
I can't seem to find any information on this.. I am using it to test my Universal app but it comes with a XAML file and when I run the Unit Test it opens some screen... What is that for ? I don't need that.. I just want to unit test my code.
I think that the xaml file has something in common with UI tests, but you can still add some unit tests into that project and run them, it will start the application and blank screen will be displayed for a moment, but unit tests will run too.
I see that only 3 test projects exist.
Coded UI Test Project
Unit Test Project
Web Performance and Load Test Project
I have setup a .testsettings file for my solution that enables Network Emulation (link)
In order to start up network emulation I have to run one of the test projects listed above, all of the above test projects are designed for automatic testing. I want to be able to debug and test my project(s) manually while Network Emulation is on, currently the only way to do that is to create a Unit Test, start it, and then just call the other projects Main method (that I want to manually), the problem with this is that sometimes the program's UI does not show (unit test debug mode it does not - I am unsure why). Unit testing was not designed for such a thing anyway.
So really, is there a way to enable Network Emulation while I debug normally, or manually enable/disable the network emulator in the background for when I need it?
For those that don't know, Network Emulator slows down traffic in/out of the machine to emulate real networked environments, it automatically starts up on the default network adapter when a test starts and closes when a test finishes
Thanks
I decided to write my own small program that starts up the emulator without the need of visual studio testing/visual studio opened. For anyone that is interested it is based off this post:
http://blogs.msdn.com/b/lkruger/archive/2010/04/07/stand-alone-network-emulation-and-codeplex.aspx
Code is here:
http://teamtestplugins.codeplex.com/
I'm using Eclipse Kepler CDT with Google Test. Unit testing is working fine, but I can't find a way to get a shortcut to run all unit testing. Everytime I need to run test, I have to click the little arrow near the run button and select the unit test icon.
I can't find c++ unit test in the "Keys" menu (although Run JUnit test is available).
Still you can use Ctrl+F11 to launch the last Run Configuration, so launch once your tests by clicking, and then hit Ctrl+F11.
CTRL+F11 to work the way you want, you must set (from "Windows/Preferences") the
"Run/debug > Launching : Launch Operation" setting to:
Answer in this post.
https://stackoverflow.com/a/1152039