replayio / playwright

Replay enabled fork of the Playwright library
Apache License 2.0
4 stars 0 forks source link

Only keep/upload recordings for tests that fail? #2

Open SebDuf opened 3 years ago

SebDuf commented 3 years ago

I've successfully integrated Replay with Playwright using this and the recording-cli, but I couldn't find any information on this feature.

I know that Playwright is not a test runner, but it is often used by Jest, or using the official Playwright test runner Playwright Test

It would be great to only keep the recordings / only upload recordings for tests that have failed. This would reduce greatly the quantity of uploads and be easier to sort through them.

Is it currently possible to do something similar to this, even if it requires some glueing?

jasonLaster commented 3 years ago

Great question @SebDuf!

We do not support this out of the box because it is impossible for us to know how Playwright is being used in all cases, but it should be easy for you to handle yourself by hooking into the test runner / reporter.

happy to discuss in https://replay.io/discord