CodeceptJS
CodeceptJS copied to clipboard
[BUG] Video option with CodeceptJS and Playwright
Hello, I'm using CodeceptJS with Playwright as helper. When I activate the "video" option and my scenarios are played, I can see a .webm file in the "output/video" folder. But when my scenario ends with a failure, the file disappears and it is impossible to find it again.
Does anyone have any idea what is going on?
Don't you have a teardown script or similar that is deleting the ouput?
I use CodeceptJS with Playwright and I see videos after tests have failed.
Hi, Nope I don't have anything. And it's strange because I didn't have this problem before the upgrade from 3.3.3 to 3.3.4.
How do you implement this option?
No answer ?
???
can you clarify your latest question ? Which option do you want to implement ?
Hi, as I say previously, I ask for video option. Can you please explain me how you implement this option because that doesn't work for me
As specified in the documentation: https://codecept.io/playwright/#video
Sorry, we can only imagine you have the proper config. But we don't know the configuration you are using, nor we have a repro project.
The minimum would be to follow the template when creating a new issue, this would save us a lot of time and this would help us to help you.
BR Nicolas
I don't share my config because she's lambda. This is my config :

Where can I find the template you talking about ?
Your configuration is incomplete. On mine, I have the setting "tests:" above the output. And I don't know what you have within your variable process.env.profile.
Assuming your configuration is correct (but with a partial example and no repro project, not easy to say), this is exactly what I am using as well to have output videos. But I doubt your config is correct. When I remove this line on my config (the one just above output):
tests: './tests/*/**_test.ts',
I have 0 tests passed.
When you have a failed test, do you see any screenshots within your output folder ?
Here is the template. As you will see, the template is asking for your config file. If you follow (I recommend you to start from scratch with a brand new issue and a clear title about what the problem actually is, or what you think it is):

Also remember you have the code source here on github, so you may implement your configuration in a test/repro project (that you could share here if really not working). There is even a "CodeceptJS TypeScript Boilerplate" project to speed up things: https://github.com/codeceptjs/typescript-boilerplate
Hi,
my config isn't complete. It's a partial example tu show you how I implement the option.
I have an output folder with screenshots.
You can see my entire config just here :

I use Gherkin for my tests. Ok thank you for all thus information.
where is your video configuration?
This is my configuration without option video, this is my configuration with video option :

I also tried with Trace option and that work very well. I don't understand why video option doesn't.
@Miriambnzdn try my simple test with playwright to see if video is generated for you. I could see video generated from my end.
https://github.com/PeterNgTr/codeceptjs-playwright-fun
maybe I create a duplicate of this bug: https://github.com/codeceptjs/CodeceptJS/issues/3614
Closed for now! Feel free to reopen if you still encounter the issue with latest version and would be nice to provide a sample code to reproduce the issue.