Questions tagged [xunit2]

Related to the version 2 of XUnit

Related to the version 2 of XUnit: https://github.com/xunit/xunit/releases

64 questions
2
votes
0 answers

Xunit 1.9.1 to xunit 2.1.0 migeration (IOC / Dependency injection)

I need your expert advice Background: I am migerating my Xunit 1.9.1 to 2.1.0. I am using the following extensions - Xunit.ioc.ninject - xunit.ioc.autofac Problem: These two are not supported anymore.. I am using -…
BehranG BinA
  • 504
  • 1
  • 5
  • 9
2
votes
1 answer

Discover Tests Runs Twice in xUnit

I have my solution setup whereby there is one xUnit test project/assembly configured within that solution that has an xUnit desktop runner. When I run the tests of this solution by running "Run All" in the Test Explorer window, I see the following…
Mike-E
  • 2,477
  • 3
  • 22
  • 34
2
votes
1 answer

teamcity and xunit 2.0

I am trying to get teamcity 9.1.1 to run an xunit 2.0 tests that where made int visual studio 2015. Here is what i have done: downloaded the zip (https://github.com/carlpett/xUnit-TeamCity/releases/tag/1.0…
2
votes
1 answer

using xunit2 in visual studio 2015. Test explorer does not display output

When I open the Test Explorer, I do not see my tests, even after a rebuild. I can run the tests using dnx . test and they run as expected. My project.json file is listed below. I am using ASP.Net 5 beta6 with xUnit 2 and Visual Studio 2015 (beta…
Jeff Riegel
  • 83
  • 2
  • 7
1
vote
0 answers

Not able to generate allure reports in .Net 6.0 project with Xunit unit test framework

I have a .Net 6 project with Xunit and I have installed the https://github.com/Tinkoff/Allure.XUnit Nuget package. I am using the following config file for allure reports and have placed this at the root of my project. The file name is…
Anon
  • 221
  • 1
  • 4
  • 12
1
vote
1 answer

Selenium 4 EdgeDriver cannot run parallel tests under xUnit

I have a console app which launches 2 Edge windows simultaneously and navigates within them just fine: // usings using OpenQA.Selenium.Edge; // generic driver options List Options = new List() { // "headless", // add this to run…
Matt W
  • 11,753
  • 25
  • 118
  • 215
1
vote
1 answer

xUnit-cli can't find dotnet on MacOS

I have a Xamarin forms project that I'm running on an Intel Mac. We are using XUnit for unit testing, and I would like to be able to run the tests on the command line on my Mac. The tests run inside the IDE but I can't get them to run on the command…
TheLukeMcCarthy
  • 2,253
  • 2
  • 25
  • 34
1
vote
1 answer

Azure pipelines: How to add failed selenium Xunit test case attachment in VS test task

I use the Xunit2 selenium framework for automated test cases. Some case fails in pipeline. I want to see the attachment of the fail test case in the Test tab. How can I do this using VS test task?
Gkm
  • 237
  • 1
  • 5
  • 19
1
vote
0 answers

Behavior of tests when run in xUnit 2

From what I have read from the docs of xUnit, I could infer that by default any class is a test collection and runs in parallel. So my question is whether multiple appdomains are created for running these tests in parallel or is it one appdomain per…
Sharthak Ghosh
  • 576
  • 1
  • 9
  • 22
1
vote
0 answers

AutoMapper Mapping Exception when using xunit2

I am completely clueless as to why I am getting the mapping exceptions. I have created a singleton to load all my profiles. I am loading my profiles by getting the type from the assembly and then using Activator.CreateInstance to instantiate the…
Sharthak Ghosh
  • 576
  • 1
  • 9
  • 22
1
vote
3 answers

Unit Test Save Changes failing

Frameworks .NETCoreApp 1.1 EF Core 1.1.1 Xunit 2.2.0 Moq 4.7.8 Controller Post Method _yourRepository is injected in the controllers constructor and is of type IYourRepository [HttpPost(Name = "CreateMethod")] public async Task
GreenyMcDuff
  • 3,292
  • 7
  • 34
  • 66
1
vote
2 answers

XUnit Test with autofac

I followed this link https://github.com/dennisroche/xunit.ioc.autofac to create XUnit Test with autofac, but I got error The requested service 'Xunit.Sdk.TestOutputHelper' has not been registered. To avoid this exception, either register a…
Edward
  • 28,296
  • 11
  • 76
  • 121
1
vote
1 answer

AppDomain Usage Issue in Xunit test cases -Cake Script

I am running the Xunit Test cases as mentioned in my previous question. How to get passed and fail test case count in xunit using cake(c# make) script While running the test cases, most of my test cases are failed while trying to access a file from…
Venkat
  • 2,549
  • 2
  • 28
  • 61
1
vote
0 answers

OpenCover XUnit 2.0

I am trying to configure XUnit 2.0 with OpenCover to be ultimately fed into SonarQube. However, I cannot figure out how to get the .xml results file out of the process. There doesn't seem to be an argument for this. Can anyone help? Thanks
KnowHoper
  • 4,352
  • 3
  • 39
  • 54
0
votes
0 answers

Getting circular reference with autofixture even after omit the behavior

I have the below test method, and I am using AutoFixture.Xunit2 for testing purposes. [UsesVerify] public class UpdateWorkspaceTests : TestBase { private readonly Fixture _fixture; public UpdateWorkspaceTests() { _fixture = new…