0

我有一组由 for 循环处理的按顺序运行的套件。我想通过使用 coreJava 并行运行可用的 TestSuites。任何人都可以帮助我如何做到这一点?

Xls_Reader suiteLauncherXls=new Xls_Reader("src/XlsFiles/SuiteLauncher.xlsx");

int RowCount=suiteLauncherXls.getRowCount(Constants.TEST_SUITE_SHEET);

for(int suiteCount = 2; suiteCount <= RowCount; suiteCount++)
        {
             SUITE_ID = suiteLauncherXls.getCellData(Constants.TEST_SUITE_SHEET, Constants.Test_Suite_ID, suiteCount);
             RUNMODE = suiteLauncherXls.getCellData(Constants.TEST_SUITE_SHEET, Constants.COL_HEAD_RUNMODE, suiteCount);
             NODEPC = suiteLauncherXls.getCellData(Constants.TEST_SUITE_SHEET, Constants.COL_HEAD_NODEPC, suiteCount);

        if(isRunableMode(RUNMODE))
         {
            // Report file location declaration 
            ExReport = new ExtentReports(System.getProperty("user.dir")+"\\src\\TestReports\\"+SUITE_ID+"\\HTMLReport.html");

            nodeURL = "http://" + NODEPC + ":5566/wd/hub";

            //Initiating Suite File       
            String SuiteFile = "src/XlsFiles/"+SUITE_ID+"/Suite.xlsx";
            suiteXLS = new Xls_Reader(SuiteFile);

            DriverScript test = new DriverScript();
            test.start();

            //ExReport.endTest(ExTest);
            ExReport.flush();
            sendAutomationReport();
            }
        }
    }
4

0 回答 0