久久久久久久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 中定義時(shí)有效,在

        TestNG retryAnalyzer only works when defined in methods @Test, does not work in class#39; @Test(TestNG retryAnalyzer 僅在方法@Test 中定義時(shí)有效,在類@Test 中無(wú)效)
      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 中定義時(shí)有效,在類@Test 中無(wú)效的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問題描述

                  這按預(yù)期工作,測(cè)試失敗(由于 haltTesting())并重復(fù) 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();
                      }
                  } 
                  

                  但是因?yàn)槲以谝粋€(gè)班級(jí)中有多個(gè)測(cè)試,所以我在班級(jí)級(jí)別定義了 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();
                      }
                  } 
                  

                  但是沒有重復(fù)測(cè)試,文檔說:

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

                  一個(gè)類級(jí)別的@Test注解的作用是使所有的此類的公共方法成為測(cè)試方法,即使它們是沒有注釋.您仍然可以在方法上重復(fù) @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.

                  所以這應(yīng)該是可能的,還是我期待錯(cuò)誤的結(jié)果?

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

                  推薦答案

                  我的解決方案是為 @BeforeSuite 方法中的所有方法設(shè)置一個(gè) retryAnalyzer.但是不要在 beforeMethod 中設(shè)置它,因?yàn)檫@樣每次調(diào)用都會(huì)重新創(chuàng)建一個(gè)新的計(jì)數(shù)器 => 無(wú)限循環(huán).

                  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);
                       }
                  }
                  

                  這篇關(guān)于TestNG retryAnalyzer 僅在方法@Test 中定義時(shí)有效,在類@Test 中無(wú)效的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測(cè) 32 位 int 上的整數(shù)溢出?)
                  Local variables before return statements, does it matter?(return 語(yǔ)句之前的局部變量,這有關(guān)系嗎?)
                  How to convert Integer to int?(如何將整數(shù)轉(zhuǎn)換為整數(shù)?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內(nèi)創(chuàng)建一個(gè)隨機(jī)打亂數(shù)字的 int 數(shù)組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲(chǔ)為 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>
                          • 主站蜘蛛池模板: www精品| 欧美色成人 | 国产成人精品久久 | 亚洲精品电影网在线观看 | 91视频在线看 | 亚洲一区二区三区四区五区午夜 | 亚洲高清免费观看 | 日韩一级一区 | 亚洲人成在线播放 | 亚洲精品在线国产 | 成人影院在线 | 在线免费激情视频 | 国产中文一区二区三区 | 一区二区三区视频在线免费观看 | 久久99精品久久久 | 久草网址 | 欧美在线一级 | 国产一级久久久久 | 污视频在线免费观看 | 伦理二区| 久草综合在线 | 中文字幕免费视频 | 三级视频在线观看 | 欧美午夜视频 | 在线免费看91| 99热首页| 91久久网站 | 久久久国产一区 | 一区二区三区免费网站 | 国产精品美女久久久久久久网站 | 亚洲欧洲日本国产 | 日一日操一操 | 99热热精品 | 国产乱精品一区二区三区 | 国产一区久久 | 亚洲色图第一页 | 久久av在线播放 | 国产乱码久久久久久 | 亚洲成人免费视频 | 成人福利在线视频 | 精品一区国产 |