Skip to content

Conversation

@artsok
Copy link

@artsok artsok commented Oct 15, 2019

Context

When QAs check Allure reports, they want to see the time in the attachment when HTTP requests or responses made. I clearly understand that they could check Jenkin's log, but it's not useful and has time-consuming.
For that reason, I added a request/response time to HTTP attachment. Look like:

image

Checklist

@baev
Copy link
Member

baev commented Oct 15, 2019

what about zone? Often server that run tests located in different time zone, so you'll get wrong time

@artsok
Copy link
Author

artsok commented Oct 16, 2019

@baev

Yep, I think ZonedDateTime.now(ZoneId.systemDefault()) will be better. Like this: 2019-10-16T13:58:47.540+03:00[Europe/Moscow]

What do you think? Maybe you have another thought about how to make correctly?

@baev
Copy link
Member

baev commented Dec 9, 2019

Sorry for the delay

I think it would be actually better to use timestamp in epoch milliseconds (as a Long Java type) for request/response times.

Then you can use freemarker ?number_to_datetime function to pretty print date. https://freemarker.apache.org/docs/ref_builtins_expert.html#ref_builtin_numToDate

That will add possibility to use different time representation for users with custom request/response templates

Then, it would be nice to have a possibility to set request/response timings by passing value to the builder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants