Closed parky128 closed 1 year ago
Currently no, because we cant add context per suite/spec file. Related issues: https://github.com/adamgruber/mochawesome-report-generator/issues/124 https://github.com/adamgruber/mochawesome-report-generator/issues/150
Hi @LironEr
Instead of waiting for the context for suite. I thought of adding a test entry (provided below) in tests array, after cypress execution just like enhanceReport function updating the context, here I'm adding a test entry.
When using file name I'm able to see the video in the HTML file, but I had to share the video along with the html report.
Could you please suggest a way to add the video in the embedded format. I tried some ways they didn't worked.
suitesMap.forEach((suiteEntry) => { suiteEntry.tests.push({ title: "Execution Video", fullTitle: "Test Execution Video", timedOut: null, duration: 1, state: "passed", speed: "fast", pass: true, fail: false, pending: false, context: JSON.stringify({ title: "Execution video", value: videoDetails.embeddings.data }), code: "", err: {}, uuid: "f4c9b97d-f7cc-45e3-a383-852df0eec2d2", parentUUID: "b43632da-b240-4fe7-a130-c29065bd5f87", isHook: false, skipped: false }) })
hi @LironEr , any progress in this?
Currently no, because we cant add context per suite/spec file. Related issues: adamgruber/mochawesome-report-generator#124 adamgruber/mochawesome-report-generator#150
@mudit94 unfortunately no
Hi, Could we try again I see it is config for it https://glebbahmutov.com/blog/the-awesome-battle/
So it seems that Bahmutov embeds the video file for the whole suite to the test(s) that fail. :thumbsdown: Same videofile might be embedded on several failed tests :thumbsdown: Videofile for failed tests will contain alot more tests than the one you are looking for :thumbsup: Embedded videofile 👏🏼
This feels like were making some progress at last!
Gave it a try with #137 , give it a look and let me know what you think 😸 Actually think its works quite well if you don't mind me saying so...
One of the challenges was that there is no Videos-api in Cypress from which to get the file locations from. This doesn't cause a problem in Bahmutov's example, but he also doesn't organized his tests into any subfolders. Once you have a folder-structure, it complicates things. I found a way on rosettacode.org to extrapolate which folder is the supposed base spec folder, in order to subtract the base spec folder directories from the relative path to the spec files (which leaves the spec name with any sub-folders intact). Then just simply adding .mp4.
Also, I made the decision to add the spec-video files generated to all tests in the spec. Since it all links to the same file and the video shows the tests for the entire spec-file, I thought it to be less confusing that all the tests in the spec has the same video file, rather than just the failed ones...
Discuss guys 👂🏼
Hi, is it possible to get video's embedded as links or something similar into the generated HTML report?
Thanks