WizardOfQA / Selenium_UI_Automation_Logging-Reporting-Step3

This is the third step of Selenium Automation Framework with Logging and Reporting functionalities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Selenium_UI_Automation_Logging_Reporting (Extent Reports + Log4Net)

Description:

On the top of Selenium UI Test Automation Framework with POM, we are ready to add log and report functionalities to our framework. Log and report give us very valuable information for debugging. Extent Report fulfill both functionalities. Log can be written in multiple levels and it creates a beautiful HTML report. When the tests are failed, a user can not only log them but also tak snapshots, so these will act as fingerprints in the framework. Html reports are interactive. Since I don't control nor maintain these websites, some tests might be broken as these webistes are being updated. But as of 4/16/2018, every test in this framework works fine!!!
This is the third part of the entire series of Selenium UI Test Automation.

Roadmap for Selenium UI Test Automation Series:

1> Selenium_UI_Automation Without POM - Manily Focus on Selenium API Functionalities
2> Selenium_UI_Automation With POM - The Structure and Creating of POM
3> Selenium_UI_Automation With Logging and Reporting Functionalities.(Extent Report) - How to Logging and Reporting using Extent Reports in a Selenium framework
4> Selenium_UI_Automation With Behavior Driven Development(BDD) Using Specflow - How to implment BDD to the framework using Specflow.

I might add more series as needed to showcase UI Automation with Selenium.

Extent Reports

Some Advantages of Using Extent Reports

  • Responsive and beautiful UI
  • Easy to read PIE chart.
  • Provides dashboard for the whole test
  • Multiple levels of logging functionality
  • Screenshots can also be inserted to the report
  • Host Name, OS, Author Name, Environment can be added.

Log4Net

  • Log4Net is one of the most popular and reliable logging software.
  • There are many appender classes that are the output destination for your log messages.
  • In our framework, I am using RollingLogfileAppender
  • This is configured in log4net.configuration file. With our current configuration, the name of the file is "Orbitz.log", the file can grow up to 10MB. Once it reaches the 10MB, it creates another log file.
  • We specify which appender will be used in tag.

Please note that we are loggging usinb both Extent Report and Log4Net, which are not usual. In a real life, you may want to use one of them. However, I am using both for "Demonstration" purpose.

Sameple Test Cases Covered:

Orbitz.com

  • User_Can_Search_Vacation_Rental
  • User_Can_Search_Rental_Car_With_Advanced_Options
  • Test_To_Be_Failed Please Note that this test case is failed intentionally to show the functionality of Extent Report Your Reports are available at C:/Orbitz_TestReport and your screenshots can be found in C:\ScreenShot

image

Extent Report

newreport1

newreport2

newreport3

Log4Net

rollingappendersetup

logcapture

About

This is the third step of Selenium Automation Framework with Logging and Reporting functionalities


Languages

Language:C# 100.0%