Class: Fastlane::Actions::XctestAction

Inherits:
Fastlane::Action show all
Defined in:
lib/fastlane/actions/xcodebuild.rb

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, authors, details, output, return_value, sh, step_text

Class Method Details

.authorObject



537
538
539
# File 'lib/fastlane/actions/xcodebuild.rb', line 537

def self.author
  "dtrenz"
end

.available_optionsObject



515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
# File 'lib/fastlane/actions/xcodebuild.rb', line 515

def self.available_options
  [
    ['archive', 'Set to true to build archive'],
    ['archive_path', 'The path to archive the to. Must contain `.xcarchive`'],
    ['workspace', 'The workspace to use'],
    ['scheme', 'The scheme to build'],
    ['build_settings', 'Hash of additional build information'],
    ['xcargs', 'Pass additional xcodebuild options'],
    ['destination', 'The simulator to use, e.g. "name=iPhone 5s,OS=8.1"'],
    ['destination_timeout', 'The timeout for connecting to the simulator, in seconds'],
    ['enable_code_coverage', 'Turn code coverage on or off when testing. eg. true|false. Requires Xcode 7+'],
    ['output_style', 'Set the output format to one of: :standard (Colored UTF8 output, default), :basic (black & white ASCII output)'],
    ['buildlog_path', 'The path where the xcodebuild.log will be created, by default it is created in ~/Library/Logs/fastlane/xcbuild'],
    ['raw_buildlog', 'Set to true to see xcodebuild raw output. Default value is false'],
    ['xcpretty_output', 'specifies the output type for xcpretty. eg. \'test\', or \'simple\'']
  ]
end

.descriptionObject



511
512
513
# File 'lib/fastlane/actions/xcodebuild.rb', line 511

def self.description
  "Runs tests on the given simulator"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


533
534
535
# File 'lib/fastlane/actions/xcodebuild.rb', line 533

def self.is_supported?(platform)
  [:ios, :mac].include? platform
end

.run(params) ⇒ Object



502
503
504
505
506
507
508
509
# File 'lib/fastlane/actions/xcodebuild.rb', line 502

def self.run(params)
  UI.important("Have you seen the new 'scan' tool to run tests? https://github.com/fastlane/fastlane/tree/master/scan")
  params_hash = params || {}
  params_hash[:build] = true
  params_hash[:test] = true

  XcodebuildAction.run(params_hash)
end