Note:
  Note: You should only use testWidgets
  to declare your tests, or errors won’t
  be reported correctly.

Directory structure

lib/

...

integration_test/

foo_test.dart

bar_test.dart

test/

# Other unit tests go here.

See also:

integration_test usage

Running using the flutter command

These tests can be launched with the
flutter test command, where <DEVICE_ID>:
is the optional device ID or pattern displayed
in the output of the flutter devices command:

test integration_test/foo_test.dart

d <DEVICE_ID>

This runs the tests in foo_test.dart. To run all tests in this directory on
the default device, run:

Running in a browser