久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='YLamc'></small><noframes id='YLamc'>

    <bdo id='YLamc'></bdo><ul id='YLamc'></ul>

      1. <legend id='YLamc'><style id='YLamc'><dir id='YLamc'><q id='YLamc'></q></dir></style></legend>
      2. <i id='YLamc'><tr id='YLamc'><dt id='YLamc'><q id='YLamc'><span id='YLamc'><b id='YLamc'><form id='YLamc'><ins id='YLamc'></ins><ul id='YLamc'></ul><sub id='YLamc'></sub></form><legend id='YLamc'></legend><bdo id='YLamc'><pre id='YLamc'><center id='YLamc'></center></pre></bdo></b><th id='YLamc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='YLamc'><tfoot id='YLamc'></tfoot><dl id='YLamc'><fieldset id='YLamc'></fieldset></dl></div>
        <tfoot id='YLamc'></tfoot>

      3. TestNG 依賴于不同類的方法

        TestNG dependsOnMethods from different class(TestNG 依賴于不同類的方法)

          • <bdo id='XwlRX'></bdo><ul id='XwlRX'></ul>

              <tbody id='XwlRX'></tbody>

            • <i id='XwlRX'><tr id='XwlRX'><dt id='XwlRX'><q id='XwlRX'><span id='XwlRX'><b id='XwlRX'><form id='XwlRX'><ins id='XwlRX'></ins><ul id='XwlRX'></ul><sub id='XwlRX'></sub></form><legend id='XwlRX'></legend><bdo id='XwlRX'><pre id='XwlRX'><center id='XwlRX'></center></pre></bdo></b><th id='XwlRX'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='XwlRX'><tfoot id='XwlRX'></tfoot><dl id='XwlRX'><fieldset id='XwlRX'></fieldset></dl></div>

              <tfoot id='XwlRX'></tfoot>
                <legend id='XwlRX'><style id='XwlRX'><dir id='XwlRX'><q id='XwlRX'></q></dir></style></legend>

                <small id='XwlRX'></small><noframes id='XwlRX'>

                1. 本文介紹了TestNG 依賴于不同類的方法的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  @Test 注釋的 dependsOnMethods 屬性在要依賴的測試與具有此注釋的測試屬于同一類時正常工作.但是如果要測試的方法和依賴的方法在不同的類中,則不起作用.示例如下:

                  The dependsOnMethods attribute of the @Test annotation works fine when the test to be depended upon is in the same class as that of the test that has this annotation. But it does not work if the to-be-tested method and depended-upon method are in different classes. Example is as follows:

                  class c1 {
                    @Test
                    public void verifyConfig() {
                      //verify some test config parameters
                    }
                  }
                  
                  class c2 {
                    @Test(dependsOnMethods={"c1.verifyConfig"})
                    public void dotest() {
                      //Actual test
                    }
                  }
                  

                  有沒有辦法繞過這個限制?一種簡單的方法是在 class c2 中創建一個調用 c1.verifyConfig() 的測試.但這將是太多的重復.

                  Is there any way to get around this limitation? One easy way out is to create a test in class c2 that calls c1.verifyConfig(). But this would be too much repetition.

                  推薦答案

                  把方法放在一個group中,使用dependsOnGroups.

                  Put the method in a group and use dependsOnGroups.

                  class c1 {
                    @Test(groups={"c1.verifyConfig"})
                    public void verifyConfig() {
                      //verify some test config parameters
                    }
                  }
                  
                  class c2 {
                    @Test(dependsOnGroups={"c1.verifyConfig"})
                    public void dotest() {
                      //Actual test
                    }
                  }
                  

                  建議在 @Before* 中驗證配置并在出現問題時拋出,這樣測試就不會運行.這樣,測試就可以專注于測試.

                  It is recommended to verify configuration in a @Before* and throw if something goes wrong there so the tests won't run. This way the tests can focus on just testing.

                  class c2 {
                    @BeforeClass
                    public static void verifyConfig() {
                      //verify some test config parameters
                      //Usually just throw exceptions
                      //Assert statements will work
                    }
                  
                    @Test
                    public void dotest() {
                      //Actual test
                    }
                  }
                  

                  這篇關于TestNG 依賴于不同類的方法的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)

                  <legend id='P07Y6'><style id='P07Y6'><dir id='P07Y6'><q id='P07Y6'></q></dir></style></legend>

                  <small id='P07Y6'></small><noframes id='P07Y6'>

                    <tbody id='P07Y6'></tbody>

                    1. <i id='P07Y6'><tr id='P07Y6'><dt id='P07Y6'><q id='P07Y6'><span id='P07Y6'><b id='P07Y6'><form id='P07Y6'><ins id='P07Y6'></ins><ul id='P07Y6'></ul><sub id='P07Y6'></sub></form><legend id='P07Y6'></legend><bdo id='P07Y6'><pre id='P07Y6'><center id='P07Y6'></center></pre></bdo></b><th id='P07Y6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='P07Y6'><tfoot id='P07Y6'></tfoot><dl id='P07Y6'><fieldset id='P07Y6'></fieldset></dl></div>
                      <tfoot id='P07Y6'></tfoot>
                          <bdo id='P07Y6'></bdo><ul id='P07Y6'></ul>
                            主站蜘蛛池模板: 日韩在线视频一区 | 日韩a视频 | 日韩av一区二区在线观看 | 国产一区在线看 | 青青草国产在线观看 | 中文天堂网 | 国产一区二区在线免费观看 | 欧美v免费 | 天天操操 | 一区二区三区四区日韩 | 亚洲视频中文字幕 | 91久久国产综合久久 | 国产91综合 | 一级在线毛片 | 欧洲精品一区 | av网站免费在线观看 | 毛片在线视频 | 日日综合 | 91在线精品播放 | 久久国产精品一区二区三区 | 97国产精品视频人人做人人爱 | 国产亚洲第一页 | 久久久国产精品一区 | 91视频进入 | 久久国产一区二区 | 国产成人精品午夜视频免费 | 黄色大片视频 | 在线婷婷| 99久9| 91亚洲精品在线 | 成人在线观看免费爱爱 | 国产高清精品在线 | 天天综合干 | 日批免费看 | 日韩视频在线免费观看 | 免费成人毛片 | 亚洲v区| 午夜精品久久久久久久99黑人 | 在线观看免费高清av | 性高朝久久久久久久3小时 av一区二区三区四区 | 91久久久久久久久久久久久 |