Reputation: 891
I need help with this codemagic test log. Is anyone familiar with CodeMagic and flutter? This is my first attemp at building on codemagic and I don't know how to make sense of this test log.
{"testID":3,"messageType":"print","message":"══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════\nThe following TestFailure object was thrown running a test:\n Expected: exactly one matching node in the widget tree\n Actual: _TextFinder:<zero widgets with text "0" (ignoring offstage widgets)>\n Which: means none were found but one was expected\n\nWhen the exception was thrown, this was the stack:\n#4 main. (file:///Users/builder/clone/test/widget_test.dart:19:5)\n#5 testWidgets.. (package:flutter_test/src/widget_tester.dart:146:29)\n\n#6 testWidgets.. (package:flutter_test/src/widget_tester.dart)\n#7 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:784:19)\n\n#10 TestWidgetsFlutterBinding._runTest (package:flutter_test/src/binding.dart:764:14)\n#11 AutomatedTestWidgetsFlutterBinding.runTest. (package:flutter_test/src/binding.dart:1173:24)\n#12 FakeAsync.run.. (package:fake_async/fake_async.dart:178:54)\n#17 withClock (package:clock/src/default.dart:48:10)\n#18 FakeAsync.run. (package:fake_async/fake_async.dart:178:22)\n#23 FakeAsync.run (package:fake_async/fake_async.dart:178:7)\n#24 AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:1170:15)\n#25 testWidgets. (package:flutter_test/src/widget_tester.dart:138:24)\n#26 Declarer.test.. (package:test_api/src/backend/declarer.dart:175:19)\n\n#27 Declarer.test.. (package:test_api/src/backend/declarer.dart)\n#32 Declarer.test. (package:test_api/src/backend/declarer.dart:173:13)\n#33 Invoker.waitForOutstandingCallbacks. (package:test_api/src/backend/invoker.dart:231:15)\n#38 Invoker.waitForOutstandingCallbacks (package:test_api/src/backend/invoker.dart:228:5)\n#39 Invoker._onRun... (package:test_api/src/backend/invoker.dart:383:17)\n\n#40 Invoker._onRun... (package:test_api/src/backend/invoker.dart)\n#45 Invoker._onRun.. (package:test_api/src/backend/invoker.dart:370:9)\n#46 Invoker._guardIfGuarded (package:test_api/src/backend/invoker.dart:415:15)\n#47 Invoker._onRun. (package:test_api/src/backend/invoker.dart:369:7)\n#54 Invoker._onRun (package:test_api/src/backend/invoker.dart:368:11)\n#55 LiveTestController.run (package:test_api/src/backend/live_test_controller.dart:153:11)\n#56 RemoteListener._runLiveTest. (package:test_api/src/remote_listener.dart:256:16)\n#61 RemoteListener._runLiveTest (package:test_api/src/remote_listener.dart:255:5)\n#62 RemoteListener._serializeTest. (package:test_api/src/remote_listener.dart:208:7)\n#80 _GuaranteeSink.add (package:stream_channel/src/guarantee_channel.dart:125:12)\n#81 new _MultiChannel. (package:stream_channel/src/multi_channel.dart:159:31)\n#85 CastStreamSubscription._onData (dart:_internal/async_cast.dart:85:11)\n#119 new _WebSocketImpl._fromSocket. (dart:_http/websocket_impl.dart:1145:21)\n#127 _WebSocketProtocolTransformer._messageFrameEnd (dart:_http/websocket_impl.dart:338:23)\n#128 _WebSocketProtocolTransformer.add (dart:_http/websocket_impl.dart:232:46)\n#138 _Socket._onData (dart:io-patch/socket_patch.dart:2044:41)\n#147 new _RawSocket. (dart:io-patch/socket_patch.dart:1580:33)\n#148 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1076:14)\n(elided 111 frames from dart:async and package:stack_trace)\n\nThis was caught by the test expectation on the following line:\n file:///Users/builder/clone/test/widget_test.dart line 19\nThe test description was:\n Counter increments smoke
Upvotes: 1
Views: 304
Reputation: 3306
you are looking into machine output of flutter test
command. Codemagic parses the output and displays summary for the tests - check Results
tab and click on failed test name to see a stack trace in human readable format.
If you don't want to run tests you can disable it in App Settings > Test > untick Enable Flutter test (see more in documentation https://docs.codemagic.io/testing/running-automated-tests/)
Upvotes: 1
Reputation: 1153
If you didn't add a test, which I assume u didn't since it includes Counter increments smoke, so I assume that it is the one that is created by flutter when creating a new app. To fix this issue, just delete the test directory in your project.
A note about test, tests are really important when working on big projects for example since they enable you to spot bugs that you didn't anticipate, because in such projects it will be very tedious and time consuming to check every feature whenever we change a small part. Thus tests can help us with that.
Upvotes: 2