class Inferno::Entities::Result

A `Result` represents the result of running a `Test`, `TestGroup`, or `TestSuite`

@attr_accessor [String] id id of the session @attr_accessor [Time] created_at creation timestamp @attr_accessor [Time] updated_at update timestamp @attr_accessor [String] reference_type type of entity this result belongs

to (`Test`, `TestGroup`, or `TestSuite`)

@attr_accessor [String, nil] test_id id of the `Test` this result belongs

to

@attr_accessor [Test, nil] test the `Test` this result belongs to @attr_accessor [String, nil] test_group_id id of the `TestGroup` this

result belongs to

@attr_accessor [TestGroup, nil] test_group the `TestGroup` this result

belongs to

@attr_accessor [String, nil] test_suite_id id of the `TestSuite` this

result belongs to

@attr_accessor [TestSuite, nil] test_suite the `TestSuite` this result

belongs to

@attr_accessor [String] result the result (`pass`, `fail`, `skip`, `omit`,

`error`, `running`, `wait`, `cancel`)

@attr_accessor [String] result_message summary message for this result @attr_accessor [String] test_run_id the `TestRun` this result belongs to @attr_accessor [String] test_session_id the `TestSession` this result

belongs to

@attr_accessor [Array<Inferno::Entities::Message>] messages additional

messages for this result

@attr_accessor [Array<Inferno::Entities::Request>] request_summaries

summaries of the requests associated with this result

@attr_accessor [String] input_json JSON string of the inputs used for this

result

@attr_accessor [String] output_json JSON string of the outputs created by

this result

Constants

ATTRIBUTES
RESULT_OPTIONS

Public Class Methods

new(params) click to toggle source
Calls superclass method Inferno::Entities::Entity::new
# File lib/inferno/entities/result.rb, line 47
def initialize(params)
  super(params, ATTRIBUTES - [:messages, :requests])

  @messages = (params[:messages] || []).map { |message| Message.new(message) }
  @requests = (params[:requests] || []).map { |request| Request.new(request) }
end

Public Instance Methods

runnable() click to toggle source

@return [Inferno::Entities::Test, Inferno::Entities::TestGroup, Inferno::Entities::TestSuite]

# File lib/inferno/entities/result.rb, line 55
def runnable
  test || test_group || test_suite
end
waiting?() click to toggle source

@return [Boolean]

# File lib/inferno/entities/result.rb, line 60
def waiting?
  result == 'wait'
end