0

I have set of suites which run in sequential order one after an another handled by a for loop. I would want to do run the available TestSuites in parallel concurrently by just using coreJava. Could any one help me out on how to do it ?

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();
            }
        }
    }
  • I would probably use one of the many unit test runners(junit for example), and then just call separate suites to run from some command line script loop. – mrfreester Aug 12 '19 at 19:23
  • Hi @mrfreester, I am fully aware and have exp in working with JUnit & TestNG. This hybrid framework is something specific. Only way i got here is to use CoreJava concepts. Please let me if you have any idea around ThreadPools, MultiThreading, Concurrency / Parallelism. – Anand Sathiyaseelan Aug 13 '19 at 04:10

0 Answers0