<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # TestNG 注解教程 > 原文: [https://howtodoinjava.com/testng/testng-annotations-tutorial/](https://howtodoinjava.com/testng/testng-annotations-tutorial/) TestNG 使用注解來幫助開發人員編寫測試。 下表是包含有關 TestNG 提供的所有注解的信息及其簡要說明的表。 我將在針對其用法的單獨教程中詳細介紹它們。 ## TestNG 測試配置注解 | 注解 | 描述 | | --- | --- | | [**`@BeforeSuite`**](https://static.javadoc.io/org.testng/testng/6.8.21/org/testng/annotations/BeforeSuite.html "BeforeSuite") | 帶注解的方法將在 TestNG 套件內聲明的任何測試之前執行。 | | [**`@AfterSuite`**](http://testng.org/javadoc/org/testng/annotations/AfterSuite.html "AfterSuite") | 帶注解的方法將在 TestNG 套件內聲明的任何測試之后執行。 | | [**`@BeforeTest`**](http://testng.org/javadoc/org/testng/annotations/BeforeTest.html "BeforeTest") | 帶注解的方法將在 TestNG 套件中聲明的每個測試部分之前執行。 | | [**@AfterTest**](http://testng.org/javadoc/org/testng/annotations/AfterTest.html "AfterTest") | 帶注解的方法將在 TestNG 套件中聲明的每個測試部分之后執行。 | | [**`@BeforeGroups`**](http://testng.org/javadoc/org/testng/annotations/BeforeGroups.html "BeforeGroups") | 帶注解的方法將在執行指定組的任何測試方法之前運行。 | | [**`@AfterGroups`**](http://testng.org/javadoc/org/testng/annotations/AfterGroups.html "AfterGroups") | 帶注解的方法將在指定組的任何測試方法執行后運行。 | | [`@BeforeClass`](http://testng.org/javadoc/org/testng/annotations/BeforeClass.html "BeforeClass") | 帶注解的方法在測試類的任何測試方法之前執行。 | | [**`@AfterClass`**](http://testng.org/javadoc/org/testng/annotations/AfterClass.html "AfterClass") | 在執行測試類的每個測試方法之后,將執行帶注解的方法。 | | [@BeforeMethod](http://testng.org/javadoc/org/testng/annotations/BeforeMethod.html "BeforeMethod") | 這些帶注解的方法在每個測試方法執行之前執行。 | | [**`@AfterMethod`**](http://testng.org/javadoc/org/testng/annotations/AfterMethod.html "AfterMethod") | 這些帶注解的方法在每個測試方法執行后執行。 | | [**`@DataProvider`**](http://testng.org/javadoc/org/testng/annotations/DataProvider.html "DataProvider") | 將方法標記為測試方法的數據提供方法。 所述方法必須返回對象雙數組(`Object[][]`)作為數據。 | | [**`@Factory`**](http://testng.org/javadoc/org/testng/annotations/Factory.html "Factory") | 將帶注解的方法標記為返回類對象數組(`Object[]`)的工廠。 然后,這些類對象將被 TestNG 用作測試類。 這用于運行一組具有不同值的測試用例。 | | [**`@Listeners`**](http://testng.org/javadoc/org/testng/annotations/Listeners.html "Listeners") | 應用于測試類。 定義一組擴展`org.testng.ITestNGListener`的測試監聽器類。 幫助跟蹤執行狀態和記錄目的。 | | [**`Parameters`**](http://testng.org/javadoc/org/testng/annotations/Parameters.html "Parameters") | 此注解用于將參數傳遞給測試方法。 這些參數值在運行時使用`testng.xml`配置文件提供。 | | [**`Test`**](https://static.javadoc.io/org.testng/testng/6.8.21/org/testng/annotations/Test.html "Test") | 將類或方法標記為測試方法。 如果在類級別使用,則類的所有公共方法都將被視為測試方法。 | 當您感到困惑時,請參考 **TestNG 注解**的表格。 **祝您學習愉快!**
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看