Bird
Raised Fist0
Selenium Javatesting~15 mins

Extent report customization in Selenium Java - Deep Dive

Choose your learning style10 modes available
Overview - Extent report customization
What is it?
Extent report customization means changing how the test report looks and what information it shows. It helps testers create reports that are easier to read and understand. You can add colors, logos, and extra details about tests. This makes it simple to see which tests passed or failed and why.
Why it matters
Without customizing reports, test results can be hard to read and understand quickly. This slows down fixing problems and sharing results with others. Custom reports help teams spot issues faster and communicate clearly. They make testing more effective and save time in real projects.
Where it fits
Before learning this, you should know how to write basic Selenium tests and generate simple Extent reports. After this, you can learn advanced reporting tools or integrate reports with continuous integration systems like Jenkins.
Mental Model
Core Idea
Customizing Extent reports tailors test results presentation to make test outcomes clearer and more useful for everyone.
Think of it like...
It's like decorating a photo album: you choose the cover, add captions, and arrange photos so your story is easy and fun to follow.
┌─────────────────────────────┐
│       Extent Report         │
├─────────────┬───────────────┤
│ Raw Test    │ Customization │
│ Results     │ Options       │
│ (Pass/Fail) │ - Colors      │
│             │ - Logos       │
│             │ - Extra Info  │
└─────────────┴───────────────┘
Build-Up - 7 Steps
1
FoundationBasics of Extent Reports Setup
🤔
Concept: Learn how to create a simple Extent report in Selenium with Java.
To start, add ExtentReports library to your project. Then create an ExtentReports object and an ExtentTest object for each test. Log test steps and results. Finally, flush the report to write it to a file. Example: ExtentReports extent = new ExtentReports(); ExtentTest test = extent.createTest("My Test"); test.pass("Step passed"); extent.flush();
Result
A basic HTML report file is created showing test names and pass/fail status.
Understanding the basic setup is essential before adding any customization.
2
FoundationUnderstanding Report Structure
🤔
Concept: Know the parts of an Extent report you can customize: title, theme, system info, and test logs.
An Extent report has a header (title and logo), a summary (pass/fail counts), system info (environment details), and detailed test logs. Each part can be changed to fit your needs.
Result
You can identify where to apply changes to make reports clearer and more informative.
Knowing the report's anatomy helps target your customization effectively.
3
IntermediateChanging Report Title and Theme
🤔Before reading on: do you think changing the report title requires editing the HTML file manually or can it be done via code? Commit to your answer.
Concept: Learn how to set a custom report title and choose a theme (dark or standard) programmatically.
Use ExtentSparkReporter to set the report file path, then call methods to set the document title and theme. Example: ExtentSparkReporter spark = new ExtentSparkReporter("report.html"); spark.config().setDocumentTitle("My Test Report"); spark.config().setTheme(Theme.DARK); ExtentReports extent = new ExtentReports(); extent.attachReporter(spark);
Result
The generated report shows the new title and uses the dark color theme.
Knowing you can customize appearance via code saves time and avoids manual edits.
4
IntermediateAdding System and Environment Info
🤔Before reading on: do you think system info is added automatically or must be set explicitly in code? Commit to your answer.
Concept: Add details like OS, browser, and tester name to the report for better context.
Use extent.setSystemInfo(key, value) to add environment details. Example: extent.setSystemInfo("OS", "Windows 10"); extent.setSystemInfo("Browser", "Chrome 114"); extent.setSystemInfo("Tester", "Alice");
Result
The report displays these details in a dedicated section, helping readers understand test conditions.
Explicitly adding system info makes reports more useful for debugging and audits.
5
IntermediateEmbedding Screenshots in Reports
🤔Before reading on: do you think screenshots are added automatically on failure or require manual code? Commit to your answer.
Concept: Learn how to capture and attach screenshots to test steps in the report.
Capture screenshots using Selenium's TakesScreenshot interface. Save the image file and add it to the report with test.addScreenCaptureFromPath(path). Example: File src = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); String path = "screenshots/img.png"; FileUtils.copyFile(src, new File(path)); test.fail("Step failed", MediaEntityBuilder.createScreenCaptureFromPath(path).build());
Result
Failed test steps show screenshots in the report, making issues easier to understand.
Attaching screenshots visually explains failures, speeding up troubleshooting.
6
AdvancedCustomizing Logs and Categories
🤔Before reading on: do you think test categories and custom logs are set automatically or require explicit code? Commit to your answer.
Concept: Add categories (like 'Smoke' or 'Regression') and custom log messages to organize and clarify tests.
Use test.assignCategory("Smoke") to tag tests. Use test.log(Status.INFO, "message") to add detailed logs. Example: test.assignCategory("Regression"); test.log(Status.INFO, "Starting login test");
Result
Reports group tests by category and show detailed logs for each step.
Organizing tests by category helps filter and focus on relevant tests in large suites.
7
ExpertAdvanced Report Customization with CSS and JS
🤔Before reading on: do you think Extent reports allow injecting custom CSS/JS for styling and behavior? Commit to your answer.
Concept: Learn how to add your own CSS and JavaScript to Extent reports to change styles and add interactive features.
You can modify the ExtentSparkReporter configuration to include custom CSS or JS files by extending the reporter or post-processing the HTML file. This allows changing fonts, colors beyond themes, or adding dynamic filters. Example approach: After report generation, inject CSS styles or JS scripts into the HTML file to customize appearance and behavior.
Result
Reports can have unique branding, interactive filters, or animations beyond default options.
Knowing how to extend reports with CSS/JS unlocks full control over report presentation and user experience.
Under the Hood
ExtentReports works by collecting test logs and metadata during test execution. It stores this data in memory and then writes it to an HTML file using ExtentSparkReporter. The reporter uses templates and configuration settings to format the report with HTML, CSS, and JavaScript. Customization changes these templates or adds extra data before writing the file.
Why designed this way?
The design separates test logging from report generation to keep tests simple and flexible. Using HTML allows reports to be viewed in any browser without extra tools. The modular reporter design lets users customize appearance without changing core logic. This approach balances ease of use with powerful customization.
┌───────────────┐       ┌─────────────────────┐
│ Test Code     │       │ ExtentReports API   │
│ (Selenium)   ───────▶│ Collect Logs & Info  │
└───────────────┘       └─────────┬───────────┘
                                    │
                                    ▼
                         ┌─────────────────────┐
                         │ ExtentSparkReporter │
                         │ Format & Write HTML │
                         └─────────┬───────────┘
                                   │
                                   ▼
                          ┌───────────────────┐
                          │ Final HTML Report │
                          └───────────────────┘
