zoukankan      html  css  js  c++  java
  • VSTS UnitTest

    TestClass()

    该属性表示一个测试装置。

    TestMethod()

    该属性表示一个测试用例。

    AssemblyInitialize()

    在执行为执行选择的第一个 TestClass() 中的第一个 TestMethod() 之前,执行带有该属性的方法。

    ClassInitialize()

    带有该属性的方法在执行第一个测试之前调用。

    TestInitialize()

    带有该属性的方法在执行每个 TestMethod() 之前调用。

    TestCleanup()

    带有该属性的方法在执行每个 TestMethod() 之后调用。

    ClassCleanup()

    带有该属性的方法在执行 ALL 测试之后调用。

    AssemblyCleanup()

    在执行为执行选择的第一个 TestClass() 中的第一个 TestMethod() 之后,执行带有该属性的方法。

    Description()

    提供关于给定 TestMethod() 的描述。

    Ignore()

    由于某种原因忽略 TestMethod()TestClass()

    ExpectedException()

    当测试特定异常时,如果使用该属性指定的异常不是从实现代码引发,则测试不会失败。


    需要注意的是,上面的属性不是可以适用于所有方法的,比如AssemblyInitialize()和ClassInitialize()是必须是静态方法的属性.
    我们可以把初始化的操作放在他们里进行.

  • 相关阅读:
    topcoder srm 320 div1
    topcoder srm 325 div1
    topcoder srm 330 div1
    topcoder srm 335 div1
    topcoder srm 340 div1
    topcoder srm 300 div1
    topcoder srm 305 div1
    topcoder srm 310 div1
    topcoder srm 315 div1
    如何统计iOS产品不同渠道的下载量?
  • 原文地址:https://www.cnblogs.com/hubcarl/p/1737970.html
Copyright © 2011-2022 走看看