Created
June 14, 2024 14:32
-
-
Save SarahElson/d2026b71440f3522c597ad81ec67fb84 to your computer and use it in GitHub Desktop.
How To Generate Extent Reports In Selenium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package LocalGrid; | |
import org.testng.Assert; | |
import org.testng.SkipException; | |
import org.testng.annotations.Test; | |
public class TestExtentReportBasic extends BaseTest{ | |
@Test | |
public void testPassed() { | |
extentTest = extentReports.createTest("Test Case 1", "This test case has passed"); | |
Assert.assertTrue(true); | |
} | |
@Test | |
public void testFailed() { | |
extentTest = extentReports.createTest("Test Case 2", "This test case has failed"); | |
Assert.assertTrue(false); | |
} | |
@Test | |
public void testSkipped() { | |
extentTest = extentReports.createTest("Test Case 3", "This test case has been skipped"); | |
throw new SkipException("The test has been skipped"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment