Class: Allure::TestResult
- Inherits:
-
ExecutableItem
- Object
- JSONable
- ExecutableItem
- Allure::TestResult
- Defined in:
- lib/allure_ruby_commons/model/test_result.rb
Overview
Allure model test result container
Instance Attribute Summary collapse
-
#full_name ⇒ Object
Returns the value of attribute full_name.
-
#history_id ⇒ String
History id.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#links ⇒ Object
Returns the value of attribute links.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Attributes inherited from ExecutableItem
#attachments, #description, #description_html, #name, #parameters, #stage, #start, #status, #status_details, #steps, #stop
Instance Method Summary collapse
-
#initialize(uuid: SecureRandom.uuid, history_id: SecureRandom.uuid, environment: nil, **options) ⇒ TestResult
constructor
A new instance of TestResult.
Methods inherited from JSONable
Constructor Details
#initialize(uuid: SecureRandom.uuid, history_id: SecureRandom.uuid, environment: nil, **options) ⇒ TestResult
Returns a new instance of TestResult.
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/allure_ruby_commons/model/test_result.rb', line 22 def initialize(uuid: SecureRandom.uuid, history_id: SecureRandom.uuid, environment: nil, **) super @name = [:name] @uuid = uuid @history_id = history_id @full_name = [:full_name] || "Unnamed" @labels = [:labels] || [] @links = [:links] || [] @parameters << Parameter.new("environment", environment) if environment end |
Instance Attribute Details
#full_name ⇒ Object
Returns the value of attribute full_name.
34 35 36 |
# File 'lib/allure_ruby_commons/model/test_result.rb', line 34 def full_name @full_name end |
#history_id ⇒ String
History id
44 45 46 |
# File 'lib/allure_ruby_commons/model/test_result.rb', line 44 def history_id Digest::MD5.hexdigest("#{@history_id}#{parameters_string}") end |
#labels ⇒ Object
Returns the value of attribute labels.
34 35 36 |
# File 'lib/allure_ruby_commons/model/test_result.rb', line 34 def labels @labels end |
#links ⇒ Object
Returns the value of attribute links.
34 35 36 |
# File 'lib/allure_ruby_commons/model/test_result.rb', line 34 def links @links end |
#uuid ⇒ Object
Returns the value of attribute uuid.
34 35 36 |
# File 'lib/allure_ruby_commons/model/test_result.rb', line 34 def uuid @uuid end |