Myth Busters - 4 Common Misconceptions
Quick: Do you think Extent reports automatically capture screenshots on test failure without extra code? Commit to yes or no.
Common Belief:Extent reports automatically capture and attach screenshots when a test fails.
Tap to reveal reality
Reality:You must write code to capture screenshots and attach them to the report manually.
Why it matters:Assuming automatic screenshots leads to missing visual evidence in reports, making debugging harder.
Quick: Do you think changing the report theme affects test results or only appearance? Commit to your answer.
Common Belief:Changing the report theme can affect how tests run or their results.
Tap to reveal reality
Reality:Themes only change the report's look; they do not affect test execution or outcomes.
Why it matters:Confusing appearance with test logic can cause wasted effort troubleshooting non-issues.
Quick: Do you think system info like OS and browser is added automatically to Extent reports? Commit yes or no.
Common Belief:System and environment info is automatically included in Extent reports without extra code.
Tap to reveal reality
Reality:You must explicitly add system info using setSystemInfo calls in your test code.
Why it matters:Missing environment details can cause confusion when tests behave differently on various setups.
Quick: Do you think you can fully customize Extent reports by only changing Java code without touching HTML or CSS? Commit your answer.
Common Belief:All report customization can be done purely through Java code APIs.
Tap to reveal reality
Reality:Some advanced customizations require editing or injecting CSS/JS into the generated HTML report.
Why it matters:Expecting full control via code alone limits report design and misses powerful customization options.
Expert Zone
1
Custom categories can be combined with test metadata to create dynamic filters in reports, improving navigation in large test suites.
2
Using ExtentReports in parallel test execution requires thread-safe handling of ExtentTest objects to avoid log mix-ups.
3
Post-processing the generated HTML report with scripts allows adding features like auto-refresh or custom analytics not supported natively.
When NOT to use
Extent report customization is less suitable when tests run in highly restricted environments without file system access or when real-time reporting is needed. In such cases, consider using cloud-based reporting tools or continuous integration dashboards that update live.
Production Patterns
In real projects, teams integrate Extent reports with Jenkins pipelines to archive reports and send email notifications. They use custom themes and logos for branding and attach screenshots on failures. Categories help run subsets of tests like smoke or regression. Advanced users inject JavaScript to add interactive filters and export options.
Connections
Continuous Integration (CI) Pipelines
Builds-on
Knowing how to customize Extent reports helps integrate clear test results into CI pipelines, improving automated quality feedback.
User Interface (UI) Design
Similar pattern
Customizing report themes and layouts shares principles with UI design, like color contrast and information hierarchy, enhancing report readability.
Data Visualization
Builds-on
Understanding how to present test data visually in reports connects to data visualization concepts, helping communicate complex results simply.
Common Pitfalls
#1Assuming screenshots attach automatically on failure.
Wrong approach:test.fail("Test failed");
Correct approach:test.fail("Test failed", MediaEntityBuilder.createScreenCaptureFromPath("path/to/screenshot.png").build());
Root cause:Misunderstanding that screenshot capture and attachment require explicit code.
#2Setting report title by editing the HTML file after generation.
Wrong approach:Manually opening report.html and changing tag in a text editor.</span></div><div class="dlm-pitfall-right"><span class="dlm-pitfall-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Correct approach:</span><span>spark.config().setDocumentTitle("Custom Title");</span></div><div class="dlm-pitfall-root"><span class="dlm-pitfall-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#3B82F6"><path d="M400-320q100 0 170-70t70-170q0-100-70-170t-170-70q-100 0-170 70t-70 170q0 100 70 170t170 70Zm-28.5-131.5Q360-463 360-480v-200q0-17 11.5-28.5T400-720q17 0 28.5 11.5T440-680v200q0 17-11.5 28.5T400-440q-17 0-28.5-11.5Zm-140 0Q220-463 220-480v-120q0-17 11.5-28.5T260-640q17 0 28.5 11.5T300-600v120q0 17-11.5 28.5T260-440q-17 0-28.5-11.5Zm280 0Q500-463 500-480v-80q0-17 11.5-28.5T540-600q17 0 28.5 11.5T580-560v80q0 17-11.5 28.5T540-440q-17 0-28.5-11.5ZM400-240q-134 0-227-93T80-560q0-134 93-227t227-93q134 0 227 93t93 227q0 56-17.5 106T653-363l199 199q11 11 11 28t-11 28q-11 11-28 11t-28-11L597-307q-41 32-91 49.5T400-240Z"></path></svg></span>Root cause:</span><span>Not knowing ExtentSparkReporter provides API for title customization.</span></div></div></div><div class="dlm-pitfall-item"><div class="dlm-pitfall-header"><span class="dlm-pitfall-number">#<!-- -->3</span><span class="dlm-pitfall-title">Not calling extent.flush() at the end of tests.</span></div><div class="dlm-pitfall-body"><div class="dlm-pitfall-wrong"><span class="dlm-pitfall-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#EF4444"><path d="m480-433.33 124.67 124.66Q614.33-299 628-299q13.67 0 23.33-9.67Q661-318.33 661-332q0-13.67-9.67-23.33L526.67-480l124.66-124.67Q661-614.33 661-628q0-13.67-9.67-23.33Q641.67-661 628-661q-13.67 0-23.33 9.67L480-526.67 355.33-651.33Q345.67-661 332-661q-13.67 0-23.33 9.67Q299-641.67 299-628q0 13.67 9.67 23.33L433.33-480 308.67-355.33Q299-345.67 299-332q0 13.67 9.67 23.33Q318.33-299 332-299q13.67 0 23.33-9.67L480-433.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Wrong approach:</span><span>Creating tests and logging but forgetting extent.flush();</span></div><div class="dlm-pitfall-right"><span class="dlm-pitfall-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Correct approach:</span><span>Calling extent.flush(); after all tests to write the report file.</span></div><div class="dlm-pitfall-root"><span class="dlm-pitfall-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#3B82F6"><path d="M400-320q100 0 170-70t70-170q0-100-70-170t-170-70q-100 0-170 70t-70 170q0 100 70 170t170 70Zm-28.5-131.5Q360-463 360-480v-200q0-17 11.5-28.5T400-720q17 0 28.5 11.5T440-680v200q0 17-11.5 28.5T400-440q-17 0-28.5-11.5Zm-140 0Q220-463 220-480v-120q0-17 11.5-28.5T260-640q17 0 28.5 11.5T300-600v120q0 17-11.5 28.5T260-440q-17 0-28.5-11.5Zm280 0Q500-463 500-480v-80q0-17 11.5-28.5T540-600q17 0 28.5 11.5T580-560v80q0 17-11.5 28.5T540-440q-17 0-28.5-11.5ZM400-240q-134 0-227-93T80-560q0-134 93-227t227-93q134 0 227 93t93 227q0 56-17.5 106T653-363l199 199q11 11 11 28t-11 28q-11 11-28 11t-28-11L597-307q-41 32-91 49.5T400-240Z"></path></svg></span>Root cause:</span><span>Missing the step that finalizes and saves the report.</span></div></div></div></div></div></article><article class="content-card dlm-card"><div class="code-articles-card-header"><span class="card-icon summary"><span class="new-material-symbols icon-hw-24"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="M186.67-120q-27.5 0-47.09-19.58Q120-159.17 120-186.67v-586.66q0-27.5 19.58-47.09Q159.17-840 186.67-840h192.66q7.67-35.33 35.84-57.67Q443.33-920 480-920t64.83 22.33Q573-875.33 580.67-840h192.66q27.5 0 47.09 19.58Q840-800.83 840-773.33v586.66q0 27.5-19.58 47.09Q800.83-120 773.33-120H186.67Zm0-66.67h586.66v-586.66H186.67v586.66ZM313.33-280H522q14.17 0 23.75-9.62 9.58-9.61 9.58-23.83 0-14.22-9.58-23.72-9.58-9.5-23.75-9.5H313.33q-14.16 0-23.75 9.62-9.58 9.62-9.58 23.83 0 14.22 9.58 23.72 9.59 9.5 23.75 9.5Zm0-166.67h333.34q14.16 0 23.75-9.61 9.58-9.62 9.58-23.84 0-14.21-9.58-23.71-9.59-9.5-23.75-9.5H313.33q-14.16 0-23.75 9.61-9.58 9.62-9.58 23.84 0 14.21 9.58 23.71 9.59 9.5 23.75 9.5Zm0-166.66h333.34q14.16 0 23.75-9.62 9.58-9.62 9.58-23.83 0-14.22-9.58-23.72-9.59-9.5-23.75-9.5H313.33q-14.16 0-23.75 9.62-9.58 9.61-9.58 23.83 0 14.22 9.58 23.72 9.59 9.5 23.75 9.5ZM503.5-804.5q9.83-9.83 9.83-23.5t-9.83-23.5q-9.83-9.83-23.5-9.83t-23.5 9.83q-9.83 9.83-9.83 23.5t9.83 23.5q9.83 9.83 23.5 9.83t23.5-9.83ZM186.67-186.67v-586.66 586.66Z"></path></svg></span></span><span class="codefly-card-title">Key Takeaways</span></div><div class="code-articles-card-body"><div class="summary-list"><div class="summary-item"><span class="new-material-symbols icon-hw-26"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span><span class="summary-text">Extent report customization makes test results clearer and easier to understand for all stakeholders.</span></div><div class="summary-item"><span class="new-material-symbols icon-hw-26"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span><span class="summary-text">You can change report titles, themes, add system info, categories, and screenshots through simple Java APIs.</span></div><div class="summary-item"><span class="new-material-symbols icon-hw-26"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span><span class="summary-text">Advanced customization may require injecting CSS or JavaScript into the generated HTML report.</span></div><div class="summary-item"><span class="new-material-symbols icon-hw-26"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span><span class="summary-text">Misunderstandings about automatic features like screenshots or system info can cause incomplete reports.</span></div><div class="summary-item"><span class="new-material-symbols icon-hw-26"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span><span class="summary-text">Integrating customized reports into CI pipelines and using categories improves test management in real projects.</span></div></div></div></article></div><div><article class="content-card" id="practice"><div class="code-articles-card-header justify-content-between"><div class="d-flex align-items-center" style="gap:12px"><span class="card-icon nofill intro"><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" class="blue-icon-color site-fs-20" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path><path d="M12 7a5 5 0 1 0 5 5"></path><path d="M13 3.055a9 9 0 1 0 7.941 7.945"></path><path d="M15 6v3h3l3 -3h-3v-3z"></path><path d="M15 9l-3 3"></path></svg></span><h2 class="codefly-card-title mb-0 pb-0">Practice</h2></div><span class="site-fs-15">(<!-- -->1<!-- -->/<!-- -->5<!-- -->)</span></div><div class="code-articles-card-body" data-theme="light"><div class=""><div class="mb-4"><div class="practice-content"><div class="text-pre-wrap dbd-txt-theme-intense pb-3">1<!-- -->. <!-- -->What is the main purpose of customizing an Extent report in Selenium Java?</div></div><div class="question-pills-container " style="padding-top:unset"><span class="level-badge">easy</span></div></div><div class=""><div class="practice-options"><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>A<!-- -->. <!-- -->To make test results clearer and easier to understand</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>B<!-- -->. <!-- -->To increase the speed of test execution</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>C<!-- -->. <!-- -->To reduce the size of the test scripts</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>D<!-- -->. <!-- -->To automatically fix test failures</span></div></div><div class="py-3"><button class="site-btn" style="width:200px" disabled="">Verify</button></div></div><div class="py-2 d-none"><div class="practice-helper-btns-wrapper"></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-solution-box"><h4 class="helper-solution-box-title">Solution</h4><div class="practice-helper-body"><ol><li><h4>Step 1: Understand Extent report role</h4>Extent reports show test results in a readable format.</li><li><h4>Step 2: Identify customization benefits</h4>Customization helps make these results clearer and more useful.</li><li><h4>Final Answer:</h4><strong>To make test results clearer and easier to understand</strong> -> Option A</li><li><h4>Quick Check:</h4>Customization = clearer test results [OK]</li></ol></div></div></div></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-hint-box"><div class="practice-helper-body"><strong class="helper-hint-box-title">Hint: </strong>Think: Why improve report look? To understand results better [OK]</div></div></div></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-mistakes-box"><div class="practice-helper-body"><strong class="helper-mistakes-box-title">Common Mistakes: </strong><ul class="ph-mistakes-list"><li class="ph-mistake-item mb-0">Confusing report customization with test speed</li><li class="ph-mistake-item mb-0">Thinking customization changes test logic</li><li class="ph-mistake-item mb-0">Assuming customization fixes test errors</li></ul></div></div></div></div></div></div><div class="d-none"><div class="mb-4"><div class="practice-content"><div class="text-pre-wrap dbd-txt-theme-intense pb-3">2<!-- -->. <!-- -->Which code snippet correctly sets the theme of an Extent report to DARK in Selenium Java?</div></div><div class="question-pills-container " style="padding-top:unset"><span class="level-badge">easy</span></div></div><div class=""><div class="practice-options"><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>A<!-- -->. <!-- -->extentHtmlReporter.config().setTheme(Theme.DARK);</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>B<!-- -->. <!-- -->extentHtmlReporter.setTheme("dark");</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>C<!-- -->. <!-- -->extentHtmlReporter.config().theme = "dark";</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>D<!-- -->. <!-- -->extentHtmlReporter.setConfigTheme(Theme.DARK);</span></div></div><div class="py-3"><button class="site-btn" style="width:200px" disabled="">Verify</button></div></div><div class="py-2 d-none"><div class="practice-helper-btns-wrapper"></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-solution-box"><h4 class="helper-solution-box-title">Solution</h4><div class="practice-helper-body"><ol><li><h4>Step 1: Recall ExtentReports theme setting syntax</h4>Use config() method and setTheme with Theme enum.</li><li><h4>Step 2: Match correct method and enum usage</h4>Only extentHtmlReporter.config().setTheme(Theme.DARK); uses config().setTheme(Theme.DARK) correctly.</li><li><h4>Final Answer:</h4><strong>extentHtmlReporter.config().setTheme(Theme.DARK);</strong> -> Option A</li><li><h4>Quick Check:</h4>Use config().setTheme(Theme.DARK) [OK]</li></ol></div></div></div></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-hint-box"><div class="practice-helper-body"><strong class="helper-hint-box-title">Hint: </strong>Remember: config() then setTheme with Theme enum [OK]</div></div></div></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-mistakes-box"><div class="practice-helper-body"><strong class="helper-mistakes-box-title">Common Mistakes: </strong><ul class="ph-mistakes-list"><li class="ph-mistake-item mb-0">Using setTheme directly without config()</li><li class="ph-mistake-item mb-0">Passing theme as string instead of Theme enum</li><li class="ph-mistake-item mb-0">Using incorrect method names</li></ul></div></div></div></div></div></div><div class="d-none"><div class="mb-4"><div class="practice-content"><div class="text-pre-wrap dbd-txt-theme-intense pb-3">3<!-- -->. <!-- -->Given the following code snippet, what will be the title of the generated Extent report?<br/><pre>ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("testReport.html"); htmlReporter.config().setDocumentTitle("My Test Report"); ExtentReports extent = new ExtentReports(); extent.attachReporter(htmlReporter); </pre></div></div><div class="question-pills-container " style="padding-top:unset"><span class="level-badge">medium</span></div></div><div class=""><div class="practice-options"><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>A<!-- -->. <!-- -->Extent Report</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>B<!-- -->. <!-- -->testReport.html</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>C<!-- -->. <!-- -->My Test Report</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>D<!-- -->. <!-- -->Default Title</span></div></div><div class="py-3"><button class="site-btn" style="width:200px" disabled="">Verify</button></div></div><div class="py-2 d-none"><div class="practice-helper-btns-wrapper"></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-solution-box"><h4 class="helper-solution-box-title">Solution</h4><div class="practice-helper-body"><ol><li><h4>Step 1: Identify method setting report title</h4>config().setDocumentTitle("My Test Report") sets the HTML page title.</li><li><h4>Step 2: Understand effect on report</h4>The report's browser tab will show "My Test Report" as title.</li><li><h4>Final Answer:</h4><strong>My Test Report</strong> -> Option C</li><li><h4>Quick Check:</h4>setDocumentTitle sets report title [OK]</li></ol></div></div></div></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-hint-box"><div class="practice-helper-body"><strong class="helper-hint-box-title">Hint: </strong>Look for setDocumentTitle method for report title [OK]</div></div></div></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-mistakes-box"><div class="practice-helper-body"><strong class="helper-mistakes-box-title">Common Mistakes: </strong><ul class="ph-mistakes-list"><li class="ph-mistake-item mb-0">Confusing file name with report title</li><li class="ph-mistake-item mb-0">Assuming default title is used</li><li class="ph-mistake-item mb-0">Ignoring config() method effects</li></ul></div></div></div></div></div></div><div class="d-none"><div class="mb-4"><div class="practice-content"><div class="text-pre-wrap dbd-txt-theme-intense pb-3">4<!-- -->. <!-- -->Identify the error in the following code that prevents the Extent report from saving properly:<br/><pre>ExtentHtmlReporter reporter = new ExtentHtmlReporter("report.html"); ExtentReports extent = new ExtentReports(); extent.attachReporter(reporter); // Missing flush call </pre></div></div><div class="question-pills-container " style="padding-top:unset"><span class="level-badge">medium</span></div></div><div class=""><div class="practice-options"><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>A<!-- -->. <!-- -->ExtentHtmlReporter should be initialized after ExtentReports</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>B<!-- -->. <!-- -->Incorrect file name extension, should be .txt</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>C<!-- -->. <!-- -->attachReporter method is deprecated and should not be used</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>D<!-- -->. <!-- -->Missing call to extent.flush() to save the report</span></div></div><div class="py-3"><button class="site-btn" style="width:200px" disabled="">Verify</button></div></div><div class="py-2 d-none"><div class="practice-helper-btns-wrapper"></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-solution-box"><h4 class="helper-solution-box-title">Solution</h4><div class="practice-helper-body"><ol><li><h4>Step 1: Check report saving process</h4>Extent report requires extent.flush() to write data to file.</li><li><h4>Step 2: Identify missing flush call</h4>The code does not call extent.flush(), so report is not saved.</li><li><h4>Final Answer:</h4><strong>Missing call to extent.flush() to save the report</strong> -> Option D</li><li><h4>Quick Check:</h4>Always call extent.flush() to save report [OK]</li></ol></div></div></div></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-hint-box"><div class="practice-helper-body"><strong class="helper-hint-box-title">Hint: </strong>Remember to call extent.flush() after tests [OK]</div></div></div></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-mistakes-box"><div class="practice-helper-body"><strong class="helper-mistakes-box-title">Common Mistakes: </strong><ul class="ph-mistakes-list"><li class="ph-mistake-item mb-0">Forgetting to call flush()</li><li class="ph-mistake-item mb-0">Changing file extension incorrectly</li><li class="ph-mistake-item mb-0">Misunderstanding attachReporter usage</li></ul></div></div></div></div></div></div><div class="d-none"><div class="mb-4"><div class="practice-content"><div class="text-pre-wrap dbd-txt-theme-intense pb-3">5<!-- -->. <!-- -->You want to add system information like OS and Java version to your Extent report. Which code snippet correctly adds this info before flushing the report?<br/><pre>ExtentReports extent = new ExtentReports(); ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("sysInfoReport.html"); extent.attachReporter(htmlReporter); // Add system info here extent.flush();</pre></div></div><div class="question-pills-container " style="padding-top:unset"><span class="level-badge">hard</span></div></div><div class=""><div class="practice-options"><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>A<!-- -->. <!-- -->htmlReporter.setSystemInfo("OS", System.getProperty("os.name")); htmlReporter.setSystemInfo("Java Version", System.getProperty("java.version"));</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>B<!-- -->. <!-- -->extent.addSystemInfo("OS", System.getProperty("os.name")); extent.addSystemInfo("Java Version", System.getProperty("java.version"));</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>C<!-- -->. <!-- -->extent.setSystemInfo("OS", System.getProperty("os.name")); extent.setSystemInfo("Java Version", System.getProperty("java.version"));</span></div><div class="practice-option-label" style="cursor:pointer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="txt-dark-grey-color site-fs-18 me-2 me-md-3" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg><span>D<!-- -->. <!-- -->htmlReporter.addSystemInfo("OS", System.getProperty("os.name")); htmlReporter.addSystemInfo("Java Version", System.getProperty("java.version"));</span></div></div><div class="py-3"><button class="site-btn" style="width:200px" disabled="">Verify</button></div></div><div class="py-2 d-none"><div class="practice-helper-btns-wrapper"></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-solution-box"><h4 class="helper-solution-box-title">Solution</h4><div class="practice-helper-body"><ol><li><h4>Step 1: Identify correct method to add system info</h4>ExtentReports class has addSystemInfo method to add info.</li><li><h4>Step 2: Confirm usage on ExtentReports instance</h4>System info is added on extent, not on htmlReporter.</li><li><h4>Final Answer:</h4><strong>extent.addSystemInfo("OS", System.getProperty("os.name")); extent.addSystemInfo("Java Version", System.getProperty("java.version"));</strong> -> Option B</li><li><h4>Quick Check:</h4>Use extent.addSystemInfo() before flush [OK]</li></ol></div></div></div></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-hint-box"><div class="practice-helper-body"><strong class="helper-hint-box-title">Hint: </strong>Add system info on extent, not htmlReporter [OK]</div></div></div></div><div class="practice-expanation-div "><div class="practice-expanation-div-body"><div class="practice-helper-content helper-mistakes-box"><div class="practice-helper-body"><strong class="helper-mistakes-box-title">Common Mistakes: </strong><ul class="ph-mistakes-list"><li class="ph-mistake-item mb-0">Calling setSystemInfo on htmlReporter instead of extent</li><li class="ph-mistake-item mb-0">Using setSystemInfo which does not exist</li><li class="ph-mistake-item mb-0">Adding system info after flush()</li></ul></div></div></div></div></div></div><div class="d-flex align-items-center justify-content-between mt-4"><button class="secondary-site-btn" disabled=""><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" aria-hidden="true" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"></path></svg> Previous</button><div class="practice-question-toggles-wrapper"><button class="practice-question-toggle-btn active ">1</button><button class="practice-question-toggle-btn ">2</button><button class="practice-question-toggle-btn ">3</button><button class="practice-question-toggle-btn ">4</button><button class="practice-question-toggle-btn ">5</button></div><button class="secondary-site-btn">Next <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" aria-hidden="true" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"></path></svg></button></div></div></article></div><div id="mock" class="mtc-wrapper"><div class="mtc-card-container"><div class="mtc-card pulse-effect"><span class="mtc-recommended-badge">Recommended</span><div class="mtc-icon-wrap"><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" color="#fff" style="color:#fff" height="24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path><path d="M12 7a5 5 0 1 0 5 5"></path><path d="M13 3.055a9 9 0 1 0 7.941 7.945"></path><path d="M15 6v3h3l3 -3h-3v-3z"></path><path d="M15 9l-3 3"></path></svg></div><h4 class="mtc-heading">Ready to prove it?</h4><p class="mtc-sub">Pass the test and this pattern moves <span class="mtc-state-pill">unknown</span> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 512 512" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="m268 112 144 144-144 144m124-144H100"></path></svg> <span class="mtc-state-pill good">strong</span> <span class="d-inline-block">while earning <span class="weight-800">+1 Grip</span></span> toward your certificate.</p><div class="mtc-pills"><span class="mtc-pill"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>10 questions</span><span class="mtc-pill"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 512 512" height="13" width="13" xmlns="http://www.w3.org/2000/svg"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"></path></svg>~5 min</span><span class="mtc-pill"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>easy <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 512 512" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="m268 112 144 144-144 144m124-144H100"></path></svg> hard</span></div><div class="mtc-cta-wrap"><button type="button" class="mtc-cta-btn">Take the Test <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 512 512" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="m268 112 144 144-144 144m124-144H100"></path></svg></button></div></div></div></div></div></main><div class="rpi-float-wrap"><button type="button" class="rpi-float-btn" aria-label="Report an issue"><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line></svg><span class="rpi-float-label">Report Issue</span></button></div></div><div style="display:none"><div id="ad-management-config-settings" data-blocklist-all="1"></div></div> <script src="/_next/static/chunks/webpack-28170116499ad51b.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/d071dca61fbb01bf.css\",\"style\"]\n2:HL[\"/_next/static/css/907864b6faf28c32.css\",\"style\"]\n3:HL[\"/_next/static/css/ada9a246b4e9c7f9.css\",\"style\"]\n4:HL[\"/_next/static/css/725c7861d1898ba8.css\",\"style\"]\n5:HL[\"/_next/static/css/a97525600f39e233.css\",\"style\"]\n6:HL[\"/_next/static/css/989afc350a4b3a28.css\",\"style\"]\n7:HL[\"/_next/static/css/ccfdf35169bd162c.css\",\"style\"]\n8:HL[\"/_next/static/css/417e7aee3e688b57.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"9:I[95751,[],\"\"]\nc:I[39275,[],\"\"]\n12:I[61343,[],\"\"]\n13:I[84080,[\"8726\",\"static/chunks/8726-fd60949e252ac8d1.js\",\"3185\",\"static/chunks/app/layout-e2ef1005801dc1ed.js\"],\"\"]\n14:I[88726,[\"8726\",\"static/chunks/8726-fd60949e252ac8d1.js\",\"3185\",\"static/chunks/app/layout-e2ef1005801dc1ed.js\"],\"Toaster\"]\n15:I[20154,[\"8422\",\"static/chunks/66ec4792-3d3220126f3e74ee.js\",\"6950\",\"static/chunks/f8025e75-5dd99dd1a689ea97.js\",\"6795\",\"static/chunks/6795-1b544390b9b7cb09.js\",\"5214\",\"static/chunks/5214-cc3a3a8017cc6e4d.js\",\"7078\",\"static/chunks/7078-09556dce22020d83.js\",\"3154\",\"static/chunks/3154-0aa2f15561902c10.js\",\"7562\",\"static/chunks/7562-b71a43604fd32292.js\",\"4481\",\"static/chunks/4481-14671e1e3d1ffff7.js\",\"4662\",\"static/chunks/4662-205abea99f9b3adf.js\",\"9160\",\"static/chunks/app/not-found-b9aad74520590312.js\"],\"default\"]\n16:I[78598,[\"8726\",\"static/chunks/8726-fd60949e252ac8d1.js\",\"3185\",\"static/chunks/app/layout-e2ef1005801dc1ed.js\"],\"default\"]\n17:I[56192,[\"8726\",\"static/chunks/8726-fd60949e252ac8d1.js\",\"3185\",\"static/chunks/app/layout-e2ef1005801dc1ed.js\"],\"default\"]\n19:I[76130,[],\"\"]\nd:[\"lang\",\"en\",\"d\"]\ne:[\"subject\",\"selenium-java\",\"d\"]\nf:[\"part\",\"part-3\",\"d\"]\n10:[\"pattern\",\"selenium-java-extent-report-customization\",\"d\"]\n11:[\"mode\",\"deep\",\"oc\"]\n1a:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d071dca61fbb01bf.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/907864b6faf28c32.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L9\",null,{\"buildId\":\"leyaa-prod-build-id\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/en/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/deep\",\"initialTree\":[\"\",{\"children\":[[\"lang\",\"en\",\"d\"],{\"children\":[\"codefly\",{\"children\":[\"learn\",{\"children\":[[\"subject\",\"selenium-java\",\"d\"],{\"children\":[[\"part\",\"part-3\",\"d\"],{\"children\":[[\"pattern\",\"selenium-java-extent-report-customization\",\"d\"],{\"children\":[[\"mode\",\"deep\",\"oc\"],{\"children\":[\"__PAGE__\",{}]}]}]}]}]}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[[\"lang\",\"en\",\"d\"],{\"children\":[\"codefly\",{\"children\":[\"learn\",{\"children\":[[\"subject\",\"selenium-java\",\"d\"],{\"children\":[[\"part\",\"part-3\",\"d\"],{\"children\":[[\"pattern\",\"selenium-java-extent-report-customization\",\"d\"],{\"children\":[[\"mode\",\"deep\",\"oc\"],{\"children\":[\"__PAGE__\",{},[[\"$La\",\"$Lb\"],null],null]},[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$d\",\"children\",\"codefly\",\"children\",\"learn\",\"children\",\"$e\",\"children\",\"$f\",\"children\",\"$10\",\"children\",\"$11\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/ada9a246b4e9c7f9.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/725c7861d1898ba8.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/a97525600f39e233.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"3\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/989afc350a4b3a28.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"4\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/ccfdf35169bd162c.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"5\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/417e7aee3e688b57.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]]}],null]},[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$d\",\"children\",\"codefly\",\"children\",\"learn\",\"children\",\"$e\",\"children\",\"$f\",\"children\",\"$10\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$d\",\"children\",\"codefly\",\"children\",\"learn\",\"children\",\"$e\",\"children\",\"$f\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$d\",\"children\",\"codefly\",\"children\",\"learn\",\"children\",\"$e\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$d\",\"children\",\"codefly\",\"children\",\"learn\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$d\",\"children\",\"codefly\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$d\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"theme-color\",\"content\":\"#5f56fe\"}],[\"$\",\"meta\",null,{\"name\":\"msapplication-TileColor\",\"content\":\"#5f56fe\"}],[\"$\",\"$L13\",null,{\"src\":\"https://www.googletagmanager.com/gtag/js?id=G-N2NY2DMMDW\",\"strategy\":\"afterInteractive\"}],[\"$\",\"$L13\",null,{\"id\":\"google-analytics\",\"strategy\":\"afterInteractive\",\"children\":\"\\n window.dataLayer = window.dataLayer || [];\\n function gtag(){dataLayer.push(arguments);}\\n gtag('js', new Date());\\n gtag('config', 'G-N2NY2DMMDW', {\\n page_path: window.location.pathname,\\n });\\n \"}],[\"$\",\"script\",null,{\"async\":true,\"src\":\"https://www.googletagmanager.com/gtag/js?id=AW-18214378714\"}],[\"$\",\"$L13\",null,{\"children\":\"\\n window.dataLayer = window.dataLayer || [];\\n function gtag() {\\n dataLayer.push(arguments);\\n }\\n gtag('js', new Date());\\n gtag('config', 'AW-18214378714');\\n \"}],[\"$\",\"script\",null,{\"data-grow-initializer\":\"\",\"suppressHydrationWarning\":true,\"dangerouslySetInnerHTML\":{\"__html\":\"!(function(){window.growMe||((window.growMe=function(e){window.growMe._.push(e);}),(window.growMe._=[]));var e=document.createElement(\\\"script\\\");(e.type=\\\"text/javascript\\\"),(e.src=\\\"https://faves.grow.me/main.js\\\"),(e.defer=!0),e.setAttribute(\\\"data-grow-faves-site-id\\\",\\\"U2l0ZTo0MGIxZDBlZC0wNzdlLTQ0NjgtOThmOC1kNDYyZGMwM2IwMWY=\\\");var t=document.getElementsByTagName(\\\"script\\\")[0];t.parentNode.insertBefore(e,t);})();\"}}],[\"$\",\"$L13\",null,{\"src\":\"//scripts.scriptwrapper.com/tags/40b1d0ed-077e-4468-98f8-d462dc03b01f.js\",\"strategy\":\"afterInteractive\",\"data-noptimize\":\"1\",\"data-cfasync\":\"false\"}],[\"$\",\"script\",null,{\"type\":\"application/ld+json\",\"suppressHydrationWarning\":true,\"dangerouslySetInnerHTML\":{\"__html\":\"{\\\"@context\\\":\\\"https://schema.org\\\",\\\"@type\\\":\\\"WebApplication\\\",\\\"name\\\":\\\"Leyaa.ai\\\",\\\"description\\\":\\\"Leyaa.ai builds learning intelligence that understands how you learn - guiding what to study, how to practice, and when to move forward.\\\",\\\"url\\\":\\\"https://leyaa.ai\\\",\\\"applicationCategory\\\":\\\"EducationalApplication\\\",\\\"operatingSystem\\\":\\\"Web\\\",\\\"offers\\\":{\\\"@type\\\":\\\"Offer\\\",\\\"price\\\":\\\"0\\\",\\\"priceCurrency\\\":\\\"USD\\\"},\\\"creator\\\":{\\\"@type\\\":\\\"Organization\\\",\\\"name\\\":\\\"Leyaa.ai\\\"}}\"}}],[\"$\",\"$L13\",null,{\"id\":\"clarity-script\",\"strategy\":\"afterInteractive\",\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function(c,l,a,r,i,t,y){\\n c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};\\n t=l.createElement(r);t.async=1;t.src=\\\"https://www.clarity.ms/tag/\\\"+i;\\n y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);\\n })(window, document, \\\"clarity\\\", \\\"script\\\", \\\"w4gxh6rdmh\\\");\\n \"}}]]}],[\"$\",\"body\",null,{\"children\":[[\"$\",\"$L14\",null,{\"containerStyle\":{\"top\":70}}],[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[\"$\",\"$L15\",null,{}],\"notFoundStyles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/a97525600f39e233.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],\"styles\":null}],[\"$\",\"$L16\",null,{}],\" \",[\"$\",\"$L17\",null,{}]]}]]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$L18\"],\"globalErrorComponent\":\"$19\",\"missingSlots\":\"$W1a\"}]]\n"])</script><script>self.__next_f.push([1,"1c:I[43489,[\"8422\",\"static/chunks/66ec4792-3d3220126f3e74ee.js\",\"6950\",\"static/chunks/f8025e75-5dd99dd1a689ea97.js\",\"6051\",\"static/chunks/795d4814-8b40e2eae05948ca.js\",\"5706\",\"static/chunks/9c4e2130-0ef90d15550fcb15.js\",\"522\",\"static/chunks/94730671-fd9628eddbd5107b.js\",\"7699\",\"static/chunks/8e1d74a4-d3c1e3cfb4eeea98.js\",\"7240\",\"static/chunks/53c13509-a3e4ac0640ae03f2.js\",\"9956\",\"static/chunks/ee560e2c-27ba7a66c659fa82.js\",\"2516\",\"static/chunks/f7333993-31ab72eb9b202e3d.js\",\"1779\",\"static/chunks/0e762574-cee3ec2351d97ca0.js\",\"6795\",\"static/chunks/6795-1b544390b9b7cb09.js\",\"5214\",\"static/chunks/5214-cc3a3a8017cc6e4d.js\",\"7078\",\"static/chunks/7078-09556dce22020d83.js\",\"4889\",\"static/chunks/4889-de8d1c4f2ff2f134.js\",\"8726\",\"static/chunks/8726-fd60949e252ac8d1.js\",\"7534\",\"static/chunks/7534-02c906a11e681445.js\",\"4220\",\"static/chunks/4220-e3c1264f6e3453a7.js\",\"7562\",\"static/chunks/7562-b71a43604fd32292.js\",\"4481\",\"static/chunks/4481-14671e1e3d1ffff7.js\",\"6857\",\"static/chunks/6857-f9121be732678b30.js\",\"2202\",\"static/chunks/2202-dad5d33fadc7ea73.js\",\"1786\",\"static/chunks/1786-7253d5c3df8362c5.js\",\"7029\",\"static/chunks/app/%5Blang%5D/codefly/learn/%5Bsubject%5D/%5Bpart%5D/%5Bpattern%5D/%5B%5B...mode%5D%5D/page-b11550cd55444a64.js\"],\"default\"]\n1b:T423,{\"@context\":\"https://schema.org\",\"@type\":\"LearningResource\",\"name\":\"Extent report customization in Selenium Java - Deep Dive\",\"description\":\"Go deep on Extent report customization in Selenium Java. Internals, mental models, under-the-hood mechanics, misconceptions, common pitfalls, and production patterns. For serious learners.\",\"url\":\"https://leyaa.ai/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization\",\"learningResourceType\":\"Tutorial\",\"programmingLanguage\":\"Selenium Java\",\"inLanguage\":\"en\",\"isAccessibleForFree\":true,\"teaches\":\"Extent report customization in Selenium Java - Deep Dive\",\"provider\":{\"@type\":\"Organization\",\"url\":\"https://leyaa.ai\"},\"educationalLevel\":\"Beginner to Advanced\",\"breadcrumb\":{\"@type\":\"BreadcrumbList\",\"itemListElement\":[{\"@ty"])</script><script>self.__next_f.push([1,"pe\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https://leyaa.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extent report customization in Selenium Java - Deep Dive\",\"item\":\"https://leyaa.ai/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization\"}]}}"])</script><script>self.__next_f.push([1,"b:[[[\"$\",\"script\",\"0\",{\"type\":\"application/ld+json\",\"dangerouslySetInnerHTML\":{\"__html\":\"$1b\"}}]],[\"$\",\"$L1c\",null,{\"subject\":\"selenium-java\",\"dbSubject\":\"selenium_java\",\"part\":\"part-3\",\"pattern\":\"selenium_java_extent_report_customization\",\"modeSlug\":\"deep\",\"lang\":\"en\",\"internalLinks\":[{\"code\":\"LMC\",\"slug\":\"\",\"label\":\"📖 Learn\",\"href\":\"/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization\",\"active\":false},{\"code\":\"LMCWHY\",\"slug\":\"why\",\"label\":\"💡 Why Learn This\",\"href\":\"/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/why\",\"active\":false},{\"code\":\"DLM\",\"slug\":\"deep\",\"label\":\"💡 Deep Learn Mode\",\"href\":\"/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/deep\",\"active\":true},{\"code\":\"TMC\",\"slug\":\"try\",\"label\":\"✏️ Try It\",\"href\":\"/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/try\",\"active\":false},{\"code\":\"VMC\",\"slug\":\"visualize\",\"label\":\"👁 Visualize\",\"href\":\"/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/visualize\",\"active\":false},{\"code\":\"TCM\",\"slug\":\"complexity\",\"label\":\"⏱ Complexity\",\"href\":\"/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/complexity\",\"active\":false},{\"code\":\"CMC\",\"slug\":\"challenge\",\"label\":\"🏆 Challenge\",\"href\":\"/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/challenge\",\"active\":false},{\"code\":\"PMC\",\"slug\":\"project\",\"label\":\"📁 Project\",\"href\":\"/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/project\",\"active\":false},{\"code\":\"RMC\",\"slug\":\"review\",\"label\":\"🧠 Quick Review\",\"href\":\"/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/review\",\"active\":false}],\"isLoggedIn\":false,\"seoH1\":\"Extent report customization in Selenium Java - Deep Dive\",\"contentData\":{\"pattern_id\":\"selenium_java_extent_report_customization\",\"metadata\":{\"slot_map\":{\"LMCWHY\":\"LMCWHY\",\"LMC\":\"LMC\",\"TMC\":\"TMC\",\"CMC\":\"CMC\",\"RMC\":\"RMC\",\"VMC\":\"EXC\",\"TCM\":\"TFW\",\"PMC\":\"AUT\",\"DLM\":\"DLM\"}},\"modes\":{\"DLM\":{\"topic\":\"Extent report customization\",\"mode\":\"DLM_v1\",\"language\":\"selenium_java\",\"content_type\":\"Software Testing \u0026 QA\",\"overview\":{\"what\":\"Extent report customization means changing how the test report looks and what information it shows. It helps testers create reports that are easier to read and understand. You can add colors, logos, and extra details about tests. This makes it simple to see which tests passed or failed and why.\",\"why_it_matters\":\"Without customizing reports, test results can be hard to read and understand quickly. This slows down fixing problems and sharing results with others. Custom reports help teams spot issues faster and communicate clearly. They make testing more effective and save time in real projects.\",\"where_it_fits\":\"Before learning this, you should know how to write basic Selenium tests and generate simple Extent reports. After this, you can learn advanced reporting tools or integrate reports with continuous integration systems like Jenkins.\"},\"mental_model\":{\"core_idea\":\"Customizing Extent reports tailors test results presentation to make test outcomes clearer and more useful for everyone.\",\"analogy\":\"It's like decorating a photo album: you choose the cover, add captions, and arrange photos so your story is easy and fun to follow.\",\"visual\":\"┌─────────────────────────────┐\\n│ Extent Report │\\n├─────────────┬───────────────┤\\n│ Raw Test │ Customization │\\n│ Results │ Options │\\n│ (Pass/Fail) │ - Colors │\\n│ │ - Logos │\\n│ │ - Extra Info │\\n└─────────────┴───────────────┘\"},\"build_up\":[{\"level\":\"foundation\",\"title\":\"Basics of Extent Reports Setup\",\"concept\":\"Learn how to create a simple Extent report in Selenium with Java.\",\"content\":\"To start, add ExtentReports library to your project. Then create an ExtentReports object and an ExtentTest object for each test. Log test steps and results. Finally, flush the report to write it to a file.\\n\\nExample:\\nExtentReports extent = new ExtentReports();\\nExtentTest test = extent.createTest(\\\"My Test\\\");\\ntest.pass(\\\"Step passed\\\");\\nextent.flush();\",\"result\":\"A basic HTML report file is created showing test names and pass/fail status.\",\"insight\":\"Understanding the basic setup is essential before adding any customization.\"},{\"level\":\"foundation\",\"title\":\"Understanding Report Structure\",\"concept\":\"Know the parts of an Extent report you can customize: title, theme, system info, and test logs.\",\"content\":\"An Extent report has a header (title and logo), a summary (pass/fail counts), system info (environment details), and detailed test logs. Each part can be changed to fit your needs.\",\"result\":\"You can identify where to apply changes to make reports clearer and more informative.\",\"insight\":\"Knowing the report's anatomy helps target your customization effectively.\"},{\"level\":\"intermediate\",\"title\":\"Changing Report Title and Theme\",\"self_check\":\"Before reading on: do you think changing the report title requires editing the HTML file manually or can it be done via code? Commit to your answer.\",\"concept\":\"Learn how to set a custom report title and choose a theme (dark or standard) programmatically.\",\"content\":\"Use ExtentSparkReporter to set the report file path, then call methods to set the document title and theme.\\n\\nExample:\\nExtentSparkReporter spark = new ExtentSparkReporter(\\\"report.html\\\");\\nspark.config().setDocumentTitle(\\\"My Test Report\\\");\\nspark.config().setTheme(Theme.DARK);\\nExtentReports extent = new ExtentReports();\\nextent.attachReporter(spark);\",\"result\":\"The generated report shows the new title and uses the dark color theme.\",\"insight\":\"Knowing you can customize appearance via code saves time and avoids manual edits.\"},{\"level\":\"intermediate\",\"title\":\"Adding System and Environment Info\",\"self_check\":\"Before reading on: do you think system info is added automatically or must be set explicitly in code? Commit to your answer.\",\"concept\":\"Add details like OS, browser, and tester name to the report for better context.\",\"content\":\"Use extent.setSystemInfo(key, value) to add environment details.\\n\\nExample:\\nextent.setSystemInfo(\\\"OS\\\", \\\"Windows 10\\\");\\nextent.setSystemInfo(\\\"Browser\\\", \\\"Chrome 114\\\");\\nextent.setSystemInfo(\\\"Tester\\\", \\\"Alice\\\");\",\"result\":\"The report displays these details in a dedicated section, helping readers understand test conditions.\",\"insight\":\"Explicitly adding system info makes reports more useful for debugging and audits.\"},{\"level\":\"intermediate\",\"title\":\"Embedding Screenshots in Reports\",\"self_check\":\"Before reading on: do you think screenshots are added automatically on failure or require manual code? Commit to your answer.\",\"concept\":\"Learn how to capture and attach screenshots to test steps in the report.\",\"content\":\"Capture screenshots using Selenium's TakesScreenshot interface. Save the image file and add it to the report with test.addScreenCaptureFromPath(path).\\n\\nExample:\\nFile src = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\\nString path = \\\"screenshots/img.png\\\";\\nFileUtils.copyFile(src, new File(path));\\ntest.fail(\\\"Step failed\\\", MediaEntityBuilder.createScreenCaptureFromPath(path).build());\",\"result\":\"Failed test steps show screenshots in the report, making issues easier to understand.\",\"insight\":\"Attaching screenshots visually explains failures, speeding up troubleshooting.\"},{\"level\":\"advanced\",\"title\":\"Customizing Logs and Categories\",\"self_check\":\"Before reading on: do you think test categories and custom logs are set automatically or require explicit code? Commit to your answer.\",\"concept\":\"Add categories (like 'Smoke' or 'Regression') and custom log messages to organize and clarify tests.\",\"content\":\"Use test.assignCategory(\\\"Smoke\\\") to tag tests. Use test.log(Status.INFO, \\\"message\\\") to add detailed logs.\\n\\nExample:\\ntest.assignCategory(\\\"Regression\\\");\\ntest.log(Status.INFO, \\\"Starting login test\\\");\",\"result\":\"Reports group tests by category and show detailed logs for each step.\",\"insight\":\"Organizing tests by category helps filter and focus on relevant tests in large suites.\"},{\"level\":\"expert\",\"title\":\"Advanced Report Customization with CSS and JS\",\"self_check\":\"Before reading on: do you think Extent reports allow injecting custom CSS/JS for styling and behavior? Commit to your answer.\",\"concept\":\"Learn how to add your own CSS and JavaScript to Extent reports to change styles and add interactive features.\",\"content\":\"You can modify the ExtentSparkReporter configuration to include custom CSS or JS files by extending the reporter or post-processing the HTML file. This allows changing fonts, colors beyond themes, or adding dynamic filters.\\n\\nExample approach: After report generation, inject CSS styles or JS scripts into the HTML file to customize appearance and behavior.\",\"result\":\"Reports can have unique branding, interactive filters, or animations beyond default options.\",\"insight\":\"Knowing how to extend reports with CSS/JS unlocks full control over report presentation and user experience.\"}],\"under_the_hood\":{\"mechanism\":\"ExtentReports works by collecting test logs and metadata during test execution. It stores this data in memory and then writes it to an HTML file using ExtentSparkReporter. The reporter uses templates and configuration settings to format the report with HTML, CSS, and JavaScript. Customization changes these templates or adds extra data before writing the file.\",\"why_designed_this_way\":\"The design separates test logging from report generation to keep tests simple and flexible. Using HTML allows reports to be viewed in any browser without extra tools. The modular reporter design lets users customize appearance without changing core logic. This approach balances ease of use with powerful customization.\",\"diagram\":\"┌───────────────┐ ┌─────────────────────┐\\n│ Test Code │ │ ExtentReports API │\\n│ (Selenium) ───────▶│ Collect Logs \u0026 Info │\\n└───────────────┘ └─────────┬───────────┘\\n │\\n ▼\\n ┌─────────────────────┐\\n │ ExtentSparkReporter │\\n │ Format \u0026 Write HTML │\\n └─────────┬───────────┘\\n │\\n ▼\\n ┌───────────────────┐\\n │ Final HTML Report │\\n └───────────────────┘\"},\"misconceptions\":[{\"self_check\":\"Quick: Do you think Extent reports automatically capture screenshots on test failure without extra code? Commit to yes or no.\",\"belief\":\"Extent reports automatically capture and attach screenshots when a test fails.\",\"reality\":\"You must write code to capture screenshots and attach them to the report manually.\",\"why_it_matters\":\"Assuming automatic screenshots leads to missing visual evidence in reports, making debugging harder.\"},{\"self_check\":\"Quick: Do you think changing the report theme affects test results or only appearance? Commit to your answer.\",\"belief\":\"Changing the report theme can affect how tests run or their results.\",\"reality\":\"Themes only change the report's look; they do not affect test execution or outcomes.\",\"why_it_matters\":\"Confusing appearance with test logic can cause wasted effort troubleshooting non-issues.\"},{\"self_check\":\"Quick: Do you think system info like OS and browser is added automatically to Extent reports? Commit yes or no.\",\"belief\":\"System and environment info is automatically included in Extent reports without extra code.\",\"reality\":\"You must explicitly add system info using setSystemInfo calls in your test code.\",\"why_it_matters\":\"Missing environment details can cause confusion when tests behave differently on various setups.\"},{\"self_check\":\"Quick: Do you think you can fully customize Extent reports by only changing Java code without touching HTML or CSS? Commit your answer.\",\"belief\":\"All report customization can be done purely through Java code APIs.\",\"reality\":\"Some advanced customizations require editing or injecting CSS/JS into the generated HTML report.\",\"why_it_matters\":\"Expecting full control via code alone limits report design and misses powerful customization options.\"}],\"expert_zone\":{\"nuances\":[\"Custom categories can be combined with test metadata to create dynamic filters in reports, improving navigation in large test suites.\",\"Using ExtentReports in parallel test execution requires thread-safe handling of ExtentTest objects to avoid log mix-ups.\",\"Post-processing the generated HTML report with scripts allows adding features like auto-refresh or custom analytics not supported natively.\"],\"when_not_to_use\":\"Extent report customization is less suitable when tests run in highly restricted environments without file system access or when real-time reporting is needed. In such cases, consider using cloud-based reporting tools or continuous integration dashboards that update live.\",\"production_patterns\":\"In real projects, teams integrate Extent reports with Jenkins pipelines to archive reports and send email notifications. They use custom themes and logos for branding and attach screenshots on failures. Categories help run subsets of tests like smoke or regression. Advanced users inject JavaScript to add interactive filters and export options.\"},\"connections\":[{\"to_concept\":\"Continuous Integration (CI) Pipelines\",\"relationship\":\"Builds-on\",\"insight\":\"Knowing how to customize Extent reports helps integrate clear test results into CI pipelines, improving automated quality feedback.\"},{\"to_concept\":\"User Interface (UI) Design\",\"relationship\":\"Similar pattern\",\"insight\":\"Customizing report themes and layouts shares principles with UI design, like color contrast and information hierarchy, enhancing report readability.\"},{\"to_concept\":\"Data Visualization\",\"relationship\":\"Builds-on\",\"insight\":\"Understanding how to present test data visually in reports connects to data visualization concepts, helping communicate complex results simply.\"}],\"pitfalls\":[{\"mistake\":\"Assuming screenshots attach automatically on failure.\",\"incorrect_approach\":\"test.fail(\\\"Test failed\\\");\",\"correct_approach\":\"test.fail(\\\"Test failed\\\", MediaEntityBuilder.createScreenCaptureFromPath(\\\"path/to/screenshot.png\\\").build());\",\"root_cause\":\"Misunderstanding that screenshot capture and attachment require explicit code.\"},{\"mistake\":\"Setting report title by editing the HTML file after generation.\",\"incorrect_approach\":\"Manually opening report.html and changing \u003ctitle\u003e tag in a text editor.\",\"correct_approach\":\"spark.config().setDocumentTitle(\\\"Custom Title\\\");\",\"root_cause\":\"Not knowing ExtentSparkReporter provides API for title customization.\"},{\"mistake\":\"Not calling extent.flush() at the end of tests.\",\"incorrect_approach\":\"Creating tests and logging but forgetting extent.flush();\",\"correct_approach\":\"Calling extent.flush(); after all tests to write the report file.\",\"root_cause\":\"Missing the step that finalizes and saves the report.\"}],\"key_takeaways\":[\"Extent report customization makes test results clearer and easier to understand for all stakeholders.\",\"You can change report titles, themes, add system info, categories, and screenshots through simple Java APIs.\",\"Advanced customization may require injecting CSS or JavaScript into the generated HTML report.\",\"Misunderstandings about automatic features like screenshots or system info can cause incomplete reports.\",\"Integrating customized reports into CI pipelines and using categories improves test management in real projects.\"],\"metadata\":{\"version\":\"1.0\",\"content_type\":\"testing\",\"estimated_time_minutes\":15,\"depth_level\":\"comprehensive\",\"difficulty_ceiling\":\"expert\"}}},\"subject\":\"selenium_java\",\"title\":\"Extent report customization\",\"puzzleDetails\":[{\"_id\":\"69b1786945baa2b585489ab0\",\"question_number\":1,\"question\":\"What is the main purpose of customizing an Extent report in Selenium Java?\",\"options\":{\"A\":\"To make test results clearer and easier to understand\",\"B\":\"To increase the speed of test execution\",\"C\":\"To reduce the size of the test scripts\",\"D\":\"To automatically fix test failures\"},\"correct_answer\":[\"A\"],\"solution_explanation\":\"\u003cdiv class='solution-box'\u003e\u003cspan class='solution-label'\u003e\u003cstrong\u003eSolution:\u003c/strong\u003e\u003c/span\u003e\u003col\u003e\u003cli\u003e\u003ch4\u003eStep 1: Understand Extent report role\u003c/h4\u003eExtent reports show test results in a readable format.\u003c/li\u003e\u003cli\u003e\u003ch4\u003eStep 2: Identify customization benefits\u003c/h4\u003eCustomization helps make these results clearer and more useful.\u003c/li\u003e\u003cli\u003e\u003ch4\u003eFinal Answer:\u003c/h4\u003e\u003cstrong\u003eTo make test results clearer and easier to understand\u003c/strong\u003e -\u003e Option A\u003c/li\u003e\u003cli\u003e\u003ch4\u003eQuick Check:\u003c/h4\u003eCustomization = clearer test results [OK]\u003c/li\u003e\u003c/ol\u003e\u003c/div\u003e\",\"quick_trick\":\"Think: Why improve report look? To understand results better [OK]\",\"common_mistakes\":[\"Confusing report customization with test speed\",\"Thinking customization changes test logic\",\"Assuming customization fixes test errors\"],\"subject\":\"selenium_java\",\"pattern\":\"Extent report customization\",\"category\":\"Software Testing \u0026 QA\",\"question_format\":\"MCQ\",\"question_mode\":\"conceptual\",\"difficulty\":\"easy\",\"topic\":\"Reporting\",\"type\":\"Software Testing \u0026 QA\",\"question_type\":\"conceptual\",\"level\":\"easy\",\"test_type\":\"puzzle\",\"pattern_id\":\"selenium_java_extent_report_customization\",\"subjectTitle\":\"Selenium Java\",\"part\":\"part-3\",\"set_no\":1,\"usage_count\":0,\"topic_id\":\"selenium_java_p3_t3\"},{\"_id\":\"69b1786945baa2b585489ab1\",\"question_number\":2,\"question\":\"Which code snippet correctly sets the theme of an Extent report to DARK in Selenium Java?\",\"options\":{\"A\":\"extentHtmlReporter.config().setTheme(Theme.DARK);\",\"B\":\"extentHtmlReporter.setTheme(\\\"dark\\\");\",\"C\":\"extentHtmlReporter.config().theme = \\\"dark\\\";\",\"D\":\"extentHtmlReporter.setConfigTheme(Theme.DARK);\"},\"correct_answer\":[\"A\"],\"solution_explanation\":\"\u003cdiv class='solution-box'\u003e\u003cspan class='solution-label'\u003e\u003cstrong\u003eSolution:\u003c/strong\u003e\u003c/span\u003e\u003col\u003e\u003cli\u003e\u003ch4\u003eStep 1: Recall ExtentReports theme setting syntax\u003c/h4\u003eUse config() method and setTheme with Theme enum.\u003c/li\u003e\u003cli\u003e\u003ch4\u003eStep 2: Match correct method and enum usage\u003c/h4\u003eOnly extentHtmlReporter.config().setTheme(Theme.DARK); uses config().setTheme(Theme.DARK) correctly.\u003c/li\u003e\u003cli\u003e\u003ch4\u003eFinal Answer:\u003c/h4\u003e\u003cstrong\u003eextentHtmlReporter.config().setTheme(Theme.DARK);\u003c/strong\u003e -\u003e Option A\u003c/li\u003e\u003cli\u003e\u003ch4\u003eQuick Check:\u003c/h4\u003eUse config().setTheme(Theme.DARK) [OK]\u003c/li\u003e\u003c/ol\u003e\u003c/div\u003e\",\"quick_trick\":\"Remember: config() then setTheme with Theme enum [OK]\",\"common_mistakes\":[\"Using setTheme directly without config()\",\"Passing theme as string instead of Theme enum\",\"Using incorrect method names\"],\"subject\":\"selenium_java\",\"pattern\":\"Extent report customization\",\"category\":\"Software Testing \u0026 QA\",\"question_format\":\"MCQ\",\"question_mode\":\"syntax\",\"difficulty\":\"easy\",\"topic\":\"Reporting\",\"type\":\"Software Testing \u0026 QA\",\"question_type\":\"syntax\",\"level\":\"easy\",\"test_type\":\"puzzle\",\"pattern_id\":\"selenium_java_extent_report_customization\",\"subjectTitle\":\"Selenium Java\",\"part\":\"part-3\",\"set_no\":1,\"usage_count\":0,\"topic_id\":\"selenium_java_p3_t3\"},{\"_id\":\"69b1786945baa2b585489ab2\",\"question_number\":3,\"question\":\"Given the following code snippet, what will be the title of the generated Extent report?\u003cbr\u003e\u003cpre\u003eExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(\\\"testReport.html\\\");\\nhtmlReporter.config().setDocumentTitle(\\\"My Test Report\\\");\\nExtentReports extent = new ExtentReports();\\nextent.attachReporter(htmlReporter);\\n\u003c/pre\u003e\",\"options\":{\"A\":\"Extent Report\",\"B\":\"testReport.html\",\"C\":\"My Test Report\",\"D\":\"Default Title\"},\"correct_answer\":[\"C\"],\"solution_explanation\":\"\u003cdiv class='solution-box'\u003e\u003cspan class='solution-label'\u003e\u003cstrong\u003eSolution:\u003c/strong\u003e\u003c/span\u003e\u003col\u003e\u003cli\u003e\u003ch4\u003eStep 1: Identify method setting report title\u003c/h4\u003econfig().setDocumentTitle(\\\"My Test Report\\\") sets the HTML page title.\u003c/li\u003e\u003cli\u003e\u003ch4\u003eStep 2: Understand effect on report\u003c/h4\u003eThe report's browser tab will show \\\"My Test Report\\\" as title.\u003c/li\u003e\u003cli\u003e\u003ch4\u003eFinal Answer:\u003c/h4\u003e\u003cstrong\u003eMy Test Report\u003c/strong\u003e -\u003e Option C\u003c/li\u003e\u003cli\u003e\u003ch4\u003eQuick Check:\u003c/h4\u003esetDocumentTitle sets report title [OK]\u003c/li\u003e\u003c/ol\u003e\u003c/div\u003e\",\"quick_trick\":\"Look for setDocumentTitle method for report title [OK]\",\"common_mistakes\":[\"Confusing file name with report title\",\"Assuming default title is used\",\"Ignoring config() method effects\"],\"subject\":\"selenium_java\",\"pattern\":\"Extent report customization\",\"category\":\"Software Testing \u0026 QA\",\"question_format\":\"MCQ\",\"question_mode\":\"code_output\",\"difficulty\":\"medium\",\"topic\":\"Reporting\",\"type\":\"Software Testing \u0026 QA\",\"question_type\":\"code_output\",\"level\":\"medium\",\"test_type\":\"puzzle\",\"pattern_id\":\"selenium_java_extent_report_customization\",\"subjectTitle\":\"Selenium Java\",\"part\":\"part-3\",\"set_no\":1,\"usage_count\":0,\"topic_id\":\"selenium_java_p3_t3\"},{\"_id\":\"69b1786945baa2b585489ab3\",\"question_number\":4,\"question\":\"Identify the error in the following code that prevents the Extent report from saving properly:\u003cbr\u003e\u003cpre\u003eExtentHtmlReporter reporter = new ExtentHtmlReporter(\\\"report.html\\\");\\nExtentReports extent = new ExtentReports();\\nextent.attachReporter(reporter);\\n// Missing flush call\\n\u003c/pre\u003e\",\"options\":{\"A\":\"ExtentHtmlReporter should be initialized after ExtentReports\",\"B\":\"Incorrect file name extension, should be .txt\",\"C\":\"attachReporter method is deprecated and should not be used\",\"D\":\"Missing call to extent.flush() to save the report\"},\"correct_answer\":[\"D\"],\"solution_explanation\":\"\u003cdiv class='solution-box'\u003e\u003cspan class='solution-label'\u003e\u003cstrong\u003eSolution:\u003c/strong\u003e\u003c/span\u003e\u003col\u003e\u003cli\u003e\u003ch4\u003eStep 1: Check report saving process\u003c/h4\u003eExtent report requires extent.flush() to write data to file.\u003c/li\u003e\u003cli\u003e\u003ch4\u003eStep 2: Identify missing flush call\u003c/h4\u003eThe code does not call extent.flush(), so report is not saved.\u003c/li\u003e\u003cli\u003e\u003ch4\u003eFinal Answer:\u003c/h4\u003e\u003cstrong\u003eMissing call to extent.flush() to save the report\u003c/strong\u003e -\u003e Option D\u003c/li\u003e\u003cli\u003e\u003ch4\u003eQuick Check:\u003c/h4\u003eAlways call extent.flush() to save report [OK]\u003c/li\u003e\u003c/ol\u003e\u003c/div\u003e\",\"quick_trick\":\"Remember to call extent.flush() after tests [OK]\",\"common_mistakes\":[\"Forgetting to call flush()\",\"Changing file extension incorrectly\",\"Misunderstanding attachReporter usage\"],\"subject\":\"selenium_java\",\"pattern\":\"Extent report customization\",\"category\":\"Software Testing \u0026 QA\",\"question_format\":\"MCQ\",\"question_mode\":\"debug\",\"difficulty\":\"medium\",\"topic\":\"Reporting\",\"type\":\"Software Testing \u0026 QA\",\"question_type\":\"debug\",\"level\":\"medium\",\"test_type\":\"puzzle\",\"pattern_id\":\"selenium_java_extent_report_customization\",\"subjectTitle\":\"Selenium Java\",\"part\":\"part-3\",\"set_no\":1,\"usage_count\":0,\"topic_id\":\"selenium_java_p3_t3\"},{\"_id\":\"69b1786945baa2b585489ab4\",\"question_number\":5,\"question\":\"You want to add system information like OS and Java version to your Extent report. Which code snippet correctly adds this info before flushing the report?\u003cbr\u003e\u003cpre\u003eExtentReports extent = new ExtentReports();\\nExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(\\\"sysInfoReport.html\\\");\\nextent.attachReporter(htmlReporter);\\n// Add system info here\\nextent.flush();\u003c/pre\u003e\",\"options\":{\"A\":\"htmlReporter.setSystemInfo(\\\"OS\\\", System.getProperty(\\\"os.name\\\"));\\nhtmlReporter.setSystemInfo(\\\"Java Version\\\", System.getProperty(\\\"java.version\\\"));\",\"B\":\"extent.addSystemInfo(\\\"OS\\\", System.getProperty(\\\"os.name\\\"));\\nextent.addSystemInfo(\\\"Java Version\\\", System.getProperty(\\\"java.version\\\"));\",\"C\":\"extent.setSystemInfo(\\\"OS\\\", System.getProperty(\\\"os.name\\\"));\\nextent.setSystemInfo(\\\"Java Version\\\", System.getProperty(\\\"java.version\\\"));\",\"D\":\"htmlReporter.addSystemInfo(\\\"OS\\\", System.getProperty(\\\"os.name\\\"));\\nhtmlReporter.addSystemInfo(\\\"Java Version\\\", System.getProperty(\\\"java.version\\\"));\"},\"correct_answer\":[\"B\"],\"solution_explanation\":\"\u003cdiv class='solution-box'\u003e\u003cspan class='solution-label'\u003e\u003cstrong\u003eSolution:\u003c/strong\u003e\u003c/span\u003e\u003col\u003e\u003cli\u003e\u003ch4\u003eStep 1: Identify correct method to add system info\u003c/h4\u003eExtentReports class has addSystemInfo method to add info.\u003c/li\u003e\u003cli\u003e\u003ch4\u003eStep 2: Confirm usage on ExtentReports instance\u003c/h4\u003eSystem info is added on extent, not on htmlReporter.\u003c/li\u003e\u003cli\u003e\u003ch4\u003eFinal Answer:\u003c/h4\u003e\u003cstrong\u003eextent.addSystemInfo(\\\"OS\\\", System.getProperty(\\\"os.name\\\"));\\nextent.addSystemInfo(\\\"Java Version\\\", System.getProperty(\\\"java.version\\\"));\u003c/strong\u003e -\u003e Option B\u003c/li\u003e\u003cli\u003e\u003ch4\u003eQuick Check:\u003c/h4\u003eUse extent.addSystemInfo() before flush [OK]\u003c/li\u003e\u003c/ol\u003e\u003c/div\u003e\",\"quick_trick\":\"Add system info on extent, not htmlReporter [OK]\",\"common_mistakes\":[\"Calling setSystemInfo on htmlReporter instead of extent\",\"Using setSystemInfo which does not exist\",\"Adding system info after flush()\"],\"subject\":\"selenium_java\",\"pattern\":\"Extent report customization\",\"category\":\"Software Testing \u0026 QA\",\"question_format\":\"MCQ\",\"question_mode\":\"application\",\"difficulty\":\"hard\",\"topic\":\"Reporting\",\"type\":\"Software Testing \u0026 QA\",\"question_type\":\"application\",\"level\":\"hard\",\"test_type\":\"puzzle\",\"pattern_id\":\"selenium_java_extent_report_customization\",\"subjectTitle\":\"Selenium Java\",\"part\":\"part-3\",\"set_no\":1,\"usage_count\":1,\"last_used_at\":\"2026-06-19T16:32:03.614Z\",\"topic_id\":\"selenium_java_p3_t3\"}]},\"syllabusData\":{\"part\":\"part-3\",\"subject\":\"selenium_java\",\"difficulty\":\"advanced\",\"metadata\":{\"total_topics\":6,\"total_patterns\":44,\"patterns_with_content\":44,\"created_at\":\"2026-03-03T15:53:11.167760Z\",\"version\":\"4.2\",\"upload_tool\":\"upload_to_mongo.py v2.0\"},\"part_title\":\"Advanced\",\"subjectTitle\":\"Selenium Java\",\"topics\":[{\"topic_id\":\"selenium_java_p3_t1\",\"title\":\"Data-Driven Testing\",\"order\":1,\"pattern_count\":6,\"patterns\":[{\"pattern_id\":\"selenium_java_why_data_separation_improves_test_coverage\",\"title\":\"Why data separation improves test coverage\",\"order\":1,\"has_content\":true},{\"pattern_id\":\"selenium_java_excel_data_reading_apache_poi\",\"title\":\"Excel data reading (Apache POI)\",\"order\":2,\"has_content\":true},{\"pattern_id\":\"selenium_java_csv_data_reading\",\"title\":\"CSV data reading\",\"order\":3,\"has_content\":true},{\"pattern_id\":\"selenium_java_json_test_data\",\"title\":\"JSON test data\",\"order\":4,\"has_content\":true},{\"pattern_id\":\"selenium_java_dataprovider_with_external_data\",\"title\":\"DataProvider with external data\",\"order\":5,\"has_content\":true},{\"pattern_id\":\"selenium_java_properties_file_for_configuration\",\"title\":\"Properties file for configuration\",\"order\":6,\"has_content\":true}]},{\"topic_id\":\"selenium_java_p3_t2\",\"title\":\"Cross-Browser and Grid\",\"order\":2,\"pattern_count\":8,\"patterns\":[{\"pattern_id\":\"selenium_java_why_multibrowser_testing_ensures_reach\",\"title\":\"Why multi-browser testing ensures reach\",\"order\":1,\"has_content\":true},{\"pattern_id\":\"selenium_java_chromeoptions_configuration\",\"title\":\"ChromeOptions configuration\",\"order\":2,\"has_content\":true},{\"pattern_id\":\"selenium_java_firefoxoptions_configuration\",\"title\":\"FirefoxOptions configuration\",\"order\":3,\"has_content\":true},{\"pattern_id\":\"selenium_java_edgeoptions_configuration\",\"title\":\"EdgeOptions configuration\",\"order\":4,\"has_content\":true},{\"pattern_id\":\"selenium_java_headless_execution\",\"title\":\"Headless execution\",\"order\":5,\"has_content\":true},{\"pattern_id\":\"selenium_java_selenium_grid_setup\",\"title\":\"Selenium Grid setup\",\"order\":6,\"has_content\":true},{\"pattern_id\":\"selenium_java_remotewebdriver_usage\",\"title\":\"RemoteWebDriver usage\",\"order\":7,\"has_content\":true},{\"pattern_id\":\"selenium_java_docker_selenium_grid\",\"title\":\"Docker Selenium Grid\",\"order\":8,\"has_content\":true}]},{\"topic_id\":\"selenium_java_p3_t3\",\"title\":\"Reporting\",\"order\":3,\"pattern_count\":7,\"patterns\":[{\"pattern_id\":\"selenium_java_why_reports_communicate_test_results\",\"title\":\"Why reports communicate test results\",\"order\":1,\"has_content\":true},{\"pattern_id\":\"selenium_java_extent_reports_setup\",\"title\":\"Extent Reports setup\",\"order\":2,\"has_content\":true},{\"pattern_id\":\"selenium_java_logging_test_steps\",\"title\":\"Logging test steps\",\"order\":3,\"has_content\":true},{\"pattern_id\":\"selenium_java_screenshot_attachment_on_failure\",\"title\":\"Screenshot attachment on failure\",\"order\":4,\"has_content\":true},{\"pattern_id\":\"selenium_java_extent_report_customization\",\"title\":\"Extent report customization\",\"order\":5,\"has_content\":true},{\"pattern_id\":\"selenium_java_allure_reporting_integration\",\"title\":\"Allure reporting integration\",\"order\":6,\"has_content\":true},{\"pattern_id\":\"selenium_java_testng_default_reports\",\"title\":\"TestNG default reports\",\"order\":7,\"has_content\":true}]},{\"topic_id\":\"selenium_java_p3_t4\",\"title\":\"Framework Design Patterns\",\"order\":4,\"pattern_count\":8,\"patterns\":[{\"pattern_id\":\"selenium_java_why_framework_design_enables_scalability\",\"title\":\"Why framework design enables scalability\",\"order\":1,\"has_content\":true},{\"pattern_id\":\"selenium_java_hybrid_framework_architecture\",\"title\":\"Hybrid framework architecture\",\"order\":2,\"has_content\":true},{\"pattern_id\":\"selenium_java_configuration_management\",\"title\":\"Configuration management\",\"order\":3,\"has_content\":true},{\"pattern_id\":\"selenium_java_utility_classes\",\"title\":\"Utility classes\",\"order\":4,\"has_content\":true},{\"pattern_id\":\"selenium_java_custom_annotations\",\"title\":\"Custom annotations\",\"order\":5,\"has_content\":true},{\"pattern_id\":\"selenium_java_retry_analyzer_for_failures\",\"title\":\"Retry analyzer for failures\",\"order\":6,\"has_content\":true},{\"pattern_id\":\"selenium_java_logging_with_log4j\",\"title\":\"Logging with Log4j\",\"order\":7,\"has_content\":true},{\"pattern_id\":\"selenium_java_base_test_class_pattern\",\"title\":\"Base test class pattern\",\"order\":8,\"has_content\":true}]},{\"topic_id\":\"selenium_java_p3_t5\",\"title\":\"Advanced Techniques\",\"order\":5,\"pattern_count\":7,\"patterns\":[{\"pattern_id\":\"selenium_java_why_advanced_skills_handle_complex_scenarios\",\"title\":\"Why advanced skills handle complex scenarios\",\"order\":1,\"has_content\":true},{\"pattern_id\":\"selenium_java_cookie_management\",\"title\":\"Cookie management\",\"order\":2,\"has_content\":true},{\"pattern_id\":\"selenium_java_file_download_handling\",\"title\":\"File download handling\",\"order\":3,\"has_content\":true},{\"pattern_id\":\"selenium_java_browser_profile_management\",\"title\":\"Browser profile management\",\"order\":4,\"has_content\":true},{\"pattern_id\":\"selenium_java_network_interception_cdp\",\"title\":\"Network interception (CDP)\",\"order\":5,\"has_content\":true},{\"pattern_id\":\"selenium_java_performance_metrics_via_devtools\",\"title\":\"Performance metrics via DevTools\",\"order\":6,\"has_content\":true},{\"pattern_id\":\"selenium_java_shadow_dom_element_access\",\"title\":\"Shadow DOM element access\",\"order\":7,\"has_content\":true}]},{\"topic_id\":\"selenium_java_p3_t6\",\"title\":\"CI/CD Integration\",\"order\":6,\"pattern_count\":8,\"patterns\":[{\"pattern_id\":\"selenium_java_why_ci_integration_enables_continuous_testing\",\"title\":\"Why CI integration enables continuous testing\",\"order\":1,\"has_content\":true},{\"pattern_id\":\"selenium_java_maven_build_lifecycle\",\"title\":\"Maven build lifecycle\",\"order\":2,\"has_content\":true},{\"pattern_id\":\"selenium_java_running_tests_via_maven\",\"title\":\"Running tests via Maven\",\"order\":3,\"has_content\":true},{\"pattern_id\":\"selenium_java_jenkins_pipeline_integration\",\"title\":\"Jenkins pipeline integration\",\"order\":4,\"has_content\":true},{\"pattern_id\":\"selenium_java_github_actions_configuration\",\"title\":\"GitHub Actions configuration\",\"order\":5,\"has_content\":true},{\"pattern_id\":\"selenium_java_docker_execution_environment\",\"title\":\"Docker execution environment\",\"order\":6,\"has_content\":true},{\"pattern_id\":\"selenium_java_test_parallelization_in_ci\",\"title\":\"Test parallelization in CI\",\"order\":7,\"has_content\":true},{\"pattern_id\":\"selenium_java_report_publishing_in_ci\",\"title\":\"Report publishing in CI\",\"order\":8,\"has_content\":true}]}]},\"modeCode\":\"DLM\",\"productId\":\"codefly\"}]]\n"])</script><script>self.__next_f.push([1,"18:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Extent report customization in Selenium Java - Deep Dive: Internals \u0026 How It Works | Leyaa.ai\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Go deep on Extent report customization in Selenium Java. Internals, mental models, under-the-hood mechanics, misconceptions, common pitfalls, and production patterns. For serious learners.\"}],[\"$\",\"meta\",\"4\",{\"name\":\"author\",\"content\":\"Leyaa.ai\"}],[\"$\",\"link\",\"5\",{\"rel\":\"manifest\",\"href\":\"/manifest.json\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"6\",{\"name\":\"keywords\",\"content\":\"learning intelligence,AI learning,personalized learning,adaptive learning,study guide,exam preparation,learning platform,education technology,edtech,smart learning\"}],[\"$\",\"meta\",\"7\",{\"name\":\"creator\",\"content\":\"Leyaa.ai\"}],[\"$\",\"meta\",\"8\",{\"name\":\"publisher\",\"content\":\"Leyaa.ai\"}],[\"$\",\"meta\",\"9\",{\"name\":\"robots\",\"content\":\"index, follow\"}],[\"$\",\"meta\",\"10\",{\"name\":\"googlebot\",\"content\":\"index, follow, max-image-preview:large, max-snippet:-1\"}],[\"$\",\"meta\",\"11\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"12\",{\"name\":\"content-language\",\"content\":\"en\"}],[\"$\",\"link\",\"13\",{\"rel\":\"canonical\",\"href\":\"https://leyaa.ai/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/deep\"}],[\"$\",\"link\",\"14\",{\"rel\":\"alternate\",\"hrefLang\":\"en\",\"href\":\"https://leyaa.ai/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/deep\"}],[\"$\",\"link\",\"15\",{\"rel\":\"alternate\",\"hrefLang\":\"x-default\",\"href\":\"https://leyaa.ai/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/deep\"}],[\"$\",\"meta\",\"16\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"17\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Leyaa\"}],[\"$\",\"meta\",\"18\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"default\"}],[\"$\",\"meta\",\"19\",{\"property\":\"og:title\",\"content\":\"Extent report customization in Selenium Java - Deep Dive: Internals \u0026 How It Works | Leyaa.ai\"}],[\"$\",\"meta\",\"20\",{\"property\":\"og:description\",\"content\":\"Go deep on Extent report customization in Selenium Java. Internals, mental models, under-the-hood mechanics, misconceptions, common pitfalls, and production patterns. For serious learners.\"}],[\"$\",\"meta\",\"21\",{\"property\":\"og:url\",\"content\":\"https://leyaa.ai/codefly/learn/selenium-java/part-3/selenium-java-extent-report-customization/deep\"}],[\"$\",\"meta\",\"22\",{\"property\":\"og:locale\",\"content\":\"en_US\"}],[\"$\",\"meta\",\"23\",{\"property\":\"og:image\",\"content\":\"https://leyaa.ai/Assets/metaImages/leyaa-preview-image.png\"}],[\"$\",\"meta\",\"24\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"25\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"26\",{\"property\":\"og:image:alt\",\"content\":\"Extent report customization in Selenium Java - Deep Dive: Internals \u0026 How It Works\"}],[\"$\",\"meta\",\"27\",{\"property\":\"og:type\",\"content\":\"article\"}],[\"$\",\"meta\",\"28\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"29\",{\"name\":\"twitter:site\",\"content\":\"@leyaaai\"}],[\"$\",\"meta\",\"30\",{\"name\":\"twitter:creator\",\"content\":\"@leyaaai\"}],[\"$\",\"meta\",\"31\",{\"name\":\"twitter:title\",\"content\":\"Extent report customization in Selenium Java - Deep Dive: Internals \u0026 How It Works | Leyaa.ai\"}],[\"$\",\"meta\",\"32\",{\"name\":\"twitter:description\",\"content\":\"Go deep on Extent report customization in Selenium Java. Internals, mental models, under-the-hood mechanics, misconceptions, common pitfalls, and production patterns. For serious learners.\"}],[\"$\",\"meta\",\"33\",{\"name\":\"twitter:image\",\"content\":\"https://leyaa.ai/Assets/metaImages/leyaa-preview-image.png\"}],[\"$\",\"link\",\"34\",{\"rel\":\"icon\",\"href\":\"/leyaa-logo.png\"}],[\"$\",\"link\",\"35\",{\"rel\":\"apple-touch-icon\",\"href\":\"https://leyaa.ai/Assets/Favicons/apple-touch-icon.png\"}],[\"$\",\"meta\",\"36\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"a:null\n"])</script></body></html>