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 timestamps to the HTML reports #2027

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

pit1sIBM
Copy link
Contributor

@pit1sIBM pit1sIBM commented Oct 9, 2023

Issue: #1983

Adds an i64 timestamp to the HurlResult struct for use in HTML reports to report local start time of each file.

Result looks like:

❯ echo "GET https://example.com" | ./target/release/hurl --test --report-html out
-: Running [1/1]
-: Success (1 request(s) in 83 ms)
--------------------------------------------------------------------------------
Executed files:  1
Succeeded files: 1 (100.0%)
Failed files:    0 (0.0%)
Duration:        93 ms

image

Reports are still updated

❯ echo "GET https://example.com" | ./target/release/hurl --test --report-html out
-: Running [1/1]
-: Success (1 request(s) in 75 ms)
--------------------------------------------------------------------------------
Executed files:  1
Succeeded files: 1 (100.0%)
Failed files:    0 (0.0%)
Duration:        81 ms

❯ echo "GET https://example.com" | ./target/release/hurl --test --report-html out
-: Running [1/1]
-: Success (1 request(s) in 62 ms)
--------------------------------------------------------------------------------
Executed files:  1
Succeeded files: 1 (100.0%)
Failed files:    0 (0.0%)
Duration:        65 ms

image

For reports created before this change, the timestamp defaults to 0 internally and the report shows a -

echo "GET https://example.com" | hurl --test --report-html out
-: Running [1/1]
-: Success (1 request(s) in 67 ms)
--------------------------------------------------------------------------------
Executed files:  1
Succeeded files: 1 (100.0%)
Failed files:    0 (0.0%)
Duration:        76 ms

echo "GET https://example.com" | ./target/release/hurl --test --report-html out
-: Running [1/1]
-: Success (1 request(s) in 69 ms)
--------------------------------------------------------------------------------
Executed files:  1
Succeeded files: 1 (100.0%)
Failed files:    0 (0.0%)
Duration:        73 ms

image

@jcamiel
Copy link
Collaborator

jcamiel commented Oct 9, 2023

Thanks for the PR @pit1sIBM. To appease our CI, we need all the commits to be signed (you can check CONTRIBUTING.md). You can see how to do this here , your commit should display a "verified" tag:

verified-commit

@pit1sIBM pit1sIBM force-pushed the html-report-datetime branch from fe65160 to e04c4e4 Compare October 9, 2023 14:26
@pit1sIBM
Copy link
Contributor Author

pit1sIBM commented Oct 9, 2023

Thanks @jcamiel, should be fixed now.

I had some issues with the integration tests locally that I'm looking into but all the cargo commands here in the contribution guide passed

@pit1sIBM
Copy link
Contributor Author

pit1sIBM commented Oct 9, 2023

Missed a crate update, updated the branch

@pit1sIBM pit1sIBM force-pushed the html-report-datetime branch from e04c4e4 to f2e4023 Compare October 9, 2023 15:04
@jcamiel
Copy link
Collaborator

jcamiel commented Oct 9, 2023

@pit1sIBM thanks for the rebase, you haven't to do this, the CI can handle this. Thanks anyway !

@jcamiel
Copy link
Collaborator

jcamiel commented Oct 9, 2023

/accept

@hurl-bot
Copy link
Collaborator

hurl-bot commented Oct 9, 2023

🕗 /accept is running, please wait for completion.

@hurl-bot
Copy link
Collaborator

hurl-bot commented Oct 9, 2023

✅ Pull request merged and closed by jcamiel with fast forward merge..

# List of commits merged from pit1sIBM/hurl/html-report-datetime branch into Orange-OpenSource/hurl/master branch:

  • f2e4023 add timestamps to HTML reports

@hurl-bot hurl-bot closed this Oct 9, 2023
@hurl-bot hurl-bot merged commit f2e4023 into Orange-OpenSource:master Oct 9, 2023
18 checks passed
@jcamiel
Copy link
Collaborator

jcamiel commented Oct 9, 2023

Thanks for the PR @pit1sIBM it's merged!

@pit1sIBM pit1sIBM deleted the html-report-datetime branch October 9, 2023 16:09
@jcamiel jcamiel changed the title add timestamps to the HTML reports Add timestamps to the HTML reports Oct 9, 2023
@jcamiel jcamiel linked an issue Oct 17, 2023 that may be closed by this pull request
1 task
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.

Feature Request: Add timestamps to reports to distinguish when tests are run
3 participants