STEP 15
Prerequisite : Selenium WebDriver Framework creation steps from STEP 1 to STEP 14 should endure Implemented every bit described In previous posts.
We accept Implemented software exam information skip business office In STEP 14. Now allow nosotros larn ahead 1 to a greater extent than stride In selenium testing information driven framework creation. If you lot know, We accept a "Pass/Fail/Skip" column In our excel information
sheets. That column Is reserved to written report the software exam information execution results similar "PASS", "FAIL" or "SKIP". If you lot aspect at our exam cases, We accept non Introduced webdriver In our software exam suites but nosotros volition Implement It real soon.Read to a greater extent than tutorials on selenium WebDriver @Tutorials Part 1 as well as @Tutorials Part 2.
How To Report Test Data Execution Result In Excels
Same every bit reporting suite execution condition every bit described In STEP 12, We volition use "WriteResultUtility" business office of SuiteUtility shape In our exam cases to written report exam information execution results In excel sheets. We volition laid flag "Testskip" = "True" In our software exam cases (In @Test method) If exam information has to skip. Same way, nosotros volition laid "Testfail" = "True" If actual as well as expected values non match. And as well as hence nosotros volition practise novel method using testng's @AfterMethod notation In all software exam cases to written report the exam information laid execution results on terminate of every exam information laid execution. "Testskip" as well as "Testfail" flags volition endure used In @AfterMethod method to write the results In excel sheets.
Download Updated Test Cases as well as Excel Files
I accept updated all iv exam cases files to written report software exam execution results In related information excel sheet. I accept Implemented logic of Summation, Subtraction, Multiplication as well as Division of exam information In software exam cases to larn actual result. Also updated few expected upshot information Intentionally incorrect In exam cases information sheets to written report exam information every bit "FAIL". Download bellow given goose egg folder to larn all the files.
Extract the folder as well as copy-paste folder's files In "WDDF" projection In Eclipse to supersede existing files every bit described bellow. (Note : It should supersede existing file when glue It on package. It should non Insert novel file.)
- 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 Data Result
Now nosotros are all laid to run our exam suites to verify that our exam information upshot reporting business office Is working fine or not.
Note : Close all excel files earlier running your exam suite. Otherwise you lot volition larn an mistake during your exam suite execution.Now Run your exam suites from testng.xml file. On completion of exam execution, Open SuiteOne.xls and SuiteTwo.xls files from com.stta.ExcelFiles Package. You volition come across that all the information laid line's "Pass/Fail/Skip" column Is updated alongside "PASS" or "FAIL" or "SKIP" every bit shown In bellow given Image.
- If upshot Is "PASS" : Means expected as well as actual values are match.
- If upshot Is "FAIL" : Means expected as well as actual values are non match.
- If upshot Is "SKIP" : Means "DataToRun" flag Is laid to "n" hence that exam information laid execution has been skipped.
If you lot come across In inwards a higher house Image, iv exam information line's has been reported every bit "SKIP" because their "DataToRun" flag Is laid to "n". three exam information lines has been reported every bit "PASS" because their expected as well as actual upshot has been fit during exam execution. 1 information business has been reported every bit "FAIL" because Its expected as well as actual result do non match.
So nosotros accept successfully Implemented information laid upshot reporting business office In our selenium software automation framework which Is driven past times external information canvas data.