xUnit does not produce results file with lots of tests

Viewed 68

Issue

When I run xUnit tests on a project containing a lot of tests, it does not produce the xml result file. If I reduce the number of tests in the same project to a smaller set of tests it does produce the result file. Why is this happening?

Details

My project has about 3200 xUnit tests running in a Jenkins build. I am using the following command to run the tests.

dotnet test --logger:"xunit;LogFilePath=/results/integrationtest_results.xml"

However, this is not creating the integrationtest_results.xml file. I have confirmed the tests did run even though it did not produce the result file.

When I use the following command to filter down the tests to less than 1000 tests it DOES create the integrationtest_results.xml result file.

dotnet test --logger:"xunit;LogFilePath=/results/integrationtest_results.xml" --filter:"someAttribute=someValue"

In the same Jenkins build, I have another project that runs 500 unit tests with the following command.

dotnet test --logger:"xunit;LogFilePath=/results/unittest_results.xml"

This has always produced the expected unittest_results.xml.

In the cases where it does not produce the result file, I do not see any logs stating an error occurred relating to the xunit results file.

Environment

  • C# dotnet core 6.0
  • Xunit v2.4.1
  • Test logger: XunitXml.TestLogger v3.0.70
0 Answers
Related