-
Notifications
You must be signed in to change notification settings - Fork 132
ExtentSparkReporter
ExtentSparkReporter is a rich-HTML reporter available from the standard ExtentReports library. This section outlines a few unique features present.
You can apply custom configuration to each reporter using XML, JSON or Java.
spark.config(
ExtentSparkReporterConfig.builder()
.theme(Theme.DARK)
.documentTitle("MyReport")
.build()
);
// or:
ExtentSparkReporter spark = new ExtentSparkReporter("spark.html");
spark.config().setTheme(Theme.DARK);
spark.config().setDocumentTitle("MyReport");
final File CONF = new File("config/spark-config.xml");
ExtentSparkReporter spark = new ExtentSparkReporter("target/spark/spark.html");
spark.loadXMLConfig(CONF);
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:
final File CONF = new File("config/spark-config.json");
ExtentSparkReporter spark = new ExtentSparkReporter("target/spark/spark.html");
spark.loadJSONConfig(CONF);
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
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
Copyright (c) 2020 ExtentReports - Licensed under Apache-2.0