vendredi 15 mai 2020

Flutter integration test does not fail if an exception occurs

I have an integration test which is passing despite an exception occurs during the test. Is it an expected behavior? I would like any tests to fail if any exception occur, how can I do that?

Here is what I am seeing currently:

flutter drive --target=test_driver/app.dart
...
I/flutter ( 6014): [27180.076]: {INFO} Fetch data successful 
E/flutter ( 6014): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: 0
...
01:11 +1 ~5: All tests passed!

Indeed my test is passing as what I am expecting is happening but after the exception... I would like any unexpected exception to fail my test.

Aucun commentaire:

Enregistrer un commentaire