0

I've been searching for a solution to help me clean up Detox test automation's output, as currently the output is quite messy.. The biggest culprit of the ugliness seems to exist within GREYElementInteraction.m which is seen within the Detox repo, but I'm not sure how to go about tweaking this file. It doesn't exist within the installed Node Modules on the native app, so I'm assuming that this is compiled and used by the javascript files within the detox node modules folder.

Any ideas?

  • Can you be more specific about the `ugliness` :) ? Please feel free to file bugs on us at https://github.com/google/EarlGrey. – gran_profaci Oct 09 '18 at 22:46
  • Mostly it's with Detox when an action or matcher fails, Earl Grey it outputs the entire UI hierarchy to terminal. Is there a way to disable this? – Despair Bear Oct 10 '18 at 01:24
  • Detox could squelch the error if no EarlGrey stack is required. Do you want no EarlGrey stack or just have the Hierarchy printing turned off? The latter sounds like a reasonable feature request. – gran_profaci Oct 15 '18 at 00:49
  • Just turning off the Hierarchy printing should be good enough. I posted on the github here https://github.com/google/EarlGrey/issues/762 – Despair Bear Oct 16 '18 at 01:01
  • 1
    I opened an issue on Detox's issue tracker so you can probably close out the one on EarlGrey https://github.com/wix/Detox/issues/992 – Despair Bear Oct 22 '18 at 18:29

1 Answers1

1

Explanation added here:https://github.com/google/EarlGrey/issues/762

It looks like Detox calls into EarlGrey and it does not look as though there is any way to pass in an error to EarlGrey which will turn off the exception from being thrown - thereby preventing the hierarchy / log dump.

If this is passed in, then you should be able to get the required disabling of logs.

gran_profaci
  • 8,087
  • 15
  • 66
  • 99