patrol icon indicating copy to clipboard operation
patrol copied to clipboard

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

Open bartekpacia opened this issue 2 years ago • 5 comments

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

bartekpacia avatar Feb 17 '23 10:02 bartekpacia

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

jeremiahlukus avatar Feb 17 '23 14:02 jeremiahlukus

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

bartekpacia avatar Feb 17 '23 14:02 bartekpacia

size: M

jBorkowska avatar Jul 11 '23 11:07 jBorkowska

@bartekpacia any solutions?

Noxiver avatar Apr 05 '24 19:04 Noxiver

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.

MickaelHrndz avatar Sep 13 '24 08:09 MickaelHrndz