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

  • <small id='sstzu'></small><noframes id='sstzu'>

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

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

        TestNG retryAnalyzer 僅在方法@Test 中定義時有效,在

        TestNG retryAnalyzer only works when defined in methods @Test, does not work in class#39; @Test(TestNG retryAnalyzer 僅在方法@Test 中定義時有效,在類@Test 中無效)
      2. <small id='WgL68'></small><noframes id='WgL68'>

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

                  <bdo id='WgL68'></bdo><ul id='WgL68'></ul>
                  本文介紹了TestNG retryAnalyzer 僅在方法@Test 中定義時有效,在類@Test 中無效的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  這按預期工作,測試失敗(由于 haltTesting())并重復 2 次

                  This works as supposed, test fails (due to haltTesting()) and is repeated 2x

                  public class A0001_A0003Test extends TestControl {
                  
                      private Kunde kunde = Kunde.FR_WEHLITZ;
                  
                      @Test(retryAnalyzer = TestRepeat.class, groups = {TestGroups.FAILED}, description = "verify adress")
                      public void testkundenDaten_Angaben() throws Exception {
                          bifiTestInitial();
                          testActions.selectKunde(kunde);
                          haltTesting();
                      }
                  } 
                  

                  但是因為我在一個班級中有多個測試,所以我在班級級別定義了 repeatAnalyzer

                  but because i have multiple tests in one class, i defined the repeatAnalyzer on class level

                  @Test(retryAnalyzer = TestRepeat.class)
                  public class A0001_A0003Test extends TestControl {
                  
                      private Kunde kunde = Kunde.FR_WEHLITZ;
                  
                      @Test(groups = {TestGroups.FAILED}, description = "verify adress")
                      public void testkundenDaten_Angaben() throws Exception {
                          bifiTestInitial();
                          testActions.selectKunde(kunde);
                          haltTesting();
                      }
                  } 
                  

                  但是沒有重復測試,文檔說:

                  but then the test is not repeated, the documentation says:

                  一個類級別的@Test注解的作用是使所有的此類的公共方法成為測試方法,即使它們是沒有注釋.您仍然可以在方法上重復 @Test 注釋如果你想添加某些屬性.

                  The effect of a class level @Test annotation is to make all the public methods of this class to become test methods even if they are not annotated. You can still repeat the @Test annotation on a method if you want to add certain attributes.

                  所以這應該是可能的,還是我期待錯誤的結果?

                  So it should have been possible or am I expecting the wrong outcome?

                  推薦答案

                  我的解決方案是為 @BeforeSuite 方法中的所有方法設置一個 retryAnalyzer.但是不要在 beforeMethod 中設置它,因為這樣每次調用都會重新創建一個新的計數器 => 無限循環.

                  My solution was to set a retryAnalyzer for all methods in the @BeforeSuite method. But do not set it in beforeMethod because then it will be re-created each invocation with a new counter => endless loop.

                  @BeforeSuite(alwaysRun = true)
                  public void beforeSuite(ITestContext context) {
                       TestRepeat testRepeat = new TestRepeat();
                       for (ITestNGMethod method : context.getAllTestMethods()) {
                           method.setRetryAnalyzer(testRepeat);
                       }
                  }
                  

                  這篇關于TestNG retryAnalyzer 僅在方法@Test 中定義時有效,在類@Test 中無效的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='scSbZ'><style id='scSbZ'><dir id='scSbZ'><q id='scSbZ'></q></dir></style></legend><tfoot id='scSbZ'></tfoot>

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

                            <bdo id='scSbZ'></bdo><ul id='scSbZ'></ul>
                              <tbody id='scSbZ'></tbody>

                            <i id='scSbZ'><tr id='scSbZ'><dt id='scSbZ'><q id='scSbZ'><span id='scSbZ'><b id='scSbZ'><form id='scSbZ'><ins id='scSbZ'></ins><ul id='scSbZ'></ul><sub id='scSbZ'></sub></form><legend id='scSbZ'></legend><bdo id='scSbZ'><pre id='scSbZ'><center id='scSbZ'></center></pre></bdo></b><th id='scSbZ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='scSbZ'><tfoot id='scSbZ'></tfoot><dl id='scSbZ'><fieldset id='scSbZ'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 自拍偷拍第一页 | 电影午夜精品一区二区三区 | 精品久久久久久亚洲综合网站 | 香蕉大人久久国产成人av | 成人在线视频网 | 视频一区 亚洲 | 91精品国产综合久久久亚洲 | 日韩在线免费播放 | 麻豆一区二区三区 | 久久精品成人 | 日韩一区二区三区在线视频 | 欧美日韩在线观看一区 | 精品国产青草久久久久福利 | 久久精品欧美一区二区三区不卡 | 欧美男人的天堂 | 4h影视| 精品国产乱码久久久久久a丨 | 国产免费让你躁在线视频 | 中文字幕一二三区 | 成人在线视频网 | 免费中文字幕日韩欧美 | 天天av网 | 国产在线观看一区二区 | 久久99蜜桃综合影院免费观看 | 成年人黄色免费视频 | 国内自拍偷拍 | 日韩精品1区2区3区 爱爱综合网 | 亚洲欧美一区二区三区1000 | 一区二区三区视频在线观看 | 国产精品3区 | 午夜欧美a级理论片915影院 | 国产中文字幕在线 | 九九伊人sl水蜜桃色推荐 | 午夜精品久久久久久久久久久久 | 精品欧美乱码久久久久久1区2区 | 精品一区二区三区四区在线 | 久热电影| 亚洲www啪成人一区二区麻豆 | 久久91 | 国产片网站 | 欧美日韩淫片 |