Class ExtentTest

java.lang.Object
com.aventstack.extentreports.ExtentTest
All Implemented Interfaces:
RunResult, Serializable

public class ExtentTest extends Object implements RunResult, Serializable
Defines a test. You can add logs, snapshots, assign author and categories to a test and its children.

The below log types will all be logged with Status.PASS:

 test.log(Status.PASS, "details");
 test.pass("details");
 test.pass(MarkupHelper.createCodeBlock(code));
 

A few notes:

  • Tests started with the createTest method are parent-level, always level 0
  • Tests started with the createNode method are children, always level 1 and greater
See Also: