无法在Visual Studio 2015的测试资源管理器中看到测试方法 [英] Unable to see test methods in test explorer for Visual Studio 2015

查看:164
本文介绍了无法在Visual Studio 2015的测试资源管理器中看到测试方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的控制台应用程序项目,在该项目下我只有一个测试方法。我在这个项目中安装了NUnit,Nunit Adapter,Selenium webdriver和支持包。测试方法曾用于在资源管理器中显示,但突然间它没有出现。
试图创建一个新项目并卸载/安装VS.还是一样。请帮忙!!!!!!


以下是我的简单代码块: 

 namespace ConsoleApplication1 
{

公共类TestBase
{
[SetUp]

public void initialize()
{

}
[测试]

公共无效登录()
{

}

[TearDown]

public void EndTest()
{

}
}

}

这些是为我的项目安装的软件包:Nunit,Nunit3TestAdaptor,Selenium WebDriver,Selenium支持

解决方案

Hi Suchit11,


欢迎来到MSDN论坛。


我在我这边创建一个简单的控制台应用程序项目,它工作正常。




这是我的packages.config文件中的内容:

<?xml version =" 1.0" encoding =" utf-8"?> 
< packages>
< package id =" NUnit" version =" 3.10.1" targetFramework =" net452" />
< package id =" NUnit3TestAdapter" version =" 3.10.0" targetFramework =" net452" />
< package id =" Selenium.Support" version =" 3.11.0" ; targetFramework =" net452" />
< package id =" Selenium.WebDriver" version =" 3.11.0" targetFramework =" net452" />
< / packages> ;

请将
默认处理器架构设置为 X86 ,右键单击
解决方案资源管理器中的解决方案,单击重建解决方案,再次测试。


参考:
https://github.com/nunit/nunit -vs-adapter / issues / 81


另外,如果上面的方法无法帮助你,请分享一个简单的项目给我,这将有助于测试问题并找到解决方案。你可以
上传你的项目到< a href ="https://onedrive.live.com/"> OneDrive 并在此处分享链接。感谢您的理解。


问候,


Judyzh


I have a simple console application project under which I have a single test method. I have NUnit, Nunit Adaptor, Selenium webdriver and support packages installed in this project. The test methods used to show in the explorer but suddenly it is not coming. Tried to create a new project and also uninstalled/installed VS. Still the same. Please help!!!!!!

Following is my simple code block : 

namespace ConsoleApplication1
{
   
   public class TestBase
    {
        [SetUp]

        public void initialize()
        {

        }
        [Test]

        public void login()
        {

        }

        [TearDown]

        public void EndTest()
        {

        }
    }

}

These are the packages installed for my project : Nunit, Nunit3TestAdaptor, Selenium WebDriver, Selenium Support

解决方案

Hi Suchit11,

Welcome to the MSDN forum.

I create a simple console application project in my side, and it works fine.

This is the content in my packages.config file:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="NUnit" version="3.10.1" targetFramework="net452" />
  <package id="NUnit3TestAdapter" version="3.10.0" targetFramework="net452" />
  <package id="Selenium.Support" version="3.11.0" targetFramework="net452" />
  <package id="Selenium.WebDriver" version="3.11.0" targetFramework="net452" />
</packages>

Please set Default Processor Architecture to X86, right click your solution in Solution Explorer, click Rebuild Solution, test again.

Reference: https://github.com/nunit/nunit-vs-adapter/issues/81

In addition, if above method could not help you, please share a simple project to me, that will be helpful to test the issue and find the solution. You could upload your project to OneDrive and share a link here. Thanks for your understanding.

Regards,

Judyzh


这篇关于无法在Visual Studio 2015的测试资源管理器中看到测试方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