- Integration testing implemented using Flutter built-in integration_test package.
- New tests should be added, if possible, for every new issue as a part of corresponding PR, to provide coverage for specific bug/feature. This way we'll, hopefully, expand test coverage in a natural manner.
- Coverage (and structure, if needed) should be updated in table below.
https://github.com/flutter/flutter/wiki/Running-Flutter-Driver-tests-with-Web
https://chromedriver.chromium.org/downloads
Configure Safari to Enable WebDriver Support.
Safari’s WebDriver support for developers is turned off by default.
Run once:
safaridriver --enable
Note: If you’re upgrading from a previous macOS release, you may need to use sudo.
-
Install and check the version of Firefox.
-
Download the Gecko driver for that version from the releases https://github.com/mozilla/geckodriver/releases
Note that this section is experimental, at this point we don't have automated tests running on Firefox.
- for Google Chrome
./chromedriver --port=4444 --silent --enable-chrome-logs --log-path=console.log
- or Firefox
./geckodriver --port=4444
- or Safari
/usr/bin/safaridriver --port=4444
dart run_integration_tests.dart
To see tests run scripts help message:
dart run_integration_tests.dart -h
Tests script runs tests in profile mode, accepts browser dimension adjustment argument and -d (display) arg to set headless mode. (see below for details) Or, to run single test:
Change <path>/testname_test.dart
to actual test file, located in ./test_integration directory.
Currently available test groups:
dex_tests/dex_tests.dart
wallets_manager_tests/wallets_manager_tests.dart
wallets_tests/wallets_tests.dart
misc_tests/misc_tests.dart
no_login_tests/no_login_tests.dart
and run
dart run_integration_tests.dart -b '1600,1040' -d 'no-headless' -t 'wallets_tests/wallets_tests.dart'
Each test in test groups can be run separately in exact same fashion.
2.1.4. To simulate different screen dimensions, you can use the --browserDimension or -b argument, -d or --display argument to configure headless run:
dart run_integration_tests.dart -b '360,640'
dart run_integration_tests.dart --browserDimension='1100,1600'
dart run_integration_tests.dart -b '1600,1040' -d 'headless'
dart run_integration_tests.dart -n 'safari'
dart run_integration_tests.dart --browser-name=firefox
By default, the Chrome browser is used to run tests