【问题标题】:Can I use mach to do unit test for thunderbird on windows?我可以使用 mach 在 Windows 上对 Thunderbird 进行单元测试吗?
【发布时间】:2014-07-09 02:32:43
【问题描述】:

我最近一直在做一些 Thunderbird 开发,想为我的 XPCOM 模块做一些单元测试。我注意到在 mozilla 中有一个叫做 mach 的工具,它可以一次自动运行一组测试用例,但是当我在 windows 上运行“mach help”时,它显示

"is_platform_supported - 必须有一个Firefox、Android 或 B2G 构建。”

由于我使用的是 Thunderbird,这是否意味着我不能使用 mach 对 Thunderbird 进行单元测试?如果不是这样 - 我希望 - 我如何更改我的配置以使用该工具?
您的任何回复将不胜感激!
提前致谢。

【问题讨论】:

    标签: unit-testing thunderbird


    【解决方案1】:

    目前,mozilla/mach xpcshell-test 不起作用(参见错误934170)。作为一种解决方法,请使用以下方法:

    • 首先,构建 Thunderbird 后切换到对象目录。
    • 要运行所有 xpcshell 测试,请使用:make xpcshell-tests
    • 要运行单个 xpcshell 测试,请使用(例如):make xpcshell-tests TEST_PATH=mailnews/news/test/unit/test_server.js
    • 要在给定目录中运行所有 xpcshell 测试,请使用(例如):make xpcshell-tests TEST_PATH=mailnews/news

    【讨论】:

      猜你喜欢
      • 2010-09-22
      • 1970-01-01
      • 2019-08-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多