SparkReporter

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);

view sample


Configuration

You can apply custom configuration to each reporter using XML, JSON or C#.

C#

var spark = new ExtentSparkReporter("Spark.html");
spark.Config.Theme = Theme.Dark;
spark.Config.DocumentTitle = "MyReport";

XML

View spark-config.xml

var spark = new ExtentSparkReporter("Spark.html");
spark.LoadXMLConfig("config/spark-config.xml");

JSON

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:

View spark-config.json

var spark = new ExtentSparkReporter("Spark.html");
spark.LoadJSONConfig("config/spark-config.json");

Anchors

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:

http://path/to/index.html#test-id=2

Shortcuts

Navigation

t - test
c - tag
d - dashboard
x - exception/bug

Filters

p - show passed tests
f - show failed tests
s - show skipped tests
w - show warning tests
esc - clear filters

Scroll

down-arrow - scroll down
up-arrow - scroll up

Misc

l - switch theme