JGiven icon indicating copy to clipboard operation
JGiven copied to clipboard

adding an HTTP link to a step

Open adrian-herscu opened this issue 1 year ago • 3 comments

Besides attachments, is it possible to add some arbitrary HTML to a step? For example an HTTP link to a step?

I would like for certain steps, namely Given step that establishes a Selenium session, to add a link for a video recording of that session, for example on SauceLabs.

Here is an example report: https://qa-automation-starter.aherscu.dev/qa-testing-parent/qa-testing-example/jgiven-reports/functional-dev/local/html/index.html#/all

The Given google <driver> step has two plain text attachements containing Selenium session information. I would like to add a link to video recording, in addition or in place of these attachments.

adrian-herscu avatar Jul 30 '23 07:07 adrian-herscu

Hi @adrian-herscu, if I recall correctly, we handle attachments more or less as arbitrary bytes, although we might make some assumptions about the possible MIME types. I'd need to look into the code exactly.

Please keep in mind that it is holiday season, so response might be a bit slow at the moment.

l-1squared avatar Aug 01 '23 04:08 l-1squared

short answer ( I haven't reviewed your request fully); but you s[hould at least be able to attach videos. there is a corresponding media type in the MediaType.java: /** * Creates a binary video media type with the given subtype. */ public static MediaType video( String subType ) { return binary( VIDEO, subType ); }`

l-1squared avatar Aug 02 '23 04:08 l-1squared

Yes, saw that... As far as I understand it means that the video will be embedded. That's not good. The report file will be very big and there will be no controls. I just want a link to the video as recorded by an external Selenium provider (e.g. SauceLabs).

On Wed, 2 Aug 2023, 07:49 l-1squared, @.***> wrote:

short answer ( I haven't reviewed your request fully); but you should at least be able to attach videos. there is a corresponding media type in the MediaType.java

/**

  • Creates a binary video media type with the given subtype. */ public static MediaType video( String subType ) { return binary( VIDEO, subType ); }

— Reply to this email directly, view it on GitHub https://github.com/TNG/JGiven/issues/1356#issuecomment-1661491029, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAW3SQO4UGHTU2GEXGDI3DLXTHL6PANCNFSM6AAAAAA25AKFWU . You are receiving this because you were mentioned.Message ID: @.***>

adrian-herscu avatar Aug 02 '23 06:08 adrian-herscu