How to use getName method of com.paypal.selion.internal.reports.excelreport.ReportSheetNames class

Best SeLion code snippet using com.paypal.selion.internal.reports.excelreport.ReportSheetNames.getName

Source:ExcelReport.java Github

copy

Full Screen

...139 this.createReportMap();140 // Render reports in the Workbook141 for (ReportMap rm : fullReportMap) {142 List<BaseReport<?>> allReports = rm.getGeneratedReport();143 allReports.iterator().next().generateRep(this.wb, rm.getName(), rm.getGeneratedReport());144 }145 logger.exiting();146 }147 /**148 * Create Run details like owner of run, time and stage used.149 */150 private void createReportInfo() {151 logger.entering();152 HSSFSheet summarySheet = wb.createSheet(ReportSheetNames.TESTSUMMARYREPORT.getName());153 Map<String, String> reportInfo = new LinkedHashMap<String, String>();154 for (Entry<String, String> temp : ConfigSummaryData.getConfigSummary().entrySet()) {155 reportInfo.put(temp.getKey(), temp.getValue());156 }157 int rowNum = 0;158 HSSFCell col;159 HSSFRow row;160 for (Entry<String, String> eachReportInfo : reportInfo.entrySet()) {161 int colNum = 2;162 row = summarySheet.createRow(rowNum++);163 col = row.createCell(colNum);164 col.setCellStyle(Styles.getSubHeading2Style());165 col.setCellValue(eachReportInfo.getKey());166 // Next column holds the values167 col = row.createCell(++colNum);168 col.setCellStyle(Styles.getThinBorderStyle());169 col.setCellValue(eachReportInfo.getValue());170 }171 logger.exiting();172 }173 /**174 * Creates all the report details like which sheet should contain which report and the data associated with the175 * report176 */177 private void createReportMap() {178 logger.entering();179 // Summary Report180 Map<String, List<SummarizedData>> subReportMap = new LinkedHashMap<String, List<SummarizedData>>();181 subReportMap.put("Full Suite Summary", lSuites);182 subReportMap.put("Test Summary", lTests);183 subReportMap.put("Classwise Summary", lClasses);184 subReportMap.put("Groupwise Summary", lGroups);185 ReportMap<SummarizedData> testSummaryReport = new ReportMap<SummarizedData>(186 ReportSheetNames.TESTSUMMARYREPORT.getName(), subReportMap, 0);187 fullReportMap.add(testSummaryReport);188 // Group Detailed Report189 List<SummarizedData> groupsClone = new ArrayList<SummarizedData>(lGroups);190 List<SummarizedData> classData;191 SummarizedData naGroupData = new SummarizedData();192 naGroupData.setsName(TestCaseResult.NA);193 groupsClone.add(naGroupData);194 subReportMap = new LinkedHashMap<String, List<SummarizedData>>();195 for (SummarizedData group : groupsClone) {196 String sGroupName = group.getsName();197 classData = new ArrayList<SummarizedData>();198 for (String sGroupClassName : mpGroupClassData.keySet()) {199 if (sGroupClassName.substring(0, sGroupName.length()).equals(sGroupName)) {200 classData.add(mpGroupClassData.get(sGroupClassName));201 }202 }203 subReportMap.put(sGroupName, classData);204 }205 ReportMap<SummarizedData> secondReport = new ReportMap<SummarizedData>(206 ReportSheetNames.GROUPSUMMARYREPORT.getName(), subReportMap, 0);207 fullReportMap.add(secondReport);208 // TestCase Status Report209 Map<String, List<List<String>>> subDetailReportMap = new LinkedHashMap<String, List<List<String>>>();210 subDetailReportMap.put("Passed TC List", tcPassedData);211 subDetailReportMap.put("Failed TC List", tcFailedData);212 subDetailReportMap.put("Skipped TC List", tcSkippedData);213 ReportMap<List<String>> thirdReport = new ReportMap<List<String>>(ReportSheetNames.TESTCASEREPORT.getName(),214 subDetailReportMap, 1);215 fullReportMap.add(thirdReport);216 // Defect Report217 Map<String, List<List<String>>> lstDefectReports = new LinkedHashMap<String, List<List<String>>>();218 lstDefectReports.put("Defect Summary", tcDefectData);219 ReportMap<List<String>> fourthReport = new ReportMap<List<String>>(ReportSheetNames.DEFECTREPORT.getName(),220 lstDefectReports, 1);221 fullReportMap.add(fourthReport);222 // Changing the titles of the Defect Report223 BaseReport<List<String>> bR = (BaseReport<List<String>>) fullReportMap.get(fullReportMap.size() - 1)224 .getGeneratedReport().iterator().next();225 List<String> lsTitles = Arrays.asList("Class Name", "Method/Testcase id", "Test Description",226 "Group[s]", "Time taken", "Output Logs", "Error Message", "Error Details");227 bR.setColTitles(lsTitles);228 // TestCase Output Details Report229 Map<String, List<List<String>>> fifthTestOutputSubReportMap = new LinkedHashMap<String, List<List<String>>>();230 fifthTestOutputSubReportMap.put("Test Output", tcOutputData);231 ReportMap<List<String>> fifthReportSheet = new ReportMap<List<String>>(232 ReportSheetNames.TESTOUTPUTDETAILSREPORT.getName(),233 fifthTestOutputSubReportMap, 2);234 fullReportMap.add(fifthReportSheet);235 logger.exiting();236 }237 /**238 * Generates all summarized counts for various reports239 * 240 * @param suites241 * the {@link List} of {@link ISuite}242 */243 private void generateSummaryData(List<ISuite> suites) {244 logger.entering(suites);245 SummarizedData tempSuite;246 SummarizedData tempTest;247 SummarizedData tempGroups;248 this.generateTestCaseResultData(suites);249 // Generating Group Summary data250 for (ISuite suite : suites) {251 tempSuite = new SummarizedData();252 tempSuite.setsName(suite.getName());253 Map<String, ISuiteResult> allResults = suite.getResults();254 for (Entry<String, Collection<ITestNGMethod>> sGroupName : suite.getMethodsByGroups().entrySet()) {255 tempGroups = new SummarizedData();256 tempGroups.setsName(sGroupName.getKey());257 tempGroups.incrementiTotal(sGroupName.getValue().size());258 for (TestCaseResult tr : allTestsResults) {259 if (tr.getGroup().contains(sGroupName.getKey())) {260 tempGroups.incrementCount(tr.getStatus());261 tempGroups.incrementDuration(tr.getDurationTaken());262 }263 }264 tempGroups.setiTotal(tempGroups.getiPassedCount() + tempGroups.getiFailedCount()265 + tempGroups.getiSkippedCount());266 lGroups.add(tempGroups);267 }268 // Generating Test summary data269 for (ISuiteResult testResult : allResults.values()) {270 ITestContext testContext = testResult.getTestContext();271 tempTest = new SummarizedData();272 tempTest.setsName(testContext.getName());273 tempTest.setiFailedCount(testContext.getFailedTests().size());274 tempTest.setiPassedCount(testContext.getPassedTests().size());275 tempTest.setiSkippedCount(testContext.getSkippedTests().size());276 tempTest.setiTotal(tempTest.getiPassedCount() + tempTest.getiFailedCount()277 + tempTest.getiSkippedCount());278 tempTest.setlRuntime(testContext.getEndDate().getTime() - testContext.getStartDate().getTime());279 lTests.add(tempTest);280 }281 // Generating Suite Summary data282 for (SummarizedData test : lTests) {283 tempSuite.setiPassedCount(test.getiPassedCount() + tempSuite.getiPassedCount());284 tempSuite.setiFailedCount(test.getiFailedCount() + tempSuite.getiFailedCount());285 tempSuite.setiSkippedCount(tempSuite.getiSkippedCount() + test.getiSkippedCount());286 tempSuite.setiTotal(tempSuite.getiPassedCount() + tempSuite.getiFailedCount()287 + tempSuite.getiSkippedCount());288 tempSuite.setlRuntime(test.getlRuntime() + tempSuite.getlRuntime());289 }290 lSuites.add(tempSuite);291 }292 Collections.sort(lGroups);293 Collections.sort(lTests);294 logger.exiting();295 }296 /**297 * Method to generate array of all results of all testcases that were run in a suite Output : Populates the298 * allTestsResults arraylist with results and info for all test methods.299 */300 private void generateTestCaseResultData(List<ISuite> suites) {301 logger.entering();302 for (ISuite suite : suites) {303 Map<String, ISuiteResult> allResults = suite.getResults();304 for (ISuiteResult testResult : allResults.values()) {305 ITestContext testContext = testResult.getTestContext();306 IResultMap passedResultMap = testContext.getPassedTests();307 IResultMap failedResultMap = testContext.getFailedTests();308 IResultMap skippedResultMap = testContext.getSkippedTests();309 this.allTestsResults.addAll(this.createResultFromMap(passedResultMap));310 this.allTestsResults.addAll(this.createResultFromMap(failedResultMap));311 this.allTestsResults.addAll(this.createResultFromMap(skippedResultMap));312 }313 }314 logger.exiting();315 }316 /**317 * Generates individual TestCase Results based on map of passed, failed and skipped methods Returns the list of318 * TestCaseResult objects generated.319 */320 private List<TestCaseResult> createResultFromMap(IResultMap resultMap) {321 logger.entering(resultMap);322 List<TestCaseResult> statusWiseResults = new ArrayList<TestCaseResult>();323 for (ITestResult singleMethodResult : resultMap.getAllResults()) {324 TestCaseResult tcresult1 = new TestCaseResult();325 tcresult1.setITestResultobj(singleMethodResult);326 statusWiseResults.add(tcresult1);327 }328 Collections.sort(statusWiseResults);329 logger.exiting(statusWiseResults);330 return statusWiseResults;331 }332 /**333 * Generates class based summary and the basis for Detailed group-wise summary report334 */335 private void generateTCBasedData(List<TestCaseResult> allTestsList) {336 logger.entering(allTestsList);337 SummarizedData tempClass;338 SummarizedData tempGroupClass;339 Map<String, SummarizedData> mpClassData = new HashMap<String, SummarizedData>();340 int outputSheetRowCounter = 3;341 for (TestCaseResult tcResult : allTestsList) {342 // Segregating for class data343 String sTempClassName = tcResult.getClassName();344 // If class not already added to Class data, then create new ClassObject exists345 if (!mpClassData.containsKey(sTempClassName)) {346 tempClass = new SummarizedData();347 tempClass.setsName(sTempClassName);348 } else {349 tempClass = mpClassData.get(sTempClassName);350 }351 // Adding test to total count352 tempClass.incrementiTotal();353 // Adding all groups to map354 for (String sGroup : tcResult.getGroup()) {355 // Forming a key for the GroupClass map which is <GroupName><ClassName>356 String sGroupClassName = sGroup + sTempClassName;357 if (!mpGroupClassData.containsKey(sGroupClassName)) {358 tempGroupClass = new SummarizedData();359 tempGroupClass.setsName(sTempClassName);360 } else {361 tempGroupClass = mpGroupClassData.get(sGroupClassName);362 }363 tempGroupClass.incrementiTotal();364 tempGroupClass.incrementCount(tcResult.getStatus());365 tempGroupClass.incrementDuration(tcResult.getDurationTaken());366 mpGroupClassData.put(sGroupClassName, tempGroupClass);367 }368 // Segregating for detailed Testcase Status wise data369 List<String> str = new ArrayList<String>();370 str.add(tcResult.getClassName());371 str.add(tcResult.getMethodName());372 str.add(tcResult.getTestDesc());373 str.add(tcResult.getGroup().toString());374 str.add(String.valueOf(tcResult.getDurationTaken()));375 str.add("'" + ReportSheetNames.TESTOUTPUTDETAILSREPORT.getName() + "'!B"376 + Integer.toString(outputSheetRowCounter));377 List<String> outputStr = new ArrayList<String>();378 outputStr.add("Class Name:" + tcResult.getClassName());379 outputStr.add("Method/Testcase id:" + tcResult.getMethodName());380 outputStr.addAll(tcResult.getssmsg());381 // Based on status, incrementing class count and adding str to correct382 // list for TC detailed report383 switch (tcResult.getStatus()) {384 case ITestResult.FAILURE: {385 tcFailedData.add(str);386 // For failed cases adding data for defect description sheet387 for (int iErrorCount = 0; iErrorCount < tcResult.getError().size(); iErrorCount++) {388 List<String> tmpList = new ArrayList<String>();389 tmpList.addAll(0, str);...

