Duplicate Output with TestContext.WriteLine
I've made an "ordered test" in VS 2008 which executes 4 tests. One of the TestMethod
tests it runs has several writeline statements, like this:
TestContext.WriteLine("On开发者_开发百科e");
TestContext.WriteLine("Two");
TestContext.WriteLine("Three");
The output I receive in the "Additional Information" of the results shows this output:
One
Two Three One Two One Two
I don't think the test method is running multiple times. I think the writeline output is simply being buffered in some bizarre way. How do I fix this?
I get this problem with any test method that has TestContext
writeline statements (at least when invoked from an ordered test).
精彩评论