最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to run unit test parallel in fastlane iOS - Stack Overflow

programmeradmin1浏览0评论

Is there any useful plugin to run parallel unit test in fastlane for ios? lets say like i have 10 schemes, currently its running in loop but it is taking too much of time. so i wanted to run parallel and reduce time.

Someone please suggest any good fastlane plugin or concept for me to explore and apply the same to my project.

sample fastlane code following looping strategy

desc "Run Tests"
  lane :runUnitTest do

    # clear previous metrics data before scan
    clearDerivedData

    schemes = get_schemes
    scheme = scheme
    runSchemes = [1, 2, 3, 4, 5, 6, 7]

    schemes.each do |scheme|
      if runSchemes.include?(scheme)
        puts "schemes: #{scheme}"
        scan(
          package_path: “./Schemes/#{scheme}/", # This makes swift package testing possible without a pbxproj or xcworkspace file
          scheme: scheme, # Needs "-Package" at the end
          clean: true,
          device: "iPhone 15", # This is needed for a proper destination
          output_types: 'junit',
          output_files: 'junit.xml',
          result_bundle: true, # Other errors with xcoutput required me to add this
          output_directory: File.expand_path("../sonar-reports", __dir__)
        )
end
end
发布评论

评论列表(0)

  1. 暂无评论