我尝试使用TestDriven.NET运行xUnit测试(从F#模块,如果有任何不同的话),但是无论我做什么,我都会得到这个错误:
It looks like you're trying to execute an xUnit.net unit test.
For xUnit 1.5 or above (recommended):
Please ensure that the directory containing your 'xunit.dll' reference also contains xUnit's
test runner files ('
在Azure DevOps管道中运行单元测试时,我收到以下错误:
##[error]Testhost process exited with error: A fatal error was
encountered. The library 'hostpolicy.dll' required to execute the
application was not found in 'C:\Program Files\dotnet'. ##[error].
Please check the diagnostic logs for more informatio
我正在进行一个项目,在这个项目中,我使用Roslyn从解决方案编译项目。
foreach (var projectId in solution.GetProjectDependencyGraph().GetTopologicallySortedProjects())
{
var project = solution.GetProject(projectId);
var compilation = project.GetCompilationAsync().Result;
var errors = compilation.GetDiagnostics().Where(d
我正在尝试连接xunit来测试asp.net5应用程序。如果我为我的测试项目创建一个普通的.dll,我会丢失一堆引用,并且当我尝试添加mvc6时,我会遇到问题。
PM> Install-Package Microsoft.AspNet.Mvc -Pre
Install-Package : Failed to add reference to 'System.IO'. Please make sure that it is in the Global Assembly Cache.
At line:1 char:1
+ Install-Package Microsoft.A
在测试运行日志中,我有使用Visual Studio Test的Run UnitTests步骤。但是,我看到日志消息:
No test is available in C:\stuff\Debug\x64\bin\x86\ilc\MyApp.Test.dll some_other_dlls Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
测试在visual stud
我使用构建定义设置了我的构建如下所示。我正在使用XUnit,并在本地发现并运行测试。我已经测试了glob **\*spec*.dll,它找到了我所有的测试dll,构建日志显示这些dll实际上已经构建了。
但是,在构建日志中,我得到了
Run VS Test Runner
No test found. Make sure that installed test
discoverers & executors, platform & framework
version settings are appropriate and try again.
这似乎意味着它试图使用
当尝试在调试模式下运行一个非常基本的xunit测试时,我的测试项目抛出几个异常,这些异常似乎来自ReSharper。
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
Could not find file 'C:\Temp\test\TestProjekt\TestProjekt\bin\Debug\TestProjekt.xunit.runner.json'.
Exception thrown: 'System.IO.FileNotFoundException
我对CI/CD非常陌生,目前还在努力让VSTS找到我的xUnit测试。我的解决方案是一个纯粹的实验,试着孤立问题并学习。在进入我的安装程序和到目前为止所做的工作之前,结果是VSTS构建日志中的这一行:
Warning: No test is available in C:\agent\_work\1\s\Quotifier.Models.xUnit.Test\bin\Release\netcoreapp2.0\Quotifier.Models.xUnit.Test.dll. Make sure that installed test discoverers & executors, p
我有一个相对简单的解决方案。所有的工作在MSBuild下都很好(在VS 2017 Mac中)。我正在创建一个Cake构建脚本,但我只是无法让单元测试工作起来。有大量的例子,但似乎没有一个是有效的。有些人呼吁DotnetCoreTest,大多数人呼吁XUnit2。两个人在我的项目中都没有工作。
运行XUnit2时会出现以下错误:System.InvalidOperationException: Unknown test framework: could not find xunit.dll (v1) or xunit.execution.*.dll (v2) in /Users/dev/Proj
我试图在命令行上运行SpecFlow/xUnit测试,如下所述:
如果我输入这个:
.\packages\xunit.runner.console.2.3.1\tools\net452\xunit.console.exe --help
所描述的标志之一是:
-trait "name=value" : only run tests with matching name/value traits
: if specified more than once, acts as an OR operation
我有一个SpecFlow
我想在我的项目中使用进行单元测试。我使用Visual Studio 2010作为我的IDE。从他们的站点下载并解压xUnit1.9版本后,我看到了至少25个不同的文件。一些是.exe,.dll,.config,.xslt ...etc。
我能假设我需要的只是"xunit.dll“和"xunit.gui.exe”吗?用例是,如果我让其他人从存储库中签出代码,他们应该能够启动xUnit图形用户界面并运行单元测试,而不需要任何额外的下载。
我第一次用Xunit写了6个测试。
[Fact]
public void test_1()...
[Fact]
public void test_2()...
[Fact]
public void test_3()...
[Fact]
public void test_4()...
[Fact]
public void test_5()...
[Fact]
public void test_6()...
在这篇文章之后,我能够在VS2010中添加xunit控制台作为一个外部工具。
但是,当我单击Xunit Test菜单项时,我会得到以下结果,它不应该显示Tests complete