Selenium Automation Framework : Reporting Test Cases Results In Excel

Data driven software testing framework for selenium webdriver should hold upward able to study the software examine suite results In excel files. We bring achieved destination of reporting examine failure In testng reports In STEP 16. Now allow us effort to hand our adjacent destination of reporting software examine cases's results In excel files.

STEP 17
Prerequisite : All the previous xvi steps of information driven framework creation should hold upward Implemented. You volition honor the links for all previous steps on THIS PAGE.

How To Report Test Suite Pass
If you lot know, We are checking "CaseToRun" at showtime of every software examine cases Inside @BeforeTest tone method. So If nosotros volition honor "CaseToRun" = "N" for specific examine instance hence nosotros volition study It equally "SKIP" In excel canvas Immediately.

We tin give the axe educate whatsoever examine instance equally "FAIL" when whatsoever software examine information educate of that examine instance Is  "FAIL". We volition educate i flag on examine information educate failure in addition to hence exercise that flag Inside novel created @AfterTest method to study that examine instance equally "FAIL". If examine instance Is non "SKIP" in addition to non "FAIL" hence nosotros volition visit It equally a "PASS" to study In excel sheet.

Download Updated Test Cases in addition to Excel Files
I bring updated all examine cases in addition to excel files equally per requirement for testing purpose. You volition teach all of them past times downloading bellow given zilch folder.
Extract the downloaded folder in addition to copy-paste files on "WDDF" project's packages equally described bellow.
  • Paste SuiteOneCaseOne.java File on com.stta.SuiteOne Package.
  • Paste SuiteOneCaseTwo.java File on com.stta.SuiteOne Package.
  • Paste SuiteTwoCaseOne.java File on com.stta.SuiteTwo Package.
  • Paste SuiteTwoCaseTwo.java File on com.stta.SuiteTwo Package.
  • Paste SuiteOne.xls File on com.stta.ExcelFiles Package.
  • Paste SuiteTwo.xls File on com.stta.ExcelFiles Package.
Run Test Suites To Report Test Suites Result In Excel
Now you lot tin give the axe run your examine suites to verify that examine cases results are beingness updated properly or non In both examine suite's excel files which are located Inside com.stta.ExcelFiles Package.

Run your examine suites through testng.xml file. On completion of examine execution, opened upward the "SuiteOne.xls" in addition to "SuiteTwo.xls" files in addition to verify results In "TestCasesList" sheets. You volition run across results for all 4 software examine cases equally shown In bellow given Image.


In excel files,
  • SuiteOneCaseOne examine instance Is reported equally "FAIL" because i of the examine information Is "FAIL" for that examine case.
  • SuiteTwoCaseOne test instance Is reported equally "SKIP" because "CaseToRun" flag Is "N" for this examine instance hence examine execution has been skipped.
  • SuiteOneCaseTwo and SuiteTwoCaseTwo test cases are reported equally "PASS" because for both the examine cases, One information describe of piece of job Is "SKIP" but other Is "PASS". So nosotros volition study It equally "PASS".
  • SuiteTwoCaseOne test instance Is Skipped from execution hence examine information educate results In "SuiteTwoCaseOne" canvas volition hold upward non reported.
We bring achieved our destination of reporting software examine cases condition In excel sheets In this step.

So at i time nosotros are able to read examine suite, examine cases in addition to examine information from excel files in addition to likewise nosotros are able to study the condition according to the results of unlike examine cases, examine information in addition to examine suites.



More interesting articles here :Generation Enggelmundus Internet Marketing Tool here :Zeageat IM http://www.software-testing-tutorials-automation.com/
Post a Comment (0)
Previous Post Next Post