Complete the code to create an ExtentReports object.
ExtentReports extent = new ExtentReports(); extent.attachReporter(new [1]("Extent.html"));
The ExtentHtmlReporter is used to create an HTML report and attach it to the ExtentReports object.
Complete the code to create a test entry in the Extent report.
ExtentTest test = extent.[1]("Login Test");
The createTest method is used to create a new test entry in ExtentReports.
Fix the error in the code to log a pass status in the test report.
test.log(Status.[1], "Login successful");
The PASS status logs a successful test step in ExtentReports.
Fill both blanks to configure the report file path and attach the reporter.
ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter([1]); extent.[2](htmlReporter);
The file path must be a string like "test-output/extent.html". The method to attach the reporter is attachReporter.
Fill all three blanks to create a test, log a fail status, and flush the report.
ExtentTest test = extent.[1]("Checkout Test"); test.log(Status.[2], "Checkout failed due to error"); extent.[3]();
Use createTest to create the test, FAIL to log failure, and flush to write the report to file.