rob-mur / flutter_convenient_test

Write and debug tests easily, with full action history, time travel, screenshots, rapid re-execution, video records, interactivity, isolation and more
pub.dev/packages/convenient_test
MIT License
0 stars 0 forks source link

Web Support #1

Open rob-mur opened 2 years ago

rob-mur commented 2 years ago

Tracking for fzyzcjy/flutter_convenient_test#283

rob-mur commented 2 years ago

Removed the goldens code from convenient test dev because it doesn't compile on Web. This is because it genuinely isn't supported by the underlying flutter test. Eventually this should be split out into conditional compilation that is platform dependent.

rob-mur commented 2 years ago

Due to flutter/flutter#111136 not yet being in stable development has to move to the master branch for now.

Further thoughts - the current supported approach for integration tests in flutter web uses chromedriver / whatever other driver depending on browser -> potentially would need to package that within the tool.

Even after doing this there seems to be internal errors in flutter that stop this from even loading a basic app. Until/if flutter gets a way to run integration tests on web using flutter run/test rather than flutter drive I don't think this will move anywhere.

longfit commented 2 years ago

Refer to flutter case #111136 , any alternative way to continue the web development by httpcllient

thanks

rob-mur commented 2 years ago

I'm not sure what you mean - that case is the one I linked? For now I'm using the flutter master branch in order for the debugger to work.

I'm currently taking the approach of trying to adapt flutter drive to run the convenient tests - ignoring the manager for now.

I currently get a grpc error, which I'll look into at some point.

Log ``` Running "flutter pub get" in example... 963ms Resolving dependencies... _fe_analyzer_shared 49.0.0 (50.0.0 available) analyzer 5.1.0 (5.2.0 available) async 2.9.0 (2.10.0 available) boolean_selector 2.1.0 (2.1.1 available) flutter_lints 1.0.4 (2.0.1 available) lints 1.0.1 (2.0.1 available) matcher 0.12.12 (0.12.13 available) test_api 0.4.14 (0.4.15 available) webdriver 3.0.0 (3.0.1 available) Warning: You are using these overridden dependencies: ! convenient_test 1.2.0 from path .. ! convenient_test_common 1.2.0 from path ..\..\convenient_test_common ! convenient_test_common_dart 1.2.0 from path ..\..\convenient_test_common_dart ! convenient_test_dev 1.2.0 from path ..\..\convenient_test_dev Got dependencies! Launching integration_test/main_test.dart on Chrome in debug mode... Waiting for connection from debug service on Chrome... 14.4s This app is linked to the debug service: ws://127.0.0.1:52521/YHq6Uj8CJkE=/ws Debug service listening on ws://127.0.0.1:52521/YHq6Uj8CJkE=/ws Running with sound null safety Flutter Web Bootstrap: Programmatic Was called Error: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: Unsupported operation: Socket constructor, details: null, rawResponse: null, trailers: {}) C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 299:10 createErrorWithStack C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 341:28 _throw C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/core/errors.dart 116:5 throwWithStackTrace C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/zone.dart 1385:11 callback C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/schedule_microtask.dart 40:11 _microtaskLoop C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/async/schedule_microtask.dart 49:5 _startMicrotaskLoop C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 166:15 ```