Improve extent report to show failures without Java errors

Viewed 205

I implemented extent reports in my Java project. And this is how my Cucumber test runner file looks like -

@RunWith(Cucumber.class)
@CucumberOptions(
        features = "src/test/resources/features",
        tags = "@Test",
        monochrome = true,
        plugin = {"pretty",
                "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:",
                "timeline:test-output-thread/" }
)
public class CucumberTestDebugger {
}

My extent report shows a lot of failure text in the report. Which is not needed as a user.

org.opentest4j.MultipleFailuresError: Multiple Failures (3 failures)
    Multiple Failures (2 failures)
    other_inst_ident doesn't match for match_key:PLCHS258Q463 ==> expected: <A> but was: <A1>
    rep_nom_curr doesn't match for match_key:PLCHS258Q463 ==> expected: <W> but was: <W1>
    Multiple Failures (1 failure)
    other_inst_ident doesn't match for match_key:PLLBL03A33J6 ==> expected: <B> but was: <B2>
    Multiple Failures (3 failures)
    book_base_ent_cd doesn't match for match_key:US36156HAX61 ==> expected: <4> but was: <44>
    other_inst_ident doesn't match for match_key:US36156HAX61 ==> expected: <D> but was: <D4>
    rep_nom_curr doesn't match for match_key:US36156HAX61 ==> expected: <Z> but was: <Z4>
    at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
    at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
    at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:2875)
    at com.ing.vortex.stepdefinitions.shs.ExportComparison.printDummyLine(ExportComparison.java:33)
    at ✽.export is 

.
.
.
. Another 800 lines

Is it possible to get only failure text in the report where actual mismatch is shown?

other_inst_ident doesn't match for match_key:PLCHS258Q463 ==> expected: <A> but was: <A1>
        rep_nom_curr doesn't match for match_key:PLCHS258Q463 ==> expected: <W> but was: <W1>
        Multiple Failures (1 failure)
        other_inst_ident doesn't match for match_key:PLLBL03A33J6 ==> expected: <B> but was: <B2>
        Multiple Failures (3 failures)
        book_base_ent_cd doesn't match for match_key:US36156HAX61 ==> expected: <4> but was: <44>
        other_inst_ident doesn't match for match_key:US36156HAX61 ==> expected: <D> but was: <D4>
        rep_nom_curr doesn't match for match_key:US36156HAX61 ==> expected: <Z> but was: <Z4>

Thanks in advance!!!

0 Answers
Related