patrol icon indicating copy to clipboard operation
patrol copied to clipboard

Patrol cli build in record videos tool for simulators during patrol test or patrol develop with

Open Kendru98 opened this issue 2 months ago • 5 comments

Use case

Sometimes people run test locally and on Android there is no any recording after that, we can do it also for iOS (I know that ios already recording tests since xCode15 in xcresults but it will make it consistent).

Proposal

patrol test --record-video will record video files each per test case, user can configure in pubspec.yaml where videos should be saved. It can be good for people that run tests locally, or try to run them on CI/Cd with patrol test (rare case I would say)

Kendru98 avatar Oct 03 '25 10:10 Kendru98

You can use an external screen recording program for that? Our project uses Firebase testlab that has built in screen recording for each tests. Its run from our pipeline. You could check that out

davidahlstroem avatar Oct 03 '25 12:10 davidahlstroem

It could be just more convenient for users that run tests locally. And it will record one video per test case. Not one big video if you for example run pc build in recording tool.

Kendru98 avatar Oct 06 '25 07:10 Kendru98

I just dont see the difference of having a screen recording on which gives one video that you can step through and having videos for each test (if we are talking testing only locally to see where it fails).

If you dont want pipelines and only test locally the best way, personally, is to run patrol test (runs all tests) and check which test fails and run patrol develop for that test, which can include debugging and hot restart.

But thats my way of doing it locally. Optimal way is nightly testruns via pipelines on physical devices on a devicefarm that preferably has recordings of each test.

The main reason Im against this is that I would presume this addon would increase Patrol size significantly, which may increase build time.

davidahlstroem avatar Oct 07 '25 09:10 davidahlstroem

This should not affect build time. This will be just flag --record-video in patrol test and develop. Optional flag.

Kendru98 avatar Oct 07 '25 10:10 Kendru98

We also had a thought about recording the testing process in case of failures. It would allow tracking specific bugs and see how the UI reacts.

In our case a single test runs multiple minutes inside the CI. Here it would be cool to have a recording "when the test fails". Or something like just save the last "30 Seconds" before the fail happened.

But in the end this kind of stuff could also be done during post processing when a whole record exists somewhere and just a small part can be provided as CI artifact for retracing.

xShuusui avatar Oct 09 '25 15:10 xShuusui