<ruby id="h6500"><table id="h6500"></table></ruby>
    1. <ruby id="h6500"><video id="h6500"></video></ruby>
          1. <progress id="h6500"><u id="h6500"><form id="h6500"></form></u></progress>

            容錯測試1-aop實(shí)現(3)

            發(fā)表于:2013-07-22來(lái)源:淘測試作者:秦淵點(diǎn)擊數: 標簽:容錯測試
            / aop:aspect / aop:config b) 腳本 : 配置切面參數 調用被 測試方法 c) 執行策略 : 是否要多線(xiàn)程 構造單個(gè)線(xiàn)程的參數 配置執行策略,運行 @Test public void test_01_t

                    </aop:aspect>

                 </aop:config>

              • b)  腳本: 配置切面參數&調用被測試方法
              • c)  執行策略: 是否要多線(xiàn)程&構造單個(gè)線(xiàn)程的參數&配置執行策略,運行

            @Test

                public void test_01_thread_run(){        

                   ThreadFactory thFac=new ThreadFactory();

                   //配置切面信息

                    mockAspect.setMockResult(11);

                   ThreadTest th=new ThreadTest();

                   th.setOwnerBean(hello);

                   th.setMethodName("hello");

                   th.setMockAspect(mockAspect);

                   th.setThreadMockFlag(true);

            //一個(gè)線(xiàn)程可以有n個(gè)校驗服務(wù)

                   AssertService as=new AssertService();

                   //增加線(xiàn)程中的驗證方法,直接可以定義

                   as.setCheckMethod(this, "checkResult");

                   th.addAssertService(as);

                   //通過(guò)傳單個(gè)mock thread來(lái)傳參

                   thFac.addThread(th);

                   //同時(shí)啟動(dòng)5個(gè)線(xiàn)程來(lái)測試

                   thFac.startThreads(5);

              }

                public void checkResult(Integer result){

                   System.out.println("傳入設置actual值得方法");

                   result=result+1;

                   assertThat("

            原文轉自:http://www.taobaotesting.com/blogs/2443

            老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月
              <ruby id="h6500"><table id="h6500"></table></ruby>
              1. <ruby id="h6500"><video id="h6500"></video></ruby>
                    1. <progress id="h6500"><u id="h6500"><form id="h6500"></form></u></progress>