'Extent Reports won't provide the report for me
I'm trying to provide a report for a simple QA Method but the code wont generate any report for me, please help!
namespace CasinoClubTests
{
[TestFixture]
public class CasinoTests
{
public ExtentReports extent;
public ExtentTest test;
[OneTimeSetUp]
public void StartReport()
{
extent = new ExtentReports();
var htmlReporter = new ExtentHtmlReporter("ReportLogin.html");
extent.AttachReporter(htmlReporter);
}
[Test]
public void OpenWebsite()
{
IWebDriver driver = null;
try
{
test = extent.CreateTest("OpenWebsite").Info("Test Started");
driver = new ChromeDriver();
driver.Url = "https://www.casinoclub.com";
driver.Manage().Window.Maximize();
test.Log(Status.Info, "Chrome Browser Start");
test.Log(Status.Info, "Chrome Browser Closed");
driver.Quit();
test.Log(Status.Pass, "Testing is done!");
}
catch (Exception e)
{
throw;
}
}
[OneTimeTearDown]
public void EndReport()
{
extent.Flush();
}
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|