xunit

Why is the XUnit plugin not working with Jenkins?

非 Y 不嫁゛ 提交于 2019-12-10 16:27:03
问题 I launched the tests IDE (selenium) from jenkins and I uploaded the XUNIT plugin for having a nice report of test but at the end I obtained this message of ERROR : Tests failed, see result file for details: D:\FTP\stm_atos_automatisation\rapports\ff39\rapport_ff39.html ERROR: Build step failed with exception java.lang.NullPointerException: The types section is required. at org.jenkinsci.plugins.xunit.XUnitProcessor.<init>(XUnitProcessor.java:65) at org.jenkinsci.plugins.xunit.XUnitPublisher

AutoFixture with “weak” types

南楼画角 提交于 2019-12-10 15:11:32
问题 I love AutoFixture, but have run into a bit of very repetitive "arrange" code that I feel like it should be able to handle - somehow. Here is my scenario, illustrated using implementations of IInterceptor from Castle Dynamic Proxy. First the systems under test: public class InterceptorA : IInterceptor { public void Intercept(IInvocation context) { object proxy = context.Proxy; object returnValue = context.ReturnValue; // Do something with proxy and returnValue } } public class InterceptorB :

xUnit.net equivalent for TestContext.AddResultFile()

房东的猫 提交于 2019-12-10 14:47:23
问题 When using MSTest, I believe it's possible to add result files that will appear as attachments in the build reports in TFS (we're using 2015 FWIW), using TestContext.AddResultFile("filename"); Is there an way of doing this if we're using xUnit.net, short of switching back to MSTest or another test framework? 来源: https://stackoverflow.com/questions/37411644/xunit-net-equivalent-for-testcontext-addresultfile

Dotnet CLI build and test – just run the tests

余生长醉 提交于 2019-12-10 11:55:15
问题 **\*test*.dll I want use this schema on dotnet cli but I can't found dotnet test documentation nothing.my project file structure is this way this. At the moment tests It looking at all the .dll files under the .sln file. but I want just looking tests.dll files dotnet test --no-build "**\*test*.dll" //?? All files in my project 回答1: There isn't such a pattern to filter that for dotnet test, we can only filter tests by DisplayName or FullyQualifiedName for xUnit, refer to this link for dertails

Xunit not working using Visual Studio Team Services Build VNext

拈花ヽ惹草 提交于 2019-12-10 10:48:17
问题 After following several blogs detailing how to get xUnit working with Team Services Build vNext: http://tech.trailmax.info/2014/01/run-xunit-in-hosted-team-foundation-service/ Running unit tests in TFS/VSO Build vNext using xUnit adapter http://www.donovanbrown.com/post/2015/06/15/how-to-run-xunit-test-with-vnext-build None of which worked for me. From examining the build logs I get the following warnings for each of my test assemblies. -------------------- Warning: [xUnit.net 00:00:00

.Net Core 2.0 and xUnit doesn't run

女生的网名这么多〃 提交于 2019-12-10 09:45:04
问题 VS2017 + Core 2.0. Created a brand new XUnit test project from template .csproj file: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp2.0</TargetFramework> <IsPackable>false</IsPackable> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" /> <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" /> <PackageReference Include="xunit" Version="2.3.1" /> <PackageReference Include="xunit.runner.console" Version="2.3

Working with multiple environments during integration testing with ASP.NET Core

跟風遠走 提交于 2019-12-10 09:28:18
问题 Here's the launchSettings.json file for the test project: { "profiles": { "test": { "commandName": "test", "environmentVariables": { "Hosting:Environment": "Development" } } } } The test project has a dependency on the server project, and initializes the tests using the server project's Startup class directly like so: Server = new TestServer(TestServer.CreateBuilder().UseStartup<Startup>()); Client = Server.CreateClient(); Yet for some reason, when I enter the Startup.Configure method in the

How to run XUnit tests in the project.json and dotnet tfm world

耗尽温柔 提交于 2019-12-09 16:53:21
问题 Background: Recently I switched from the "old" world to the new project.json world, because new is always better ;) Currently 2 out of 3 projects can use the "dotnet" target framework moniker, the other one needs the full .NET framework (net46). I also switched my test projects to the new project.json world, but it I can´t run any tests. The build is green, but no tests are found. I read this documentation and included the xunit.runner.dnx, but the problem is that is is not a "dnx" project -

xUnit tests do not appear on tfs

落花浮王杯 提交于 2019-12-09 13:39:53
问题 locally tests and works. but it does not see the tfs te on the server and it does not work. I can not see the xUnit test in Tfs and I can not work with it. TFS version 2017 --- Solition---- 回答1: For normal project, you could directly use Visual Studio Test task in the build pipeline. You could try to explicitly specific the path to the xunit runner. Such as $(System.DefaultWorkingDirectory)\packages\xunit.runner.visualstudio.2.2.0\build\_common) And Szeki's comment is right, xUnit test runner

Unit Testing Azure Functions and .csx Files

故事扮演 提交于 2019-12-09 12:24:44
问题 Azure Functions abstract plenty of dependencies like queue libraries and Azure Tables. So from a Unit Test dependencies mocking perspective, there is less coding effort (and accordingly less maintenance). Assuming we are developing locally using Visual Studio 2015 How can I unit test (not interested in integration test) a single Azure Function? Preferably in xUnit, however, any framework would do. How can I unit test a function in a .csx file in general? 回答1: As it stands, it's not really