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 failure detail on html report #1286

Closed
lepapareil opened this issue Feb 15, 2023 · 1 comment · Fixed by #1437
Closed

Add failure detail on html report #1286

lepapareil opened this issue Feb 15, 2023 · 1 comment · Fixed by #1437
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@lepapareil
Copy link
Collaborator

Actual

image

Proposal

image

@lepapareil lepapareil added the enhancement New feature or request label Feb 15, 2023
@jcamiel
Copy link
Collaborator

jcamiel commented Feb 15, 2023

I think we should revisit the way we construct our HTML report. Currently, if you run:

$ hurl --test --report-html /tmp a.hurl a.hurl a.hurl

We produce the following report:
Screenshot 2023-02-15 at 21 30 18

Each of the three links is pointing to the same file. If we want to display error in the Hurl files, or if we want to have statistics for each of the files, we need to decorrelate the HTML filename with the Hurl filename (it's really the ghost of #521 which is coming back 😅).

A better way would be to use a kind of unique id (@jleverenz proposed a hash but I think a uuid would be better suited).

For instance, the following command:

$ hurl --test --report-html /tmp a.hurl a.hurl a.hurl

Would produce this structure:

/tmp
├── index.html
└── store
    ├── c7fc2dc6-86f7-4009-abfb-21f2e54599a2.html
    ├── e32206a1-67b3-4d40-b325-aaa6cf3fda7a.html
    └── eebf6799-55b0-4793-97ab-38af3fdf3bc7.html

We would not need to normalize the filename anymore, and for instance, we could also add run with the standard input:

$ echo 'HEAD https://hurl.dev' | hurl --test --report-html /tmp
$ echo 'HEAD https://hurl.dev' | hurl --test --report-html /tmp

Will just add two more files to the store:

/tmp
├── index.html
└── store
    ├── 1d785bc8-a884-476f-a306-196beffe4d36.html
    ├── c7fc2dc6-86f7-4009-abfb-21f2e54599a2.html
    ├── dc515444-55aa-4e90-8df3-3685448353ed.html
    ├── e32206a1-67b3-4d40-b325-aaa6cf3fda7a.html
    └── eebf6799-55b0-4793-97ab-38af3fdf3bc7.html

(It will also fixes issues with Windows #1285 btw)

@fabricereix fabricereix added this to the 3.0.0 milestone Apr 7, 2023
@jcamiel jcamiel linked a pull request Apr 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants