I am looking for a way to compile the test step log and the assert error exception output together.
I'd like the assert error exception output is output right after the failed step log, not at the end of running all of scenarios.
+++ Expect output +++
>>>>>>>>>>> REQUEST >>>>>>>>>>>
GET health_check
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<< RESPONSE <<<<<<<<<<<
Status: HTTP/1.1 201 CREATED
Body: i am alive
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
java.lang.AssertionError: expected:<200> but was:<201>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.junit.Assert.assertEquals(Assert.java:542)
at com.ea.easo.ft.IdentityStepDefinitions.the_response_is(IdentityStepDefinitions.java:283)
at ✽.Then the response is "Ok"(com/ea/easo/ft/authentication.feature:15)
>>>>>>>>>>> REQUEST >>>>>>>>>>>
GET health_check
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<< RESPONSE <<<<<<<<<<<
Status: HTTP/1.1 404 NOT FOUND
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
java.lang.AssertionError: expected:<200> but was:<404>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.junit.Assert.assertEquals(Assert.java:542)
at com.ea.easo.ft.IdentityStepDefinitions.the_response_is(IdentityStepDefinitions.java:283)
at ✽.Then the response is "Ok"(com/ea/easo/ft/authentication.feature:15)
2 Scenarios
2 Steps ()
0m6.880s
+++ Current output +++
>>>>>>>>>>> REQUEST >>>>>>>>>>>
GET health_check
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<< RESPONSE <<<<<<<<<<<
Status: HTTP/1.1 201 CREATED
Body: i am alive
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>> REQUEST >>>>>>>>>>>
GET health_check
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<< RESPONSE <<<<<<<<<<<
Status: HTTP/1.1 404 NOT FOUND
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2 Scenarios
2 Steps ()
0m6.880s
java.lang.AssertionError: expected:<200> but was:<201>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.junit.Assert.assertEquals(Assert.java:542)
at com.ea.easo.ft.IdentityStepDefinitions.the_response_is(IdentityStepDefinitions.java:283)
at ✽.Then the response is "Ok"(com/ea/easo/ft/authentication.feature:15)
java.lang.AssertionError: expected:<200> but was:<404>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.junit.Assert.assertEquals(Assert.java:542)
at com.ea.easo.ft.IdentityStepDefinitions.the_response_is(IdentityStepDefinitions.java:283)
at ✽.Then the response is "Ok"(com/ea/easo/ft/authentication.feature:15)