multiple-cucumber-html-reporter icon indicating copy to clipboard operation
multiple-cucumber-html-reporter copied to clipboard

Can i insert video tag as an attachment with in my scenario/feature ?

Open siddharthsid opened this issue 4 years ago • 8 comments

Hi team,

I have a video recording which is done as part of After Hooks and i want to attach it with my scenario.

My tag would look like

<video width="320" height="240" controls> <source src="PATH_TO_VIDEO" type="video/mp4"> </video>

Is there a way I can insert such tag?

siddharthsid avatar Nov 12 '21 10:11 siddharthsid

Hmm, good one, never thought about this. Where would you like to put this, in the embeddings?

wswebcreation avatar Nov 22 '21 06:11 wswebcreation

yes in the embeddings embeddings: [ { data: , mime_type: "text/plain", }, ],

siddharthsid avatar Nov 22 '21 09:11 siddharthsid

That would be possible, we only need to find a way to distinguish that embeddings: [ { data: , mime_type: "text/plain", }, ], is for a video tag instead of plain text. How do you normally use that?

wswebcreation avatar Nov 23 '21 07:11 wswebcreation

Some other reporters like https://github.com/damianszczepanik/cucumber-reporting offer video import, this would be a nice feature to implement.

Yohandah avatar Mar 07 '22 10:03 Yohandah

Hi @Yohandah

Feel free to open a PR 😉

wswebcreation avatar Mar 07 '22 10:03 wswebcreation

@siddharthsid what is preventing this from working currently ? i have kind of the same problem but stucked because of https://github.com/WasiqB/multiple-cucumber-html-reporter/issues/46

in our json we have:

embedding: [
  { 
    "data": "PHZpZGVvIGNvbnRyb2xzIHNyYz0iaHR0cHM6Ly9hdXRvbWF0ZS5icm93c2Vyc3RhY2suY29tL3Nlc3Npb25zLzEyNDIzMjM0MjQyIiBzdHlsZT0id2lkdGg6MTAwJSIvPg==",
    "mime_type": "text/html"
  }
]

it works with jenkins reporter for e.g and cucumber-reporting also, because it decode this base64 string that finaly is rendered as:

<video controls src="https://automate.browserstack.com/sessions/12423234242" style="width:100%"/>

fadomire avatar Mar 13 '23 11:03 fadomire

would be very nice to integrate with the video reporter

a7madgamal avatar Aug 07 '23 12:08 a7madgamal