开发者

where is the [Duration] attribute in mbunit, for timing tests?

开发者 https://www.devze.com 2023-04-02 21:09 出处:网络
Is it gone from the latest version? I want to see that a method doesn\'t deteriorate in its performance.

Is it gone from the latest version?

I want to see that a method doesn't deteriorate in its performance. I开发者_如何学JAVA forgot the technical term for it.


Have a look at the [Timeout] attribute. It might decorate test methods or test fixtures. The default value (when not specified) is 10 minutes.

[TestFixture]
public class Fixture
{
  [Test, Timeout(60)] // timeout at 60 seconds
  public void Method()
  {
  }
}
0

精彩评论

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