xunit Questions
2
Solved
My requirement is to combine 2 test results to publish an allure report. Basically, our framework needs run 2 exclusive sets of related tests bases on system status as 2 different test runs. These ...
6
Solved
I would like to be about to use a list, array, and/or seq as a parameter to xUnit's InlineData.
In C# I can do this:
using Xunit; //2.1.0
namespace CsTests
{
public class Tests
{
[Theory]
[Inl...
2
I'm using xUnit with the built in Text Explorer in visual studio 2012. It would be nice to scope the name of the test with the name of the class so if I have for example
namespace Foo.Bar {
class...
Hemato asked 2/1, 2013 at 10:50
3
Solved
I have the following code to set up DBContext in the .Net core 2.0 console program and it's injected to the constructor of the main application class.
IConfigurationRoot configuration = GetConfig...
Mercaptide asked 14/9, 2017 at 20:59
0
I am curious if there is a solution for running the same tests for multiple ICollectionFixtures.
Like having InlineData, but over the whole test class, not only a method.
I need this functionalit...
3
Solved
I have a project ASP.NET core which I integrate unit test with xUnit , Everything work fine but I want to genrate xml report test to integrate in jenkins .
Any help please :)
My project.json is :...
Tod asked 17/1, 2017 at 1:43
1
Solved
How can I override the default output directory and file name jest-junit?
I would like to customise the output configuration of output when using Jest, but it still ends up in the default location...
Unintelligible asked 17/12, 2019 at 10:43
2
Solved
We have our integration tests set up using xUnit and Microsoft.AspNetCore.TestHost.TestServer to run tests against Web API running on ASP.NET Core 2.2.
Our Web API is a single code base that would...
Alpine asked 6/12, 2019 at 6:39
2
Solved
I want to unit test if an event raised by a dependency being subscribed by a class under test.
To set the context, I have the below interfaces and classes.
ITestedService.cs
public interface ITe...
2
Solved
I made a repo for the issue I have with Integration testing upgrading to .net core 3.0 :
https://github.com/ranouf/TestingWithDotNetCore3_0
When I launch the test, I have this issue:
Message:
...
Kirkcudbright asked 3/12, 2019 at 23:14
1
Solved
In Nunit I can do something like this:
[TestFixture("param1")]
[TestFixture("param2")]
public class MyTestFixture
{
public MyTestFixture(string param) { /* more code */ }
/* more code */
}
Aft...
2
Solved
I have controller with localization
public class HomeController : Controller
{
private readonly IStringLocalizer<HomeController> _localizer;
public HomeController(IStringLocalizer<Ho...
Alastair asked 17/4, 2017 at 22:51
2
Solved
Does anybody know how to use xUnit with "Theory" and "InlineData" with enum values? This here is leading to the tests not being recognized as tests and not run:
[Theory]
[InlineData("12h", 12, Per...
Hypogenous asked 25/5, 2019 at 16:54
3
Solved
I wonder if it is possible to run performance testing based on xUnit?
Footsie asked 18/6, 2010 at 7:35
2
Solved
I have an API, and I'm trying to make some integration tests for it with XUnit. Here's my API controller constructor:
public class MyController : Controller
{
readonly IMyRepository _myRepository...
Distant asked 17/9, 2017 at 23:56
1
Solved
How to provide List as a data source for a data theory, I can't find anything in InlineData that supports this :
[InlineData(null, new[] { 42, 2112 }, null)] // This doesn't work, I need so...
2
I am running automated tests on a .NET Core codebase on Gitlab CI. The only output from these tests is the console which contains a lot of garbage and makes it difficult to see exactly which tests ...
3
Solved
I have the following ASP.NET Core integration test using a custom WebApplicationFactory
public class CustomWebApplicationFactory<TEntryPoint> : WebApplicationFactory<TEntryPoint>
w...
Implode asked 20/8, 2019 at 15:32
1
Solved
I am using MassTransit 5.5.5 version and xunit 2.4.1
My consumer looks like this
public class StorageInformationConsumer : IConsumer<CreateStorageInformationSummary>
{
private readonly IBu...
Lonnalonnard asked 29/8, 2019 at 23:11
2
How to skip a data driven test case for some reason?
I can skip a test case with Fact but getting an exception when using skip for parametrized test cases.
Exception: Xunit.SkipException: 'Except...
3
I am creating Xunit tests, with in-memory database. The tests execute correctly if run separately. However if run in parallel, they collide due to primary key issue in dbcontext.
What is best opt...
Homophony asked 13/8, 2019 at 19:2
1
Solved
How do I run unit tests with dotnet test if I have multiple test libraries in a code base?
I can run dotnet test, and it will find and run all tests even across multiple libraries, but it runs and...
Isar asked 18/8, 2019 at 19:49
2
Solved
I have Jenkins master container running in a Kubernetes cluster. I have a separate VM configured as a build slave so that it can build containers.
I am using a Multibranch Pipeline with the Jenkin...
1
Solved
I am writing unit tests for my my Web API and cannot get the test to pass except by removing the include (eager-loading from the method). I am using the in-memory database to provide the dbcontext ...
Nikolos asked 12/8, 2019 at 22:56
3
I am trying to implement Dependency Injection in Xunit test for AppService. Ideal goal is to run the original application program Startup/configuration, and use any dependency injection that was in...
Surtax asked 2/8, 2019 at 17:55
© 2022 - 2024 — McMap. All rights reserved.