【问题标题】:Fastlane Integration with XcodeFastlane 与 Xcode 的集成
【发布时间】:2021-07-14 06:49:53
【问题描述】:

我正在尝试将我的示例项目 UberClone 与 Fastlane 集成。 我有 3 个目标

优步克隆

UberCloneTest

UberCloneUITest


我创建了如下的 fastfile 并下载了 fastlane,但我需要你的帮助来集成 fastlane 测试是否正常。我怎样才能建立这个文件?

  default_platform(:ios)


platform :ios do
# 1
  desc "ui test and unit tests need to check"
# 2
  lane :create_app do
# 3
​    produce
  end
end

【问题讨论】:

    标签: ios swift ruby xcode fastlane


    【解决方案1】:

    要运行测试,请参阅https://docs.fastlane.tools/getting-started/ios/running-tests/

    要运行 Swiftlint,请参阅 https://docs.fastlane.tools/actions/swiftlint/

    我真的建议通读 fastlane 文档。一开始可能很难掌握,但更容易理解车道和所有功能。请参阅https://docs.fastlane.tools/getting-started/ios/setup/,我还建议您查看 fastlane 的 github 示例。

    例如运行 swiftlint,然后运行单元和 UI 测试fastlane tests

    default_platform(:ios)
    
    
    platform :ios do
    
      lane :tests do
        swiftlint()
    ​    run_tests(scheme: "UberCloneTest")
    ​    run_tests(scheme: "UberCloneUITest")
      end
    end
    

    【讨论】:

    • 感谢您的回复和文档,但我已经阅读了所有文档,但它几乎不需要背景。 github的例子也很复杂,不适合初学者。
    • 我需要做的就是把这个 fastfile 放到我的文件中并在命令行中运行 fastlane 测试?
    • @DrainOpener - 是的,你需要更新你的 fastfile,然后在你的项目目录中使用命令行,你可以运行 fastlane 测试
    猜你喜欢
    • 2020-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多