Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating Code coverage with Fastlane/Jenkins

I'm trying to generate a code coverage with Sonar/Jenkins by Fastlane.

The script I run with Jenkins: Fastlane test.

In my fastfile i do this:

desc "Runs all the tests"
lane :test do
  scan(scheme: "XXX-icTests",
    clean: true,
    code_coverage: true,
    output_directory: "sonar-reports",
    output_types: "junit,json-compilation-database",
    buildlog_path: "sonar-reports",
    derived_data_path: "sonar-reports",
    use_clang_report_name: true,
    xcargs: "ONLY_ACTIVE_ARCH=YES"
  )
  slather(
    cobertura_xml: true,
    output_directory: "sonar-reports",
    proj: " XXX.xcodeproj",
    workspace: " XXX.xcworkspace",
    scheme: " XXX-ic",
    build_directory: "sonar-reports",
    ignore:[]
  )
  oclint(
    compile_commands: "sonar-reports/compile_commands.json",
    report_type: 'pmd',
    select_regex: /XXX/,
    max_priority_1: 10,
    max_priority_2: 400,
    max_priority_3: 4000,
    enable_clang_static_analyzer: false,
    allow_duplicated_violations: false,
    list_enabled_rules: true,
    report_path: "sonar-reports/oclint.xml"
  ) 
  sonar
end

But when building the app on the simulator it stops here:

enter image description here

What can be the problem in this case?

Thanks for the help.

like image 341
Nedra Kachroudi Avatar asked Mar 02 '26 14:03

Nedra Kachroudi


1 Answers

I am using next before the fastlane scan.. on the shell script

FASTLANE_EXPLICIT_OPEN_SIMULATOR=2 fastlane scan --scheme $job

That will trigger the simulator

like image 173
Sandra Avatar answered Mar 04 '26 17:03

Sandra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!