Class: Trainer::XCResult::TestFailureIssueSummary

Inherits:
IssueSummary show all
Defined in:
trainer/lib/trainer/xcresult.rb

Overview

  • TestFailureIssueSummary

    • Supertype: IssueSummary

    • Kind: object

    • Properties: + testCaseName: String

Instance Attribute Summary collapse

Attributes inherited from IssueSummary

#document_location_in_creating_workspace, #issue_type, #message, #producing_target

Attributes inherited from AbstractObject

#type

Instance Method Summary collapse

Methods inherited from AbstractObject

#fetch_value, #fetch_values

Constructor Details

#initialize(data) ⇒ TestFailureIssueSummary

Returns a new instance of TestFailureIssueSummary.



387
388
389
390
# File 'trainer/lib/trainer/xcresult.rb', line 387

def initialize(data)
  self.test_case_name = fetch_value(data, "testCaseName")
  super
end

Instance Attribute Details

#test_case_nameObject

Returns the value of attribute test_case_name.



386
387
388
# File 'trainer/lib/trainer/xcresult.rb', line 386

def test_case_name
  @test_case_name
end

Instance Method Details

#failure_messageObject



392
393
394
395
396
397
398
399
400
# File 'trainer/lib/trainer/xcresult.rb', line 392

def failure_message
  new_message = self.message
  if self.document_location_in_creating_workspace&.url
    file_path = self.document_location_in_creating_workspace.url.gsub("file://", "")
    new_message += " (#{file_path})"
  end

  return new_message
end