Module: Trainer::XCResult::Parser

Defined in:
trainer/lib/trainer/xcresult.rb

Class Method Summary collapse

Class Method Details

.parse_xcresult(path:, output_remove_retry_attempts: false) ⇒ TestPlan

Parses an xcresult file and returns a TestPlan object

Parameters:

  • path (String)

    The path to the xcresult file

  • output_remove_retry_attempts (Boolean) (defaults to: false)

    Whether to remove retry attempts from the output

Returns:

  • (TestPlan)

    A TestPlan object containing the test results



22
23
24
25
26
27
28
29
30
# File 'trainer/lib/trainer/xcresult.rb', line 22

def parse_xcresult(path:, output_remove_retry_attempts: false)
  json = xcresult_to_json(path)

  TestPlan.from_json(
    json: json
  ).tap do |test_plan|
    test_plan.output_remove_retry_attempts = output_remove_retry_attempts
  end
end