Class: FlakyTestTracker::Test

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model, ActiveModel::Serializers::JSON
Defined in:
lib/flaky_test_tracker/test.rb

Overview

Test model.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionString

Test description.

Returns:

  • (String)

    the current value of description



18
19
20
# File 'lib/flaky_test_tracker/test.rb', line 18

def description
  @description
end

#exceptionString

Test exception message.

Returns:

  • (String)

    the current value of exception



18
19
20
# File 'lib/flaky_test_tracker/test.rb', line 18

def exception
  @exception
end

#file_pathString

Test source code file path.

Returns:

  • (String)

    the current value of file_path



18
19
20
# File 'lib/flaky_test_tracker/test.rb', line 18

def file_path
  @file_path
end

#finished_atTime

The moment the test last occurrence occured.

Returns:

  • (Time)

    the current value of finished_at



18
19
20
# File 'lib/flaky_test_tracker/test.rb', line 18

def finished_at
  @finished_at
end

#idString

Storage ID.

Returns:

  • (String)

    the current value of id



18
19
20
# File 'lib/flaky_test_tracker/test.rb', line 18

def id
  @id
end

#line_numberInteger

Test source code line number.

Returns:

  • (Integer)

    the current value of line_number



18
19
20
# File 'lib/flaky_test_tracker/test.rb', line 18

def line_number
  @line_number
end

#number_occurrencesInteger

The number of times a failure was tracked.

Returns:

  • (Integer)

    the current value of number_occurrences



18
19
20
# File 'lib/flaky_test_tracker/test.rb', line 18

def number_occurrences
  @number_occurrences
end

#referenceString

Test unique reference.

Returns:

  • (String)

    the current value of reference



18
19
20
# File 'lib/flaky_test_tracker/test.rb', line 18

def reference
  @reference
end

#resolved_atTime

The moment the test was resolved.

Returns:

  • (Time)

    the current value of resolved_at



18
19
20
# File 'lib/flaky_test_tracker/test.rb', line 18

def resolved_at
  @resolved_at
end

#source_location_urlString

Test source code location URL.

Returns:

  • (String)

    the current value of source_location_url



18
19
20
# File 'lib/flaky_test_tracker/test.rb', line 18

def source_location_url
  @source_location_url
end

#urlString

Storage URL (optional).

Returns:

  • (String)

    the current value of url



18
19
20
# File 'lib/flaky_test_tracker/test.rb', line 18

def url
  @url
end

Instance Method Details

#==(other) ⇒ Object



44
45
46
# File 'lib/flaky_test_tracker/test.rb', line 44

def ==(other)
  attributes == other.attributes
end

#locationObject



48
49
50
# File 'lib/flaky_test_tracker/test.rb', line 48

def location
  "#{file_path}:#{line_number}"
end

#resolved?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/flaky_test_tracker/test.rb', line 52

def resolved?
  !resolved_at.nil?
end