ExtentSparkReporter is a rich-HTML reporter available from the standard ExtentReports library. This section outlines a few unique features present.
var extent = new ExtentReports(); var spark = new ExtentSparkReporter("Spark.html"); extent.AttachReporter(spark);
You can apply custom configuration to each reporter using XML, JSON or C#.
var spark = new ExtentSparkReporter("Spark.html"); spark.Config.Theme = Theme.Dark; spark.Config.DocumentTitle = "MyReport";
var spark = new ExtentSparkReporter("Spark.html"); spark.LoadXMLConfig("config/spark-config.xml");
Version 4 and earlier had the ability to consume configuration-XML files, a functionality that remained unchanged in v5.0. External configuration can now be loaded via JSON also, as demonstrated below:
var spark = new ExtentSparkReporter("Spark.html"); spark.LoadJSONConfig("config/spark-config.json");
Test anchors can be used to quickly navigate to any given test from a uri component. An anchor will be generated for each test by default and will appear to the right of the test's timestamp.
To navigate to the test using the anchor, simply add the uri component at the end of the report path:
t - test c - tag d - dashboard x - exception/bug
p - show passed tests f - show failed tests s - show skipped tests w - show warning tests esc - clear filters
down-arrow - scroll down up-arrow - scroll up
l - switch theme