From 90c2333cf6ccb059d0bef80ad7f9fcad0c50deba Mon Sep 17 00:00:00 2001 From: Ben Butterworth <24711048+ben-xD@users.noreply.github.com> Date: Sat, 14 Aug 2021 08:37:00 +0100 Subject: [PATCH] Structure the start of integration_test README to be clearer, and add example for specifying modules --- test_integration/README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test_integration/README.md b/test_integration/README.md index f310138f7..40a7237b3 100644 --- a/test_integration/README.md +++ b/test_integration/README.md @@ -4,13 +4,29 @@ Integration tests allow for tests to execute on Android and iOS. This allows us platform specific behaviour (native ably-flutter code and dependencies, ably-cocoa and ably-java) are behaving as expected. +## Test Structure + +### Test Target + This project has only one integration test target, `main.dart`. To run all tests: - run `flutter drive --target lib/main.dart`, or - run `flutter drive` which runs them all (one and only, `main.dart`). -To run a specific test: -- In [tests_config.dart](test_driver/tests_config.dart), comment out the key: value pairs which you don't want to run. +### Test Module + +Test modules include `basicTests` and `realtime` (For the full list, `TestModules` in [tests_config.dart](./test_driver/tests_config.dart)). To run one module (a collection of test groups), either: +- In Android Studio: + - Modify the `Integration Test Driver` run/debug configuration by adding `-m module_name_1,module_name_2` in `Program Arguments`. + - Note: No spaces between module_names. Alternatively, specify the modules separately: `-m module_name_1 -m module_name_2` +- Launch each application manually: + - Launch the integration test app manually + - Launch the driver and pass the modules with the `-m` option: `dart test_integration/test_driver/runner.dart -m rest,realtime` + +### Test Group + +To run a specific test group: +- In [tests_config.dart](test_driver/tests_config.dart), comment out the **test group** key: value pairs which you don't want to run. - Launch both integration test app and driver: - Launch `Integration Test` compound run configuration in Android, or - Launch `Integration Test App` and `Integration Test Driver` run configurations, or