Class: Inferno::Entities::TestRun

Inherits:
Entity
  • Object
show all
Includes:
Attributes, HasRunnable
Defined in:
lib/inferno/entities/test_run.rb

Overview

A ‘TestRun` represents a request to execute an executable set of tests.

Constant Summary collapse

STATUS_OPTIONS =
['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
ATTRIBUTES =
[
  :id,
  :test_session_id,
  :status,
  :test_suite_id,
  :test_group_id,
  :test_id,
  :test,
  :test_group,
  :test_suite,
  :inputs,
  :results,
  :identifier,
  :wait_timeout,
  :created_at,
  :updated_at
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HasRunnable

#runnable

Methods included from Attributes

included

Constructor Details

#initialize(params) ⇒ TestRun

How to define test run inputs? Class in this file? Separate Entity?



61
62
63
64
65
# File 'lib/inferno/entities/test_run.rb', line 61

def initialize(params)
  super(params, ATTRIBUTES)

  @test_session = params[:test_session]
end

Instance Attribute Details

#created_atTime

Returns creation timestamp.

Returns:

  • (Time)

    creation timestamp



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#idString

Returns id of the test run.

Returns:

  • (String)

    id of the test run



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#identifierString?

Returns identfier for a waiting ‘TestRun`.

Returns:

  • (String, nil)

    identfier for a waiting ‘TestRun`



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#inputsArray<Hash>

Returns:

  • (Array<Hash>)


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#resultsArray<Inferno::Entities::Result>

Returns:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#statusString

Returns:

  • (String)


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#testTest?

Returns the ‘Test` this result belongs to.

Returns:

  • (Test, nil)

    the ‘Test` this result belongs to



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#test_groupTestGroup?

Returns the ‘TestGroup` this result belongs to.

Returns:

  • (TestGroup, nil)

    the ‘TestGroup` this result belongs to



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#test_group_idString?

Returns id of the ‘TestGroup` this result belongs to.

Returns:

  • (String, nil)

    id of the ‘TestGroup` this result belongs to



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#test_idString?

Returns id of the ‘Test` this result belongs to.

Returns:

  • (String, nil)

    id of the ‘Test` this result belongs to



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#test_sessionObject

Returns the value of attribute test_session.



57
58
59
# File 'lib/inferno/entities/test_run.rb', line 57

def test_session
  @test_session
end

#test_session_idString

Returns:

  • (String)


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#test_suiteTestSuite?

Returns the ‘TestSuite` this result belongs to.

Returns:

  • (TestSuite, nil)

    the ‘TestSuite` this result belongs to



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#test_suite_idString?

Returns id of the ‘TestSuite` this result belongs to.

Returns:

  • (String, nil)

    id of the ‘TestSuite` this result belongs to



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#updated_atTime

Returns update timestamp.

Returns:

  • (Time)

    update timestamp



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

#wait_timeoutObject

A ‘TestRun` represents a request to execute an executable set of tests.



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/inferno/entities/test_run.rb', line 34

class TestRun < Entity
  STATUS_OPTIONS = ['queued', 'running', 'waiting', 'cancelling', 'done'].freeze
  ATTRIBUTES = [
    :id,
    :test_session_id,
    :status,
    :test_suite_id,
    :test_group_id,
    :test_id,
    :test,
    :test_group,
    :test_suite,
    :inputs,
    :results,
    :identifier,
    :wait_timeout,
    :created_at,
    :updated_at
  ].freeze

  include Inferno::Entities::Attributes
  include Inferno::Entities::HasRunnable

  attr_accessor :test_session

  # How to define test run inputs?  Class in this file?  Separate Entity?

  def initialize(params)
    super(params, ATTRIBUTES)

    @test_session = params[:test_session]
  end

  def to_hash
    super.merge(test_session:).compact
  end

  def test_count(selected_suite_options = [])
    @test_count ||= runnable.test_count(selected_suite_options)
  end
end

Instance Method Details

#test_count(selected_suite_options = []) ⇒ Object



71
72
73
# File 'lib/inferno/entities/test_run.rb', line 71

def test_count(selected_suite_options = [])
  @test_count ||= runnable.test_count(selected_suite_options)
end

#to_hashObject



67
68
69
# File 'lib/inferno/entities/test_run.rb', line 67

def to_hash
  super.merge(test_session:).compact
end