Send Detox Automation Results to slack by trimming bitrise logs

Hi,

I was trying to slack Detox Automation results of our mobile application. But Detox lacks reporting. I am trying to solve this problem by trimming the build logs. How can I trim the bitrise build logs while running workflow and slack the results is it possible to do so?

Hi @MoturuKalyan! It’s absolutely possible to do this with a bit of Script-fu.

Basically you’d want to commit the output of the detox scripts to file during the build (basically creating your own log for that script), parse that file for the detox output that you actually want to deploy (personally I’d recommend using “sed” for this), then move the finalized file to the $BITRISE_DEPLOY_DIR.

Why not use the Bitrise log for this? Well, since the log will only be finalized after the VM has shut down, you won’t be able to access it over the course of your build. Therefore, it’s probably best to just make your own log. :slight_smile:

That should in theory do exactly what you want to :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.