Class: FlakyTestTracker::Test
- Inherits:
-
Object
- Object
- FlakyTestTracker::Test
- Includes:
- ActiveModel::Model, ActiveModel::Serializers::JSON
- Defined in:
- lib/flaky_test_tracker/test.rb
Overview
Test model.
Instance Attribute Summary collapse
-
#description ⇒ String
Test description.
-
#exception ⇒ String
Test exception message.
-
#file_path ⇒ String
Test source code file path.
-
#finished_at ⇒ Time
The moment the test last occurrence occured.
-
#id ⇒ String
Storage ID.
-
#line_number ⇒ Integer
Test source code line number.
-
#number_occurrences ⇒ Integer
The number of times a failure was tracked.
-
#reference ⇒ String
Test unique reference.
-
#resolved_at ⇒ Time
The moment the test was resolved.
-
#source_location_url ⇒ String
Test source code location URL.
-
#url ⇒ String
Storage URL (optional).
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ String
Test description.
18 19 20 |
# File 'lib/flaky_test_tracker/test.rb', line 18 def description @description end |
#exception ⇒ String
Test exception message.
18 19 20 |
# File 'lib/flaky_test_tracker/test.rb', line 18 def exception @exception end |
#file_path ⇒ String
Test source code file path.
18 19 20 |
# File 'lib/flaky_test_tracker/test.rb', line 18 def file_path @file_path end |
#finished_at ⇒ Time
The moment the test last occurrence occured.
18 19 20 |
# File 'lib/flaky_test_tracker/test.rb', line 18 def finished_at @finished_at end |
#id ⇒ String
Storage ID.
18 19 20 |
# File 'lib/flaky_test_tracker/test.rb', line 18 def id @id end |
#line_number ⇒ Integer
Test source code line number.
18 19 20 |
# File 'lib/flaky_test_tracker/test.rb', line 18 def line_number @line_number end |
#number_occurrences ⇒ Integer
The number of times a failure was tracked.
18 19 20 |
# File 'lib/flaky_test_tracker/test.rb', line 18 def number_occurrences @number_occurrences end |
#reference ⇒ String
Test unique reference.
18 19 20 |
# File 'lib/flaky_test_tracker/test.rb', line 18 def reference @reference end |
#resolved_at ⇒ Time
The moment the test was resolved.
18 19 20 |
# File 'lib/flaky_test_tracker/test.rb', line 18 def resolved_at @resolved_at end |
#source_location_url ⇒ String
Test source code location URL.
18 19 20 |
# File 'lib/flaky_test_tracker/test.rb', line 18 def source_location_url @source_location_url end |
#url ⇒ String
Storage URL (optional).
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 |
#location ⇒ Object
48 49 50 |
# File 'lib/flaky_test_tracker/test.rb', line 48 def location "#{file_path}:#{line_number}" end |
#resolved? ⇒ Boolean
52 53 54 |
# File 'lib/flaky_test_tracker/test.rb', line 52 def resolved? !resolved_at.nil? end |