7
votes

Using Visual Studio 2015 Community edition, I am unable to run even the most basic Universal Windows Unit Tests. Once I create a test, and try to run it through Test Explorer, the code compiles and seems to deploy the unit test windows app. The app stays up for about 10 seconds, then closes itself. The test runner's result for the test: Inconclusive: Failed to initialize client proxy: could not connect to test process . Running Visual Studio as an Administrator didn't seem to have any effect.

To create the sample project that caused my error:

  1. Start a new Project
  2. From the templates, choose: Templates > Visual C# > Windows > Universal > Unit Test App (Universal Windows)
  3. Write a simple test: Assert.IsTrue( true )
  4. In the menu, Test > Run > Run all tests

The Output window for the Tests option shows this:

Checking whether required frameworks are installed...

Registering the application to run from layout...

Deployment complete (3566ms). Full package name: "edd458e2-c3b1-4d8a-b7c3-5669e2fe7d75_1.0.0.0_x86__97afpx01qh2gg"

Error : DEP3000 : Attempts to stop the application failed. This may cause the deployment to fail. Exception from HRESULT: 0x92330047

Updating the layout...

Deployment complete (104ms). Full package name: "edd458e2-c3b1-4d8a-b7c3-5669e2fe7d75_1.0.0.0_x86__97afpx01qh2gg"

1
Just guessing, but maybe the UWP UnitTest application requires an application it can actually test.Herdo
The UWP Test Project is an application itself (it has its own App.xaml even). I just wanted to simplify my problem I have testing our real production code (which is against an actual application).Scott
@Herdo I can confirm that it does require an host app, so that the tests actually run in the host app. I guess the problem here is that the host app is some how locked, so that the VS tools cannot uninstall and redeploy, and we get the error mentioned in the question.terry

1 Answers

2
votes

I had the same problem and solved it by explicitly deploying the test project and re-invoking "Run All Tests". You can also check under "Add or remove programs" whether your test project app is (deployed) installed or not. If necessary, uninstall it and deploy again.

The unit testing concept of the UWP apps is a mess :-(