开发者

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