Visual studio 2015 NUnit测试适配器:为什么单个测试执行多次?

Visual studio 2015 NUnit测试适配器:为什么单个测试执行多次?,visual-studio-2015,nunit,restsharp,Visual Studio 2015,Nunit,Restsharp,我有一个非常基本的测试示例,使用NUnit 3.0.1、NunitestAdapter.WithFramework 2.0.0和RestSharp 105.2.3,在VisualStudio 2015中用C#编写。使用NUnit测试适配器运行测试时,我的测试执行2次而不是1次。似乎有两个测试适配器并行运行。原因可能是什么?当然,我希望它只运行一次。提前谢谢 using NUnit.Framework; using RestSharp; using System; namespace Proje

我有一个非常基本的测试示例,使用NUnit 3.0.1、NunitestAdapter.WithFramework 2.0.0和RestSharp 105.2.3,在VisualStudio 2015中用C#编写。使用NUnit测试适配器运行测试时,我的测试执行2次而不是1次。似乎有两个测试适配器并行运行。原因可能是什么?当然,我希望它只运行一次。提前谢谢

using NUnit.Framework;
using RestSharp;
using System;

namespace Project1.Tests
    {
        public class Test1
        {
            [Test]
            public void GetTest()
            {
                var client = new RestClient("http://www.thomas-bayer.com/sqlrest/");
                var request = new RestRequest("CUSTOMER", Method.GET);
                var queryResult = client.Execute(request);
                Console.Write("result: " + queryResult.Content.Length);
                Assert.IsTrue(queryResult.Content.Length > 0);
            }
        }
    }
结果:

NUnit VS Adapter 2.0.0.0 discovering tests is started
NUnit VS Adapter 2.0.0.0 discovering tests is started
NUnit VS Adapter 2.0.0.0 discovering test is finished
NUnit VS Adapter 2.0.0.0 discovering test is finished
A test with the same name 'Project5.Tests.Test1.GetTest' already exists. This test is not added to the test window.
========== Discover test finished: 2 found (0:00:00,1950195) ==========
------ Run test started ------
NUnit VS Adapter 2.0.0.0 executing tests is started
Loading tests from     E:\Testing\RestVS\Project5\Project5\bin\Debug\Project5.dll
Run started: E:\Testing\RestVS\Project5\Project5\bin\Debug\Project5.dll
result: 4672
NUnit VS Adapter 2.0.0.0 executing tests is finished
NUnit VS Adapter 2.0.0.0 executing tests is started
Loading tests from  E:\Testing\RestVS\Project5\Project5\bin\Debug\Project5.dll
Run started: E:\Testing\RestVS\Project5\Project5\bin\Debug\Project5.dll
result: 4672
NUnit VS Adapter 2.0.0.0 executing tests is finished
========== Run test finished: 1 run (0:00:06,0725361) ==========

如果NUnit版本是3.0.1,为什么要使用NUnit适配器v2?

您拥有NUnit测试运行程序的Visual Studio扩展和NuGet包

已从Visual studio扩展中删除测试适配器。 在“工具”菜单上,单击“扩展管理器”。
在Extension Manager中找到测试适配器,然后单击“禁用”或“卸载”。

我正在使用最新的可用版本最新的版本是3.0.8