Отчет об интеграционных тестах Flutter показывает 0 тестов, но фактически тесты выполняютсяAndroid

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 Отчет об интеграционных тестах Flutter показывает 0 тестов, но фактически тесты выполняются

Сообщение Anonymous »

Я запускаю интеграционные тесты Flutter (инструментальные тесты) с помощью flutter Integration_driver
Существует два способа запуска тестов:
< ч2>1. Используя команду драйвера флаттера
Я запускаю драйвер флаттера с некоторыми параметрами, он работает нормально. Я вижу множество журналов и могу найти ошибки.

Код: Выделить всё

flutter driver --target=integration_test/main_test.dart --flavor rc  --driver=test_driver/main_test.dart --dart-define=set=firebase --dart-define=test-set=all
2. Использование flutter build gradlew
Теперь, если я запускаю тесты с помощью gradlew, я вижу, что тесты выполняются, но результаты не отображаются в форме отчета.
Команда, которую я запускаю:

Код: Выделить всё

  flutter build apk --debug --flavor rc
./gradlew app:assembleRcDebugAndroidTest
./gradlew app:connectedRcDebugAndroidTest -Ptarget=integration_test/main_test.dart \
-Pdart-defines="base64-parameters-here"
Я вижу, как тесты выполняются на эмуляторе. Ниже приведены результаты команды на консоли:
Полные журналы здесь.

Код: Выделить всё

Running Gradle task 'assembleRcDebug'...                            19.8s
✓  Built build/app/outputs/flutter-apk/app-rc-debug.apk.
Starting a Gradle Daemon, 3 incompatible Daemons could not be reused, use --status for details

> Configure project :app
WARNING:The option 'android.enableR8' is deprecated.
It was removed in version 7.0 of the Android Gradle plugin.
Please remove it from `gradle.properties`.
WARNING:DSL element 'dexOptions' is obsolete and should be removed.
It will be removed in version 8.0 of the Android Gradle plugin.
Using it has no effect, and the AndroidGradle plugin optimizes dexing automatically.

> Configure project :flutter_lib
WARNING:DSL element 'dexOptions' is obsolete and should be removed.
It will be removed in version 8.0 of the Android Gradle plugin.
Using it has no effect, and the AndroidGradle plugin optimizes dexing automatically.
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.
...
This Android Gradle plugin (7.1.0-rc01) was tested up to compileSdk = 32

This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=34
to this project's gradle.properties

The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 34
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33

This Android Gradle plugin (7.1.0-rc01) was tested up to compileSdk = 32

This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=33
to this project's gradle.properties

The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 33
WARNING:The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (30.0.3) for Android Gradle Plugin 7.1.0-rc01.
Android SDK Build Tools 30.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :flutter_lib:compileDebugJavaWithJavac
Note: /Users/name/source/comp-client/flutter_apps/flutter_lib/android/src/main/java/com/comp/flutter_lib/android_lib/DocParser.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :app:compileRcDebugKotlin
'compileRcDebugJavaWithJavac' task (current target is 17) and 'compileRcDebugKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
By default will become an error since Gradle 8.0+! Read more: https://kotl.in/gradle/jvm/target-validation
Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain
...

>  Task :app:dexBuilderRcDebugAndroidTest
WARNING:/Users/name/source/schema/flutter_apps/testapp/build/app/intermediates/javac/rcDebugAndroidTest/classes/com/comp/testapp/test/BuildConfig.class: D8: One or more classes has class file version >= 56 which is not officially supported.
WARNING:/Users/name/source/schema/flutter_apps/testapp/build/app/intermediates/javac/rcDebugAndroidTest/classes/com/comp/testapp/MainActivityTest.class: D8: One or more classes has class file version >= 56 which is not officially supported.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 44s
842 actionable tasks: 28 executed, 814 up-to-date
...

This Android Gradle plugin (7.1.0-rc01) was tested up to compileSdk = 32

This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=34
to this project's gradle.properties

The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 34
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33

This Android Gradle plugin (7.1.0-rc01) was tested up to compileSdk = 32

This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=33
to this project's gradle.properties

The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 33
WARNING:The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (30.0.3) for Android Gradle Plugin 7.1.0-rc01.
Android SDK Build Tools 30.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :app:compileFlutterBuildRcDebug
Error: unable to find directory entry in pubspec.yaml: /Users/name/source/schema/flutter_apps/testapp/assets/yaml_mapping_files/

> Task :app:compileRcDebugKotlin
'compileRcDebugJavaWithJavac' task (current target is 17) and 'compileRcDebugKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
By default will become an error since Gradle 8.0+! Read more: https://kotl.in/gradle/jvm/target-validation
Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

> Task :app:connectedRcDebugAndroidTest0s]
Starting 0 tests on Pixel_6_Pro_API_34(AVD) - 14

Test results saved as file:/Users/name/source/schema/flutter_apps/testapp/build/app/outputs/androidTest-results/connected/flavors/rc/Pixel_6_Pro_API_34(AVD)%20-%2014/test-result.pb. Inspect these results in Android Studio by selecting Run > Import Tests From File from the menu bar and importing test-result.pb.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 2h 19m 59s
863 actionable tasks: 9 executed, 854 up-to-date
В test-result.pb я не вижу запущенных тестов.

Подробнее здесь: https://stackoverflow.com/questions/786 ... runs-tests
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Интеграция Patrol с действиями GitHub для автоматизированных интеграционных тестов Flutter
    Anonymous » » в форуме Android
    0 Ответы
    20 Просмотры
    Последнее сообщение Anonymous
  • Интеграция Patrol с действиями GitHub для автоматизированных интеграционных тестов Flutter
    Anonymous » » в форуме IOS
    0 Ответы
    27 Просмотры
    Последнее сообщение Anonymous
  • Как я могу динамически предоставить разрешения в приложении Flutter во время интеграционных тестов?
    Anonymous » » в форуме Android
    0 Ответы
    12 Просмотры
    Последнее сообщение Anonymous
  • Когда фактически выполняются операции Jinja2 {% set %}?
    Anonymous » » в форуме Python
    0 Ответы
    14 Просмотры
    Последнее сообщение Anonymous
  • Когда фактически выполняются операции Jinja2 {% set %}?
    Anonymous » » в форуме Python
    0 Ответы
    6 Просмотры
    Последнее сообщение Anonymous

Вернуться в «Android»