Hot answers tagged

1

Assuming that the process should move to [Teardown] annotation. Then you should not use the try-catch inside the test annotations because Test annotations provide test results based on the Exception so try by removing try-catch blocks Reference: https://stackoverflow.com/a/111270/10858089


1

First, I've never used Extent Reports, but a quick review indicates that this is a reporting tool that will be useful for sharing test result data. When reading your description, I was confused why this was the starting point. Your test automation shouldn't be dependent on or controlled by a reporting library, as you may change this to another library later. ...


1

I have created an example on the basis of your code, please note that here i'm using the Extent Report Version 3 so change your code accordingly. I hope this code help you- public class Report { static ExtentTest logger; static ExtentReports extent; static ExtentHtmlReporter reporter; @BeforeClass public void startreport() { ...


1

Missed to pass extenttest in the constructor. update it and code worked. public Login(WebDriver driver, ExtentTest test){ Login.driver = driver; this.test=test; }


1

In your extent reporter class, specify the code as: ExtentReports extent = new ExtentReports("Specify the file path here where your extent reports should reside",false); Parameter False - Is used to append the reports of previous run testcase along with newly run testcase. Parameter True- Deletes the history of reports of previous run testcases and shows ...


1

you can use the below code. just pass 'false' as parameter this will not replace your previous report with new one and in the end you will get the merged report for all the scripts public ExtentReports(String filePath, Boolean replaceExisting) { this(filePath, replaceExisting, null, null, null); } public ExtentReports extent= new ExtentReports(...


Only top voted, non community-wiki answers of a minimum length are eligible