TeamCity shows fewer tests that have passed lengthy similar test names due to pruning

I have a unit test with two test cases (I use NUnit). The argument of the test argument is a long string condition. For instance:

[TestCase("condition1 AND condition2 AND ... condition3")] [TestCase("condition1 AND condition2 AND ... condition4")] 

In the issue of TeamCity Build-> Tests, I see that only 1 test passed and the status is OK (2 runs). But he has to show that 2 tests passed, as they are independent test cases.

As I understand it, the problem is that TeamCity identifies tests by their names, but names long names. Therefore, in my case, the name is the same for both tests, it is truncated over the word "AND" and does not contain the last condition. It looks like:

 TestClass.TestName("condition1 AND condition2 AND 

I think this is a TeamCity bug / feature, but maybe someone knows if it can be configured or fixed in some way? Because I want the result to be 2 tests instead of 1. Of course, I can set my own name for my test cases in the code, but I don’t want to fix it that way.
TeamCity version 9.1.30.476.

Thanks in advance for any help.

+5
source share

Source: https://habr.com/ru/post/1239806/


All Articles