[英]C# UWP Visual Studio 2017 Unit Tests
I am creating Unit Tests for my app, using Visual Studio 2017 version 15.6.1. 我正在使用Visual Studio 2017版本15.6.1为我的应用程序创建单元测试。
I have added a new project, Unit Test Project (Universal Windows). 我添加了一个新项目,单元测试项目(通用Windows)。
Project target version is Fall Creators Update (10.0; Build 16299) 项目目标版本是Fall Creators Update(10.0; Build 16299)
Minimum version is November Update (10.0; Build 10586) 最低版本是11月更新(10.0; Build 10586)
I have edited UnitTest1.cs as bellow: 我编辑了UnitTest1.cs如下:
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Assert.AreEqual(0, 0);
}
[TestMethod]
public void TestMethod2()
{
Assert.AreEqual(0, 0);
}
}
In Test Explorer on the left side I see both of tests. 在左侧的测试资源管理器中,我看到了两个测试。 I click on Run All.
我点击全部运行。
There is just one window popups, and in Output there is this info: 只有一个窗口弹出窗口,在输出中有以下信息:
[3/13/2018 4:13:24 PM Informational] ------ Load Playlist started ------
[3/13/2018 4:13:24 PM Informational] ========== Load Playlist finished (0:00:00.0155005) ==========
[3/13/2018 4:15:01 PM Informational] ------ Run test started ------
[3/13/2018 4:16:10 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Failed to initialize client proxy: could not connect to test process.
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler)
[3/13/2018 4:16:10 PM Informational] ========== Run test finished: 0 run (0:01:09.0679372) ==========
[3/13/2018 4:39:20 PM Informational] ------ Run test started ------
[3/13/2018 4:40:43 PM Error] Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Failed to initialize client proxy: could not connect to test process.
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler)
[3/13/2018 4:40:45 PM Informational] ========== Run test finished: 0 run (0:01:25.1648961) ==========
What am I doing wrong here? 我在这做错了什么?
Project link: https://ufile.io/8vifz 项目链接: https : //ufile.io/8vifz
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.