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.



383
384
385
386
# File 'trainer/lib/trainer/xcresult.rb', line 383

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.



382
383
384
# File 'trainer/lib/trainer/xcresult.rb', line 382

def test_case_name
  @test_case_name
end

Instance Method Details

#failure_messageObject



388
389
390
391
392
393
394
395
396
# File 'trainer/lib/trainer/xcresult.rb', line 388

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