Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions packages/integration_test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# integration_test

Runs integration tests on a device with
`flutter test integration_test -d <device>`. Contains the bare minimum the
tool requires; tests are written with `package:test`.

```yaml
dev_dependencies:
integration_test:
sdk: flutter
test: any
```

```dart
// integration_test/app_test.dart
import 'package:test/test.dart';

void main() {
test('runs in the app', () {
expect(1 + 1, 2);
});
}
```
19 changes: 19 additions & 0 deletions packages/integration_test/lib/integration_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/// The bare minimum `flutter test integration_test` requires; the generated
/// test bootstrap calls the members below.
library;

/// Called by the test bootstrap; does nothing.
class IntegrationTestWidgetsFlutterBinding {
IntegrationTestWidgetsFlutterBinding._();

static final _instance = IntegrationTestWidgetsFlutterBinding._();

/// Returns the binding.
static IntegrationTestWidgetsFlutterBinding ensureInitialized() => _instance;
}

/// Called by the test bootstrap; does nothing.
abstract final class VmServiceProxyGoldenFileComparator {
/// Does nothing.
static void useIfRunningOnDevice() {}
}
11 changes: 11 additions & 0 deletions packages/integration_test/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: integration_test
description: >-
Runs integration tests on a device with `flutter test integration_test`.
A minimal version of Flutter's package:integration_test.
version: 0.0.1
publish_to: none

resolution: workspace

environment:
sdk: ^3.11.0-169.0.dev
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ environment:

workspace:
- examples/hello_world
- packages/integration_test

dependencies:
_discoveryapis_commons: 1.0.7
Expand Down
Loading