wdio-video-reporter icon indicating copy to clipboard operation
wdio-video-reporter copied to clipboard

Possibility to record the test suite as one video

Open yuliswe opened this issue 4 years ago • 9 comments

My test suites are organized as such:

describe("place order from basket", () => {
    it("login", () => {
        browser.login_testuser()
    })

    it("go to /basket/delivery", () => {
        browser.urlAndWait("/basket/delivery")
    })

    it("click nextday", function() {
        $("input[name=delivery_method][value=nextday]").click()
    })

    it('fill [name="delivery_address"]', () => {
        $('[name="delivery_address"]').addValue(
            "XYZ Road"
        )
    })

...

Where each it is one user action. Right now each it generates a separate video. I'd like to know if it is possible to generate the video for the entire suite.

Thank you.

yuliswe avatar Feb 08 '21 04:02 yuliswe

I created a hack to get around this: https://github.com/ylilarry/wdio-video-reporter/pull/1/files Please feel free to take it.

yuliswe avatar Feb 08 '21 07:02 yuliswe

+1 on this, i would be interested in seeing the whole suite as a video also. Hope this makes its way upstream

jasonwilliams avatar Feb 22 '21 17:02 jasonwilliams

@ylilarry Would you mind opening a PR since there seems to be interest in this functionality? Ill try to have a look as soon as I can

presidenten avatar Feb 23 '21 09:02 presidenten

There are a few details that need to be discussed:

  1. How to determine the video file name
  2. What to do when two videos have the same name

My hack works for me because I deliberately made sure each suite contains one root describe that has a unique description.

However, a suite can be as such

describe('A', function() {
   it('aa', ...)
})

describe ('B', function() {
})

In intuitive way to is to name the video file A+B.

@jasonwilliams Would you provide some insight on how you'd use this feature?

yuliswe avatar Feb 27 '21 23:02 yuliswe

A-B would make more sense and be more consistent with how things are named now.

Would you provide some insight on how you'd use this feature?

basically as you mentioned, as a way of watching the whole suite we have tests where each it() is a user interaction so right now the videos are quite short.

I would like this to be optional though as we don’t always need it, so some way of switching between how it is now and the full describe

jasonwilliams avatar Feb 28 '21 00:02 jasonwilliams

@ylilarry is there a reason you haven't opened a PR with your changes on this repo?

jasonwilliams avatar Jun 14 '21 11:06 jasonwilliams

I mentioned in a different issue that a similar functionality could be solved kind of easily with a post-processor that joins the video after the run.

Would this be an ok solution for this issue as well?

presidenten avatar Jul 12 '21 12:07 presidenten

I mentioned in a different issue that a similar functionality could be solved kind of easily with a post-processor that joins the video after the run.

Would this be an ok solution for this issue as well?

Sounds good to me

jasonwilliams avatar Jul 12 '21 13:07 jasonwilliams

Thanks for raising this issue.

We greatly appreciate any contributions that help implement this feature request. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this feature being implemented. We encourage you to join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers!

christian-bromann avatar Jan 03 '24 03:01 christian-bromann