你可以只尝试使用XUnits应用: https://channel9.msdn.com/Shows/demooftheday/xunit-in-uwp
有了这个测试将在的xUnit的测试应用程序运行,而不是在VS测试资源管理器。
在我的单元测试项目的project.json
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0",
"xunit": "2.1.0",
"xunit.runner.devices": "2.1.0" }, "frameworks": {
"uap10.0": { } }, "runtimes": {
"win10-arm": { },
"win10-arm-aot": { },
"win10-x86": { },
"win10-x86-aot": { },
"win10-x64": { },
"win10-x64-aot": { } }
}
然后转到名为UnitTestapp.xaml单元测试项目中的XAML文件,并将其更改为
<ui:RunnerApplication
x:Class="UnitTestProject1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UnitTestProject1"
xmlns:ui="using:Xunit.Runners.UI"
RequestedTheme="Light">
</ui:RunnerApplication>
当然,在后面的代码:
sealed partial class App : RunnerApplication
{
protected override void OnInitializeRunner()
{
AddTestAssembly(GetType().GetTypeInfo().Assembly);
InitializeRunner();
}
partial void InitializeRunner();
}
使用任务管理器,详细信息选项卡。看看你是否可以杀死单元测试运行器的运行实例。 – 2013-05-04 00:11:57