Duplicate Output with TestContext.WriteLine

I did a "custom test" in VS 2008, which performs 4 tests. One of the tags TestMethodthat it runs has several instructions, such as:

TestContext.WriteLine("One");
TestContext.WriteLine("Two");
TestContext.WriteLine("Three");

The result that I get in the "More Information" results shows this conclusion:

One
Two
Three
One
Two
One
Two

I do not think that the testing method works several times. I think that going to the editorial office is just buffering in some strange way. How to fix it?

I get this problem with any test method that has a TestContextwriteline statement (at least when called from an ordered test).

+3

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


All Articles