You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何配置Fastlane scan参数输出JSON格式测试报告?

fastlane scan 生成JSON格式测试报告方法

直接在原命令里加--output_types参数,把json加到要输出的报告类型列表里就行。
scan默认的输出报告类型是html,junit,所以之前跑的时候只会出这两种格式的报告。

改完的完整执行命令:

fastlane scan --workspace "MyWorkspace.xcworkspace" --scheme "UITests" --device "iPhone 8 Plus" --testplan "MyTestPlan" --output_types "html,junit,json" --output_directory "~/Desktop/TestLogs/"
  • --output_types后面跟逗号分隔的格式名即可,原生支持的格式包含json、html、junit、xcresult,可按需增减。
  • 命令执行完成后,指定的~/Desktop/TestLogs/目录下会新增JSON格式的测试报告,该功能为scan原生支持,无需安装额外插件。

内容的提问来源于stack exchange,提问作者Jose Marchena

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.27 22:09:17