作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
为了创建一个 android/web 应用程序,我想在特定平台上运行 flutter 测试。当我指定“chrome”时,我得到“没有运行测试”。当然,当我执行“flutter run -d chrome”时,应用程序正在运行
使用 flutter 启动应用程序很容易重现该问题。这是我在 linux 上所做的:
mkdir chrome_test
cd chrome_test
create .
flutter test test/
[✓] Flutter (Channel master, v1.10.6-pre.39, on Linux, locale fr_FR.UTF-8)
• Flutter version 1.10.6-pre.39 at /home/rbarbe/programes/flutter
• Framework revision 4815b26d71 (il y a 7 jours), 2019-09-24 00:21:44 -0700
• Engine revision 953ac71749
• Dart version 2.6.0 (build 2.6.0-dev.1.0 d53d355c6c)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /home/rbarbe/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /home/rbarbe/programes/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Android Studio (version 3.3)
• Android Studio at /home/rbarbe/programes/android-studio
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[✓] IntelliJ IDEA Community Edition (version 2019.1)
• IntelliJ at /home/rbarbe/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/191.6183.87
• Flutter plugin version 35.2.2
• Dart plugin version 191.6183.88
[✓] IntelliJ IDEA Community Edition (version 2019.2)
• IntelliJ at /home/rbarbe/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/192.6603.28
• Flutter plugin version 39.0.5
• Dart plugin version 192.6603.23
[✓] VS Code (version 1.38.1)
• VS Code at /usr/share/code
• Flutter extension version 3.4.1
[✓] Connected device (2 available)
• Chrome • chrome • web-javascript • Google Chrome 77.0.3865.90
• Server • web • web-javascript • Flutter Tools
• No issues found!
最佳答案
方法(一)
flutter run -d chrome --web-port 2021 test/home_test.dart
或类似的东西关于flutter - 如何在 chrome 平台上运行 flutter 测试? "No tests ran"尝试启动项目时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58180937/
我是一名优秀的程序员,十分优秀!