Full Screen

Full Screen

Source:ReportSheetNames.java Github

copy

Full Screen

...32 ReportSheetNames(String sReportName, List<String> lsSubReports) {33 this.sRepName = sReportName;34 this.lsSubReportNames = lsSubReports;35 }36 public String getName() {37 return this.sRepName;38 }39 public List<String> getSubReportNames() {40 return this.lsSubReportNames;41 }42 public void setReport(List<String> lsReports) {43 this.lsSubReportNames = lsReports;44 }45 public void addReport(String sSubReportName) {46 this.lsSubReportNames.add(sSubReportName);47 }48}...

Full Screen

Full Screen

getName

Using AI Code Generation

copy

Full Screen

1String sheetName = ReportSheetNames.getName(ReportSheetNames.EXCEPTIONS_SHEET);2String sheetName = ReportSheetNames.getName(ReportSheetNames.EXCEPTIONS_SHEET);3String sheetName = ReportSheetNames.getName(ReportSheetNames.EXCEPTIONS_SHEET);4String sheetName = ReportSheetNames.getName(ReportSheetNames.EXCEPTIONS_SHEET);5String sheetName = ReportSheetNames.getName(ReportSheetNames.EXCEPTIONS_SHEET);6String sheetName = ReportSheetNames.getName(ReportSheetNames.EXCEPTIONS_SHEET);7String sheetName = ReportSheetNames.getName(ReportSheetNames.EXCEPTIONS_SHEET);8String sheetName = ReportSheetNames.getName(ReportSheetNames.EXCEPTIONS_SHEET);9String sheetName = ReportSheetNames.getName(ReportSheetNames.EXCEPTIONS_SHEET);10String sheetName = ReportSheetNames.getName(ReportSheetNames.EXCEPTIONS_SHEET);11String sheetName = ReportSheetNames.getName(ReportSheetNames.EXCEPTIONS_SHEET);12String sheetName = ReportSheetNames.getName(ReportSheetNames

Full Screen

Full Screen

getName

Using AI Code Generation

copy

Full Screen

1String reportSheetName = ReportSheetNames.getName();2System.out.println(reportSheetName);3String reportSheetName = ReportSheetNames.getSheetName(ReportSheetNames.SUMMARY);4System.out.println(reportSheetName);5String[] reportSheetNames = ReportSheetNames.getSheetNames();6for (String reportSheetName : reportSheetNames) {7 System.out.println(reportSheetName);8}9String[] reportSheetNames = ReportSheetNames.getSheetNames(ReportSheetNames.SUMMARY, ReportSheetNames.DETAILS);10for (String reportSheetName : reportSheetNames) {11 System.out.println(reportSheetName);12}13String[] reportSheetNames = ReportSheetNames.getSheetNames(ReportSheetNames.SUMMARY, ReportSheetNames.DETAILS, ReportSheetNames.SUMMARY);14for (String reportSheetName : reportSheetNames) {15 System.out.println(reportSheetName);16}17String[] reportSheetNames = ReportSheetNames.getSheetNames(ReportSheetNames.SUMMARY, ReportSheetNames.DETAILS, ReportSheetNames.SUMMARY, ReportSheetNames.DETAILS);18for (String reportSheetName : reportSheetNames) {19 System.out.println(reportSheetName);20}21String[] reportSheetNames = ReportSheetNames.getSheetNames(ReportSheetNames.SUMMARY, ReportSheetNames.DETAILS, ReportSheetNames.SUMMARY, ReportSheetNames.DETAILS, ReportSheetNames.SUMMARY);22for (String reportSheetName : reportSheetNames) {23 System.out.println(reportSheetName);24}

Full Screen

Full Screen

getName

Using AI Code Generation

copy

Full Screen

1import com.paypal.selion.internal.reports.excelreport.ReportSheetNames;2import com.paypal.selion.logger.SeLionLogger;3public class 3 {4 private static final SeLionLogger logger = SeLionLogger.getLogger(3.class);5 public static void main(String[] args) {6 logger.info("Name of the sheet is " + ReportSheetNames.SUMMARY.getName());7 }8}9import com.paypal.selion.internal.reports.excelreport.ReportSheetNames;10import com.paypal.selion.logger.SeLionLogger;11public class 4 {12 private static final SeLionLogger logger = SeLionLogger.getLogger(4.class);13 public static void main(String[] args) {14 logger.info("Name of the sheet is " + ReportSheetNames.SUMMARY.getSheetName());15 }16}17import com.paypal.selion.internal.reports.excelreport.ReportSheetNames;18import com.paypal.selion.logger.SeLionLogger;19public class 5 {20 private static final SeLionLogger logger = SeLionLogger.getLogger(5.class);21 public static void main(String[] args) {22 logger.info("Name of the sheet is " + ReportSheetNames.SUMMARY.getSheetName());23 }24}25import com.paypal.selion.internal.reports.excelreport.ReportSheetNames;26import com.paypal.selion.logger.SeLionLogger;27public class 6 {28 private static final SeLionLogger logger = SeLionLogger.getLogger(6.class);29 public static void main(String[] args) {

Full Screen

Full Screen

getName

Using AI Code Generation

copy

Full Screen

1String sheetName = ReportSheetNames.getName(ReportSheetNames.class,"TEST_LOGS");2System.out.println(sheetName);3String sheetName = ReportSheetNames.getName(ReportSheetNames.class,"TEST_LOGS");4System.out.println(sheetName);5String sheetName = ReportSheetNames.getName(ReportSheetNames.class,"TEST_LOGS");6System.out.println(sheetName);7String sheetName = ReportSheetNames.getName(ReportSheetNames.class,"TEST_LOGS");8System.out.println(sheetName);9String sheetName = ReportSheetNames.getName(ReportSheetNames.class,"TEST_LOGS");10System.out.println(sheetName);11String sheetName = ReportSheetNames.getName(ReportSheetNames.class,"TEST_LOGS");12System.out.println(sheetName);13String sheetName = ReportSheetNames.getName(ReportSheetNames.class,"TEST_LOGS");14System.out.println(sheetName);15String sheetName = ReportSheetNames.getName(ReportSheetNames.class,"TEST_LOGS");16System.out.println(sheetName);17String sheetName = ReportSheetNames.getName(ReportSheetNames.class,"TEST_LOGS");18System.out.println(sheetName);19String sheetName = ReportSheetNames.getName(ReportSheetNames.class,"TEST_LOGS");20System.out.println(sheetName);21String sheetName = ReportSheetNames.getName(ReportSheetNames.class,"TEST_LOGS");22System.out.println(sheetName);

Full Screen

Full Screen

getName

Using AI Code Generation

copy

Full Screen

1String sheetName = ReportSheetNames.getName(ReportSheetNames.SheetName.SUITE_SUMMARY);2int row = ExcelReporter.getRow(sheetName, 1, "MyTest");3String cell = ExcelReporter.getCell(sheetName, row, 1);4String cell = ExcelReporter.getCell(sheetName, row, 2);5String cell = ExcelReporter.getCell(sheetName, row, 3);6String cell = ExcelReporter.getCell(sheetName, row, 4);7String cell = ExcelReporter.getCell(sheetName, row, 5);8String cell = ExcelReporter.getCell(sheetName, row, 6);9String cell = ExcelReporter.getCell(sheetName, row, 7);10String cell = ExcelReporter.getCell(sheetName, row, 8);11String cell = ExcelReporter.getCell(sheetName, row, 9);12String cell = ExcelReporter.getCell(sheetName, row, 10);13String cell = ExcelReporter.getCell(sheetName, row, 11);14String cell = ExcelReporter.getCell(sheetName

Full Screen

Full Screen

getName

Using AI Code Generation

copy

Full Screen

1String sheetName = ReportSheetNames.getName(ReportSheetNames.SheetName.TEST_METHOD_REPORT_SHEET);2System.out.println(sheetName);3String sheetName = ReportSheetNames.getSheetName(ReportSheetNames.SheetName.TEST_METHOD_REPORT_SHEET);4System.out.println(sheetName);5String sheetName = ReportSheetNames.getSheetName(ReportSheetNames.SheetName.TEST_METHOD_REPORT_SHEET);6System.out.println(sheetName);7String sheetName = ReportSheetNames.getSheetName(ReportSheetNames.SheetName.TEST_METHOD_REPORT_SHEET);8System.out.println(sheetName);9String sheetName = ReportSheetNames.getSheetName(ReportSheetNames.SheetName.TEST_METHOD_REPORT_SHEET);10System.out.println(sheetName);11String sheetName = ReportSheetNames.getSheetName(ReportSheetNames.SheetName.TEST_METHOD_REPORT_SHEET);12System.out.println(sheetName);13String sheetName = ReportSheetNames.getSheetName(ReportSheetNames.SheetName.TEST_METHOD_REPORT_SHEET);14System.out.println(sheetName);15String sheetName = ReportSheetNames.getSheetName(ReportSheetNames.SheetName.TEST_METHOD_REPORT_SHEET);

Full Screen

Full Screen

getName

Using AI Code Generation

copy

Full Screen

1String sheetName = ReportSheetNames.getName(ReportSheetNames.ReportSheetNamesEnum.BYTESTESTSHEET);2System.out.println(sheetName);3Sheet sheet = ExcelReportHelper.getSheet(ReportSheetNames.ReportSheetNamesEnum.BYTESTESTSHEET);4System.out.println(sheet.getSheetName());5Workbook workbook = ExcelReportHelper.getWorkbook();6System.out.println(workbook.getSheetName(0));7File file = ExcelReportHelper.getExcelReport();8System.out.println(file.getName());9File file = ExcelReportHelper.getExcelReportFile();10System.out.println(file.getName());11String path = ExcelReportHelper.getExcelReportPath();12System.out.println(path);13String folder = ExcelReportHelper.getExcelReportFolder();14System.out.println(folder);

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run SeLion automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in ReportSheetNames

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful