webdriverio-community / wdio-video-reporter

Reporter for WebdriverIO that makes videos of failed tests and has optional allure integration

Home Page:https://webdriver.io/docs/wdio-video-reporter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibility to record the test suite as one video

yuliswe opened this issue · comments

commented

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.

commented

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

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

@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

commented

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?

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

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

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?

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

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!