Tumiya/forsis

Test_sonarqube_report.xml is Empty when Tests Execute in Parallel

Opened this issue · 0 comments

Test_sonarqube_report.xml is empty when executing fastlane scan in parallel.

We uses fastlane to get the Unit Tests and the coverage. The part of the lane we are executing is:

Without parallel:

  parallel = "false"
  xcodebuild_formatter = "xcpretty"
  if parallel == "true"
    xcodebuild_formatter = "xcbeautify"
  end
  scan(
    devices: simulators_names,
    parallel_testing: "#{parallel}",
    concurrent_workers: ENV["concurrent_workers"],
    xcodebuild_formatter: "#{xcodebuild_formatter}"
  )
  #Plugin para convertir fichero .junit en xml para que se suban los Unit Tests a SonarQube.
  forsis(
    junit_report_file: './reports/report.junit',
    sonar_report_directory: './reports'
  )

With parallel:

  parallel = "true"
  xcodebuild_formatter = "xcpretty"
  if parallel == "true"
    xcodebuild_formatter = "xcbeautify"
  end
  scan(
    devices: simulators_names,
    parallel_testing: "#{parallel}",
    concurrent_workers: ENV["concurrent_workers"],
    xcodebuild_formatter: "#{xcodebuild_formatter}"
  )
  #Plugin para convertir fichero .junit en xml para que se suban los Unit Tests a SonarQube.
  forsis(
    junit_report_file: './reports/report.junit',
    sonar_report_directory: './reports'
  )

I attach both files generated without parallel (and with xcpretty) and with parallel (and with xcbeautify).
Test_sonarqube_report_without_parallel.xml.txt
Test_sonarqube_report_with_parallel.xml.txt
report_without_parallel.junit.txt
report_with_parallel.junit.txt

Any idea?