How to not embed screen record file to log

Hello, I have a test suite for Android with over 150 test cases and I’m recording a video on on every test using the “Start Screen Recording” at test setup & “Stop Screen Recording” at test teardown, keeping in mind that I delete the video files when the test case passes

Now my issue is that when I’m having alot of failed test cases this means alot of videos recorded and alot of videos being embedded to my log file which means that the log.html file gets too big (3.5GB for example) and I can’t open my log files at all so my question is:

  1. Is there an option to NOT embed the video to log file for Android?
  2. Is there any way to decrease the log.html file size without malforming the data?

I think you could do a post-processing of output.xml, removing all video links, or replacing to a single/dummy video. Then with rebot you would produce a smaller Log file. I don’t know other solutions.

1 Like

Yes maybe wrap your Start/Stop recording keywords in a custom keyword, and add a tag to it (for example: RMVIDS).

Then rebot your file with –removekeywords tag:RMVIDS

You can also search into --splitlog argument when running or post processing the .xml.

EDIT : I see this in the keyword:

  if self._is_android() and not self._is_remotepath_set(options): 
     self._html etc....

So I assume If you do something like this:

 Stop Video Recording     remotePath="/tmp/videos/"

This might save the file, and not in the log.

Regards
Charlie

2 Likes

I don’t want to remove the video file itself, I just don’t want to embed it to the log file

The –splitlog argument is a workaround to opening the large log file but I was just looking for a more neat solution

Change the HTML to not have the video embedded.
(I would use sed for that :wink: )

Yes, but did you try the remotepath argument?