Coded UI Test Builder does not appear with setup project in solution - unit-testing

I am using VS 2010, and I was able to create a Coded UI test successfully, once. I am trying to do the same, but the Test Builder Dialog box does not appear anymore. I found the following post:
http://social.msdn.microsoft.com/Forums/en/vsautotest/thread/ff495f15-bb42-454d-88af-ae4d3bb4a075
This describes my problem somewhat. I do have a setup project, and when I remove the setup project and add a Coded UI Test, everything works. Then I add back the Setup project, and add a Coded UI Test, it works again.
Then I close VS 2010, re-open it, add a Coded UI Test, and the test buildor dialog bos does not show up.
Does anyone know of a fix?

VS 2010 SP1 solves the issue of creating Coded UI tests in solutions having a setup project.
For a description of VS 2010 SP1 (with a download link) see http://support.microsoft.com/kb/983509. Search for the title "FastForward/CodedUITest" to find doc that this particular issue is solved.

Related

VS2019 + Xamarin.Forms = UWP/EXE dropped?

How do I get the UWP back into Xamarin.Forms Cross-Platform creation to have the templates ready to roll?
After picking through the release notes, playing with VS2019's UI and a few hours of web searching, I have only found others posting about the problem in the preview versions. Some say UWP is gone forever, some say it just isn't included by default (so Microsoft can brag about how the install went from 23GB to 8GB or something like that) - but no help on HOW TO re-enable it, or add it to the project creation wizard (apart from adding a blank UWP project sans all code that is in the iOS/Android projects).
<Project Sdk="Microsoft.NET.Sdk">
// the code is not the problem here,
// getting TO the code is the problem
</Project>
EXPECTED:
In VS2017, Xamarin.Forms Cross-Platform supplied iOS + Android + UWP templates by default.
ACTUAL:
Visual Studio 2019 seems to have removed the UWP template from Xamarin.Forms Cross-Platform project creation.
Update 9 apr.: a new version of 2019 was released which reinstates the UWP templates again
It is correct that the UWP template is removed from VS2019, I don't know the reason behind it, but we'll have to deal with it. There is however a page that runs you through the process step by step. It has been there for a while for the projects that were created in Visual Studio for Mac, which don't include the UWP template as well. The full description can be found here: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/platform/windows/installation/ taken from this page:
First, right-click on the solution and select Add > New Project... and add a Blank App (Universal Windows) project:
Then, select the minimum and targeted UWP versions.
Right-click on the UWP project and select Manage NuGet Packages... and add the Xamarin.Forms package. Ensure the other projects in the solution are also updated to the same version of the Xamarin.Forms package.
Also, make sure the new UWP project will be built in the Build > Configuration Manager window (this probably won't have happened by default). Tick the Build and Deploy boxes for the Universal project:
Right-click on the UWP project and select Add > Reference and create a reference to the Xamarin.Forms application project (.NET Standard or Shared Project).
In the UWP project, edit App.xaml.cs to include the Init method call inside the OnLaunched method around line 52:
// under this line
rootFrame.NavigationFailed += OnNavigationFailed;
// add this line
Xamarin.Forms.Forms.Init (e); // requires the `e` parameter
In the UWP project, edit MainPage.xaml by removing the Grid contained within the Page element. Then in MainPage.xaml, add a new xmlns entry for Xamarin.Forms.Platform.UWP, like this: xmlns:forms="using:Xamarin.Forms.Platform.UWP".
In MainPage.xaml, change the root <Page element to <forms:WindowsPage, like this:
<forms:WindowsPage
...
xmlns:forms="using:Xamarin.Forms.Platform.UWP"
...
</forms:WindowsPage>
In the UWP project, edit MainPage.xaml.cs to remove the: Page inheritance specifier for the class name (since it will now inherit from WindowsPage due to the change made in the previous step)
public sealed partial class MainPage // REMOVE ": Page"
In MainPage.xaml.cs, add the LoadApplication call in the MainPage constructor to start the Xamarin.Forms app:
// below this existing line
this.InitializeComponent();
// add this line
LoadApplication(new YOUR_NAMESPACE.App());
Add any local resources (eg. image files) from the existing platform projects that are required.
And now it should work as before. I know, it's a hassle to go through it for something that just worked before. Sorry about that, but this should get you there as well.
With the Update 16.0.1, Microsoft restored the UWP creation on new Xamarin.Forms applications
except when you try to use Shell, which is not available for UWP:
Issues fixed in Visual Studio 2019 version 16.0.1
Add option for Windows (UWP) platform when creating new Xamarin.Forms project from 'Mobile App (Xamarin.Forms)' project
template.
EDIT (7/17/2021): i have started a new xamarin forms solution and it seems all 3 platforms are available again in VS2019 on all prebuilt templates (blank, master-detail, tabbed layout).
thank you, everyone, for your input.
great information!
it helped me steel myself to face the fact:
UWP is gone (for now) from Xamarin.Forms new project scaffolding.
but, the (simplest) solution to the question asked that i have found is:
open VS2017. create new Xamarin.Forms cross-platform project.
once it is open, save-all.
then close VS2017 and open in VS2019 if so desired.

second project not showing tests in test explorer

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.

Get test list in MSTest via Command-Line [duplicate]

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

Running google test in visual studio 2013 express

We've just switched to using google test for unit testing due to deficiencies in our previous framework.
In Visual Studio, I have a solution with multiple projects. Each project contains unit tests using google test for a specific class (or collection of linked classes) within our application. We only use VS for managing and running google tests and reference the test classes found elsewhere.
When I want to run all tests, I set startup projects to multiple, then press ctrl-f5. This pops ups 1 console window per project with the standard google test output. This is great! I have to click a key to close each of the output windows, though. It sure would be nice to integrate into "Test Explorer" within VS2013 express.
I've found this script runner:
https://visualstudiogallery.msdn.microsoft.com/9dd47c21-97a6-4369-b326-c562678066f0.
It appears to be exactly what I want, but apparently express editions don't allow extensions? (I'm new the land of visual studio.) Anyway, we're using express instead of a different version because we're commercial. My fallback solution is spending the money on a full version of VS. However, I'd much rather find a free solution so I don't have to justify purchase, then deal with licensing visual studio for every new person that joins the group.
Has anyone figured out a solution to this?
Our team also tried using "Google Test Runner" extension. The
integration with VS Test Explorer was great but we did not like
the fact that we could not see gmock warnings. This means that
some tests can pass with warnings and you will simply let that
slip by and create problems in the future. The same problem
exists when trying to use XML output generated by gmock.
Since viewing output in console is a poor option, we've decided to
parse the output of executable that runs the tests and display them
in a browser. To this end, we've modified the project so that it directs
its output to a file ( "> test_output.txt" in Debugging -> Command
Arguments) and modified the main function to parse the output,
insert it into a html file template, save this html file and then open
it in default browser using:
ShellExecute(NULL, NULL, "test_output.html", "", "", SW_SHOW);
This also enabled us to make some customizations to the way results
are displayed using javascript.
You can use this approach in you case by creating a simple project which
will run last in the list of multiple startup projects, parse the output
of other executables and display it in a browser. I know this solution has
its drawbacks, but it is (in my opinion) better than ignoring warnings.

CUITe test execution fails under VS2015

Using CUITe testing framework in VS2012, I created a coded UI test. This test works as expected when right clicking the test, and hitting "run test" in VS2012.
We are in the process of migrating to VS2015, so I'm trying to go through our solutions to make sure they are behaving as expected. In this solutions case, we are running into an issue where when attempting to run a test, the output pane states:
There is no test with the specified Id (guid listed)
And no CUITe tests are run.
I have confirmed that normal coded UI tests are running in VS2015, it is specifically coded UI tests created using CUITe that are failing to run.
Don't know if anyone will have any workarounds for this, but I figured I'd give it a shot. I have additionally added all of the "Microsoft Testing" dlls to the solution in a separate folder, in order to ensure the solution is using the "specific versions" of the testing DLLs. This did not solve the problem.
The issue was due to CUITe not having been compiled/provided a build definition for VS2015.
In the current GitHub repo of CUITe (code plex URL from the original question no longer the "active link") provides a new build that addresses the issue.
Current URL for CUITe is:
https://github.com/icnocop/cuite
Issue was resolved here.