Request and response logging in Extent Report.

1,288 views
Skip to first unread message

akash kansal

unread,
Sep 25, 2018, 3:32:09 AM9/25/18
to REST assured
I am not able to get the RestAssured logs to be printed in Extent Report or in a string format.

Is there any way to do that.

Johan Haleby

unread,
Sep 25, 2018, 4:51:00 AM9/25/18
to rest-a...@googlegroups.com
Hi,

You can trigger logging by doing given().log().all(). .. then().log().all()

On Tue, Sep 25, 2018 at 9:32 AM akash kansal <akashka...@gmail.com> wrote:
I am not able to get the RestAssured logs to be printed in Extent Report or in a string format.

Is there any way to do that.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

akash kansal

unread,
Sep 25, 2018, 5:39:12 AM9/25/18
to rest-a...@googlegroups.com
Hi,

Thanks Buddy.
But, I am not asking about trigger.

I want to store the value comes after trigger in a String instead of a console.

On Tue, Sep 25, 2018 at 2:19 PM, Johan Haleby <johan....@gmail.com> wrote:
Hi,

You can trigger logging by doing given().log().all(). .. then().log().all()
On Tue, Sep 25, 2018 at 9:32 AM akash kansal <akashka...@gmail.com> wrote:
I am not able to get the RestAssured logs to be printed in Extent Report or in a string format.

Is there any way to do that.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.

Johan Haleby

unread,
Sep 25, 2018, 5:46:30 AM9/25/18
to rest-a...@googlegroups.com
You can have a look at the test cases in https://github.com/rest-assured/rest-assured/blob/master/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/LoggingITest.java for examples. This is such a common question that I should probably blog about it at some point :)

On Tue, Sep 25, 2018 at 11:39 AM akash kansal <akashka...@gmail.com> wrote:
Hi,

Thanks Buddy.
But, I am not asking about trigger.

I want to store the value comes after trigger in a String instead of a console.
On Tue, Sep 25, 2018 at 2:19 PM, Johan Haleby <johan....@gmail.com> wrote:
Hi,

You can trigger logging by doing given().log().all(). .. then().log().all()
On Tue, Sep 25, 2018 at 9:32 AM akash kansal <akashka...@gmail.com> wrote:
I am not able to get the RestAssured logs to be printed in Extent Report or in a string format.

Is there any way to do that.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.

akash kansal

unread,
Sep 25, 2018, 6:45:30 AM9/25/18
to rest-a...@googlegroups.com
Thanks....

On Tue, Sep 25, 2018 at 3:16 PM, Johan Haleby <johan....@gmail.com> wrote:
You can have a look at the test cases in https://github.com/rest-assured/rest-assured/blob/master/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/LoggingITest.java for examples. This is such a common question that I should probably blog about it at some point :)
On Tue, Sep 25, 2018 at 11:39 AM akash kansal <akashka...@gmail.com> wrote:
Hi,

Thanks Buddy.
But, I am not asking about trigger.

I want to store the value comes after trigger in a String instead of a console.
On Tue, Sep 25, 2018 at 2:19 PM, Johan Haleby <johan....@gmail.com> wrote:
Hi,

You can trigger logging by doing given().log().all(). .. then().log().all()
On Tue, Sep 25, 2018 at 9:32 AM akash kansal <akashka...@gmail.com> wrote:
I am not able to get the RestAssured logs to be printed in Extent Report or in a string format.

Is there any way to do that.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured+unsubscribe@googlegroups.com.

abhimanyu raj

unread,
Jul 15, 2020, 3:15:29 PM7/15/20
to REST assured
Were you able to achieve it, I am implementing the same scenario but unable to do it .


On Tuesday, September 25, 2018 at 4:15:30 PM UTC+5:30, akash kansal wrote:
Thanks....

On Tue, Sep 25, 2018 at 3:16 PM, Johan Haleby <johan...@gmail.com> wrote:
You can have a look at the test cases in https://github.com/rest-assured/rest-assured/blob/master/examples/rest-assured-itest-java/src/test/java/io/restassured/itest/java/LoggingITest.java for examples. This is such a common question that I should probably blog about it at some point :)
On Tue, Sep 25, 2018 at 11:39 AM akash kansal <akashka...@gmail.com> wrote:
Hi,

Thanks Buddy.
But, I am not asking about trigger.

I want to store the value comes after trigger in a String instead of a console.
On Tue, Sep 25, 2018 at 2:19 PM, Johan Haleby <johan...@gmail.com> wrote:
Hi,

You can trigger logging by doing given().log().all(). .. then().log().all()
On Tue, Sep 25, 2018 at 9:32 AM akash kansal <akashka...@gmail.com> wrote:
I am not able to get the RestAssured logs to be printed in Extent Report or in a string format.

Is there any way to do that.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-a...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-a...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-a...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-a...@googlegroups.com.

Andrei Stoica

unread,
Aug 10, 2020, 3:32:24 PM8/10/20
to REST assured
Hey, look at this article on how to log the Request and Response to log4j2. Maybe it helps.
Reply all
Reply to author
Forward
0 new messages