Skip to content

.NET Log manager for Selenium based tests and projects

License

Notifications You must be signed in to change notification settings

igorquintaes/SReport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SReport

SReport is a log manager for Selenium based tests and projects

How to use

Call SReportBuilder to generate a log Report file, based on what type of logs you want and the desired log folder. You should do it only one time:

SReport logReport = SReportBuilder.Setup(yourIWebDriver, desiredLogFolder)
                .AddAllLogs()
                .Build();

After that, you just can call the method Log whenever you want to genetare a log based on test or a context. Generally it is called on tests TearDown, after each text execution if failed.

logReport.Log("your test name / context name");

Customizations

If you are not looking fo all logs, just a screenshoot or browser console info, you can filter them after the Setup method, calling from the SReportBuilder. As Example:

// AddLog method cascate
SReport logReport = SReportBuilder.Setup(yourIWebDriver, desiredLogFolder)
                .AddLog(SLog.Screenshoot)
                .AddLog(SLog.BrowserConsole)
                .AddLog(SLog.PageHtml)
                .Build();
				
// Only one AddLog call
SReport logReport = SReportBuilder.Setup(yourIWebDriver, desiredLogFolder)
                .AddLog(SLog.Screenshoot, SLog.BrowserConsole, SLog.PageHtml)
                .Build();

Logs explanation

  • Screenshoot: Take a Screenshoot based in the Browser View, and saves it as .png file.

  • Browser Console: Saves a text file containing browser console content.

  • Page Html: Create a .htm file with the real state of the page. It can be also manipulated in a browser DevTools to be easy to correct errors based on element queries.

  • WebDriver Instance: Log Based on Selenium Web Driver Instance report.

  • Selenium Client: Log Based on Selenium Server report.

  • Profiling: Log Based on Selenium Profile report.

  • Profiling: Log Based on Selenium Server Messages report.

About

.NET Log manager for Selenium based tests and projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages