Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add request and response time to HttpResponseAttachment/HttpRequestAttachment #397

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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.

None yet

2 participants