leancodepl / patrol

Flutter-first UI testing framework. Ready for action!
https://patrol.leancode.co
Apache License 2.0
889 stars 134 forks source link

Test reports don't contain useful info ("Multiple exceptions were thrown") #951

Open bartekpacia opened 1 year ago

bartekpacia commented 1 year ago

This is unacceptable. We want to know what these exceptions are.

Screenshot 2023-02-17 at 10 52 02 AM

The code that prints this message lives here in flutter_test – in the _runTest() method of the abstract class TestWidgetsFlutterBinding.

TestWidgetsFlutterBinding is extended by LiveTestWidgetsFlutterBinding.

LiveTestWidgetsFlutterBinding is extended by IntegrationTestWidgetsFlutterBinding from integration_test.

We should be able to override FlutterError.onError to print full exception message and stack trace.

cc @mateuszwojtczak, @jBorkowska

jeremiahlukus commented 1 year ago

would be nice also to have print statements output in the patrol output so print("test"); would show up in the console when i run patrol test --target integration_test/app_test.dart that way i wont have to parse through the massive amount of clutter in flutter logs

bartekpacia commented 1 year ago

Yeah, we'll try to do this as well. It's definitely not convenient currently.

jBorkowska commented 1 year ago

size: M

Noxiver commented 6 months ago

@bartekpacia any solutions?

MickaelHrndz commented 1 month ago

Please consider prioritizing this. It's the most upvoted bug issue. And it's been up for more than a year. This testing package currently doesn't tell you what the exceptions that make your test fail are.

EDIT: I just found out about this workaround in the official doc to ignore these expections. I want to print them I can't see any of it in the console output.