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

Fail in final of test #92

Closed
lukasgarcya opened this issue Oct 30, 2020 · 17 comments
Closed

Fail in final of test #92

lukasgarcya opened this issue Oct 30, 2020 · 17 comments

Comments

@lukasgarcya
Copy link

Starting Flutter app under test 'test_driver/app.dart', this might take a few moments
before run hook
VMServiceFlutterDriver Connecting to Flutter application at http://127.0.0.1:38445/ScaIiPjZCT0=/
VMServiceFlutterDriver Isolate found with number: 3682545693255519
VMServiceFlutterDriver Isolate is not paused. Assuming application is ready.
VMServiceFlutterDriver Connected to Flutter application.
running hook before scenario 'counter should reset when app is restarted'
�[33;10mRunning scenario: counter should reset when app is restarted # ./features/app_restart.feature:2�[33;0m
�[33;32m √ Given I expect the "counter" to be "0" # ./features/app_restart.feature:3 took 108ms�[33;0m
�[33;32m √ When I tap the "increment" button # ./features/app_restart.feature:4 took 472ms�[33;0m
�[33;32m √ Then I expect the "counter" to be "1" # ./features/app_restart.feature:5 took 118ms�[33;0m
VMServiceFlutterDriver Connecting to Flutter application at http://127.0.0.1:38445/ScaIiPjZCT0=/
VMServiceFlutterDriver Isolate found with number: 778646431923143
VMServiceFlutterDriver Isolate is not paused. Assuming application is ready.
VMServiceFlutterDriver Connected to Flutter application.
�[33;32m √ When I restart the app # ./features/app_restart.feature:6 took 3344ms�[33;0m
�[33;32m √ Then I expect the "counter" to be "0" # ./features/app_restart.feature:7 took 146ms�[33;0m
�[33;32mPASSED: Scenario counter should reset when app is restarted # ./features/app_restart.feature:2�[33;0m
Restarting Flutter app under test
running hook after scenario 'counter should reset when app is restarted'
VMServiceFlutterDriver Connecting to Flutter application at http://127.0.0.1:38445/ScaIiPjZCT0=/
Error waiting for no transient callbacks from Flutter driver:

Failed assertion: boolean expression must not be null

#0 VMServiceFlutterDriver.sendCommand (package:flutter_driver/src/driver/vmservice_driver.dart:351:29)

#1 FlutterDriver.waitUntilNoTransientCallbacks (package:flutter_driver/src/driver/driver.dart:230:11)
#2 FlutterWorld._closeDriver (package:flutter_gherkin/src/flutter/flutter_world.dart:49:14)
#3 FlutterWorld.dispose (package:flutter_gherkin/src/flutter/flutter_world.dart:40:11)
#4 FeatureFileRunner._runScenario (package:gherkin/src/feature_file_runner.dart:276:16)

#5 FeatureFileRunner._runScenarioInZone. (package:gherkin/src/feature_file_runner.dart:142:30)
#6 _rootRun (dart:async/zone.dart:1190:13)
#7 _CustomZone.run (dart:async/zone.dart:1093:19)
#8 _runZoned (dart:async/zone.dart:1630:10)
#9 runZonedGuarded (dart:async/zone.dart:1618:12)
#10 runZoned (dart:async/zone.dart:1547:12)
#11 FeatureFileRunner._runScenarioInZone (package:gherkin/src/feature_file_runner.dart:140:5)
#12 FeatureFileRunner._runFeature (package:gherkin/src/feature_file_runner.dart:74:21)

#13 FeatureFileRunner.run (package:gherkin/src/feature_file_runner.dart:41:38)
#14 GherkinRunner.execute (package:gherkin/src/test_runner.dart:86:45)

#15 main (file:///home/lukasgarcya/VisualStudioCodeProjects/flutter_gherkin/example/test_driver/app_test.dart:40:26)
#16 _startIsolate. (dart:isolate-patch/isolate_patch.dart:301:19)
#17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

VMServiceFlutterDriver Isolate found with number: 483803094991227
VMServiceFlutterDriver Isolate is not paused. Assuming application is ready.
VMServiceFlutterDriver Connected to Flutter application.
running hook before scenario 'User can navigate back from page two'
�[33;10mRunning scenario: User can navigate back from page two # ./features/back_navigation.feature:3�[33;0m
�[33;32m √ Given I expect the "counter" to be "0" # ./features/back_navigation.feature:4 took 123ms�[33;0m
�[33;32m √ When I tap the "increment" button # ./features/back_navigation.feature:5 took 394ms�[33;0m
�[33;32m √ Then I expect the "counter" to be "1" # ./features/back_navigation.feature:6 took 63ms�[33;0m
�[33;32m √ Given I tap the label that contains the text "Open page 2" # ./features/back_navigation.feature:8 took 396ms�[33;0m
�[33;32m √ Then I expect the text "Contents of page 2" to be present # ./features/back_navigation.feature:9 took 67ms�[33;0m
�[33;32m √ Given I tap the back button # ./features/back_navigation.feature:11 took 384ms�[33;0m
�[33;32m √ Then I expect the "counter" to be "1" # ./features/back_navigation.feature:12 took 98ms�[33;0m
�[33;32mPASSED: Scenario User can navigate back from page two # ./features/back_navigation.feature:3�[33;0m
Restarting Flutter app under test
running hook after scenario 'User can navigate back from page two'
VMServiceFlutterDriver Connecting to Flutter application at http://127.0.0.1:38445/ScaIiPjZCT0=/
Error waiting for no transient callbacks from Flutter driver:

Failed assertion: boolean expression must not be null

@jonsamwell
Copy link
Owner

jonsamwell commented Oct 30, 2020 via email

@lukasgarcya
Copy link
Author

[✓] Flutter (Channel stable, 1.22.2, on Linux, locale pt_BR.utf8)
• Flutter version 1.22.2 at /home/lukasgarcya/flutter
• Framework revision 84f3d28555 (2 weeks ago), 2020-10-15 16:26:19 -0700
• Engine revision b8752bbfff
• Dart version 2.10.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at /home/lukasgarcya/Android/Sdk
• Platform android-30, build-tools 30.0.1
• Java binary at: /opt/android-studio/jre/bin/java
• Java version Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
• All Android licenses accepted.

[!] Android Studio (version 4.0)
• Android Studio at /opt/android-studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version Java(TM) SE Runtime Environment (build 1.8.0_202-b08)

[✓] Connected device (1 available)
• sdk gphone x86 64 arm64 (mobile) • emulator-5554 • android-x64 • Android 11 (API 30) (emulator)

! Doctor found issues in 1 category.

@jonsamwell
Copy link
Owner

jonsamwell commented Oct 30, 2020 via email

@lukasgarcya
Copy link
Author

It's problem occurring with my app and the sample this repository.

@lukasgarcya
Copy link
Author

I see it's in the close driver is occurring.

@jonsamwell
Copy link
Owner

jonsamwell commented Oct 30, 2020 via email

@lukasgarcya
Copy link
Author

All test. I cloned this repository and I run example when I see the error.

@lukasgarcya
Copy link
Author

I tested in other notebook that I see the same error.

@jonsamwell
Copy link
Owner

@lukasgarcya what command are you using to run the tests?

@quan-codemetrics
Copy link

@jonsamwell I run dart app_test.dart and I get the error after every scenario.
image
Thank you for your effort in fixing this.

@lukasgarcya
Copy link
Author

lukasgarcya commented Nov 9, 2020

@jonsamwell I run in Visual Studio Code and flutter drive --target=test_driver/app.dart

@jonsamwell
Copy link
Owner

Does this actually make the test fail or just print the error message

@lukasgarcya
Copy link
Author

The test is running without error. After tests I receive this problem mentioned.

@jonsamwell
Copy link
Owner

Can you please see if the error is still present using this branch https://github.com/jonsamwell/flutter_gherkin/tree/close-driver-error-fix

@lukasgarcya
Copy link
Author

@jonsamwell is working with this branch close-driver-error-fix.

@jonsamwell
Copy link
Owner

Great, I'll get this merged in a published tomorrow

jonsamwell added a commit that referenced this issue Nov 24, 2020
…tter driver

* Added option to leave Flutter app under test running when the tests finish see `keepAppRunningAfterTests` configuration property
* Added the ability to have multiple example blocks with tags per scenario outline
@jonsamwell
Copy link
Owner

Fixed in latest v1.1.9 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants