Selenium WebDriver Framework : Reporting Test Failure In TestNG Report

In selenium webdriver automated information driven framework creation process, We accept Implemented sum xv steps till straightaway together with nosotros accept successfully achieved our destination of reporting software application's evidence information results In excel sheets In step 15. We are going real slow to gain information driven framework for your ameliorate understanding.

STEP 16
Prerequisite : Selenium webdriver software testing tool's information driven framework creation STEP 1 to STEP xv should live on Implemented every bit listed on THIS PAGE.

In this step, We volition Implement functionality to study failure of software evidence data, evidence instance together with evidence suite In testng reports.

How To Report Failure In TestNG Report?
We tin utilisation assertions of testng to study failure In testng Reports. Testng has ii assertion methods. 1st Is hard assertion together with sec Is soft assertion method. You volition detect the links for both types of assertion methods amongst examples on THIS PAGE. We tin utilisation whatever of them In our selenium webdriver testing framework 

If yous volition utilisation hard assertion to study results, Your evidence volition live on aborted on assertion failure. If yous volition utilisation soft assertion, Your evidence execution volition stay proceed fifty-fifty If your evidence fails. You tin utilisation whatever i of them or both of them In your software evidence cases every bit per your requirement.We volition utilisation soft assertion In our information driven framework to study the results In testNG reports.

Updating Test Cases To Report Results In TestNG
We involve to update all our iv evidence cases to study results In testng reports. For that, First of all nosotros volition gain object of testng SoftAssert course of study In our evidence cases together with and thence nosotros volition utilisation It every bit a assertion when e'er required. At concluding of evidence case, We volition utilisation assertAll() method of SoftAssert course of study Inside If status to study the result.

Download Updated Test Cases
I accept updated all software evidence cases amongst soft assertion Implementation to study the results In testng report. Excel files should live on same every bit STEP 15. Download bellow given folder to larn updated software evidence cases files.


Extract the downloaded naught folder together with copy-paste 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.
Run Test Suites To Report Result In TestNG Reports
Now nosotros are gain to run our information driven framework project's evidence suites to verify that evidence failure Is reported In TestNG reports or not.
Note : Close all excel files earlier running your evidence suite. Otherwise yous volition larn an mistake during your evidence suite execution.

Run your evidence suites from testng.xml file. On completion of execution, View testng report. It volition looks every bit shown In bellow given Image.


As yous tin encounter In higher upward Image, SuiteOne, SuiteOneCaseOne together with evidence information business Is reported every bit neglect because expected together with actual results are non matching. This means yous tin study failure In your testng reports using soft assertions.


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