Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for suppressing views tree information #936

Closed
todorone opened this issue Sep 17, 2018 · 14 comments
Closed

Option for suppressing views tree information #936

todorone opened this issue Sep 17, 2018 · 14 comments

Comments

@todorone
Copy link
Contributor

Description

It would be amazing if we can have an option to suppress output of views tree, that was introduced in detox 8.2.0. If an app has huge views tree, it's too hard to find useful information about test errors when we have a bunch of them.

Thanks.

@noomorph
Copy link
Collaborator

noomorph commented Sep 17, 2018

He-he, every time you add a feature, make sure to add a disable toggle. 😀 Probably, this is possible but it's not going to be trivial. @LeoNatan ?

@LeoNatan
Copy link
Contributor

I'm not sure what the ask is. Provide an argument to not include the view hierarchy?
Anything is possible, but I am not inclined to work on this feature. It just makes our system more and more complex.

On a general note, unrelated to Detox, if your view hierarchy is huge, you should consider improving your app. Huge view hierarchies slow down the app and give a bad user experience.

@todorone
Copy link
Contributor Author

@LeoNatan Thanks for the reply and hard work on such an amazing tool.

Maybe my argument was not clear, but I'll try to explain. I have 30 tests running and as a result, when I have 10 of them failed, it's extremely hard to find out the reason(error message) of any particular test somewhere in the middle. Previously we had clean error messages as an output, but now we can have thousands of lines of console output(including views tree) which is hardly manageable for effective navigation. Once again, we may need to evaluate this tree and it's the very handy addition, but with multiple tests batch, it just results to hell for me. Pls, let me know if I was not clear enough about the reason again, so I may try to record the video to illustrate.

@LeoNatan
Copy link
Contributor

@noomorph Doesn’t the new logging system allow for customizing output? Isn’t it possible to run a query that would only print the failing tests’ names?

@noomorph
Copy link
Collaborator

Leo, it is a part of logs we don't control from Detox. We might need to add custom reporters for Mocha and Jest. It's highly likely that this is one of very few feasible ways to satisfy this particular request.

@todorone, what about bail option? It will fail on the first test, making your output clearer.

@todorone
Copy link
Contributor Author

@noomorph Yeah, it's an option, thanks.

@todorone
Copy link
Contributor Author

@noomorph Hm, just checked, seems even with bail: true we still have ongoing tests even with previously failed ones...

@noomorph
Copy link
Collaborator

@todorone, do you use Jest, right?

@todorone
Copy link
Contributor Author

@noomorph Yep.

@noomorph
Copy link
Collaborator

noomorph commented Sep 18, 2018

@todorone , I assume --runInBand option either is not working or not acceptable for you, right?

@todorone
Copy link
Contributor Author

todorone commented Sep 18, 2018

@noomorph I've tried to run jest manually with --runInBand by

configuration="ios.sim.debug" artifactsLocation="artifacts/ios.sim.debug.2018-09-18 11-41-42Z" node_modules/.bin/jest e2e --config=./__e2e__/config.json -i '--testNamePattern=^((?!:android:).)*$'

and still I have multiple failed tests displayed(w/views tree). If I didn't run it correctly, pls let me know how should I run it...

@noomorph
Copy link
Collaborator

@todorone , honestly, I'm wondering if it in its core it has more to deal with Jest or with Detox... 😕 can you see for yourself, try to create a hello-worldish test suite that throws long exceptions, duplicate it to a few files and see how's vanilla Jest is behaving, please? Thanks in advance!

@LeoNatan
Copy link
Contributor

This doesn't seem like a Detox issue.

@todorone
Copy link
Contributor Author

@noomorph @LeoNatan Kindly thanks for your help.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants