【问题标题】:Failed to load dartium when running test运行测试时加载 dartium 失败
【发布时间】:2015-06-05 20:49:21
【问题描述】:

我正在使用 test 库运行 dart 测试。

pub run test -p dartium

执行此命令时出现以下错误,我已下载 dartium 和 dart sdk 并位于系统路径中。

Failed to start Dartium: No such file or directory
  Command: dartium --user-data-dir=/tmp/dart_test_cwDGGO 

【问题讨论】:

  • 什么操作系统?文件夹/tmp 是否存在?您是否有权在/tmp 中创建子文件夹?您是否尝试过使用此命令手动启动 Dartium?
  • 我在 ubuntu 上并且 /tmp 文件夹不存在。我可以手动运行 dartium,我在 windows 盒子上尝试过同样的事情,但没有运气:(
  • 您的tmp 文件夹在哪里? /tmp 通常在 Linux 上可用。可以用dartium --user-data-dir=/tmp/xxx手动运行吗?
  • 即使在临时文件夹中我也看不到/运行 dartium。我的 Windows 机器上的行为相同
  • @GünterZöchbauer 谢谢!,我发现了问题,请看我的回答。

标签: dart dart-html dart-unittest


【解决方案1】:

我缺少符号链接。添加符号链接后,测试工作正常。

ln -s /path/to/chrome /path/to/dartium

/path/to/chrome 是 dartium 目录中的 chrome 可执行文件

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-09
    • 2021-10-25
    • 2021-07-13
    相关资源
    最近更新 更多