inferno_core 0.0.4 → 0.0.8.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/bin/inferno +7 -0
  3. data/lib/inferno/apps/cli/console.rb +12 -0
  4. data/lib/inferno/apps/cli/main.rb +18 -0
  5. data/lib/inferno/apps/cli/migration.rb +14 -0
  6. data/lib/inferno/apps/cli.rb +8 -0
  7. data/lib/inferno/apps/web/controllers/test_runs/create.rb +15 -2
  8. data/lib/inferno/apps/web/index.html.erb +1 -0
  9. data/lib/inferno/apps/web/serializers/hash_value_extractor.rb +11 -0
  10. data/lib/inferno/apps/web/serializers/test.rb +3 -4
  11. data/lib/inferno/apps/web/serializers/test_group.rb +4 -6
  12. data/lib/inferno/config/application.rb +4 -0
  13. data/lib/inferno/config/boot/db.rb +1 -9
  14. data/lib/inferno/config/boot/logging.rb +2 -0
  15. data/lib/inferno/config/boot/suites.rb +4 -6
  16. data/lib/inferno/dsl/assertions.rb +85 -0
  17. data/lib/inferno/dsl/configurable.rb +126 -0
  18. data/lib/inferno/dsl/fhir_client.rb +22 -16
  19. data/lib/inferno/dsl/fhir_client_builder.rb +3 -3
  20. data/lib/inferno/dsl/fhir_validation.rb +105 -1
  21. data/lib/inferno/dsl/http_client.rb +14 -12
  22. data/lib/inferno/dsl/http_client_builder.rb +3 -3
  23. data/lib/inferno/dsl/request_storage.rb +26 -17
  24. data/lib/inferno/dsl/results.rb +1 -1
  25. data/lib/inferno/dsl/resume_test_route.rb +10 -10
  26. data/lib/inferno/dsl/runnable.rb +104 -38
  27. data/lib/inferno/entities/header.rb +14 -7
  28. data/lib/inferno/entities/message.rb +16 -8
  29. data/lib/inferno/entities/request.rb +34 -21
  30. data/lib/inferno/entities/result.rb +36 -29
  31. data/lib/inferno/entities/session_data.rb +12 -6
  32. data/lib/inferno/entities/test.rb +29 -2
  33. data/lib/inferno/entities/test_group.rb +8 -0
  34. data/lib/inferno/entities/test_run.rb +29 -6
  35. data/lib/inferno/entities/test_session.rb +16 -10
  36. data/lib/inferno/exceptions.rb +12 -0
  37. data/lib/inferno/public/217.bundle.js +1 -1
  38. data/lib/inferno/public/bundle.js +154 -1
  39. data/lib/inferno/public/bundle.js.LICENSE.txt +15 -0
  40. data/lib/inferno/repositories/in_memory_repository.rb +1 -1
  41. data/lib/inferno/repositories/results.rb +1 -1
  42. data/lib/inferno/repositories/test_runs.rb +15 -0
  43. data/lib/inferno/spec_support.rb +1 -1
  44. data/lib/inferno/test_runner.rb +21 -19
  45. data/lib/inferno/utils/markdown_formatter.rb +15 -0
  46. data/lib/inferno/utils/middleware/request_logger.rb +9 -3
  47. data/lib/inferno/utils/migration.rb +17 -0
  48. data/lib/inferno/version.rb +1 -1
  49. data/lib/inferno.rb +0 -4
  50. data/spec/factories/request.rb +14 -7
  51. metadata +58 -8
  52. data/bin/inferno-console +0 -8
@@ -1,4 +1,6 @@
1
+ require_relative 'configurable'
1
2
  require_relative 'resume_test_route'
3
+ require_relative '../utils/markdown_formatter'
2
4
 
3
5
  module Inferno
4
6
  module DSL
@@ -7,14 +9,17 @@ module Inferno
7
9
  module Runnable
8
10
  attr_accessor :parent
9
11
 
12
+ include Inferno::Utils::MarkdownFormatter
13
+
10
14
  # When a class (e.g. TestSuite/TestGroup) uses this module, set it up
11
15
  # so that subclassing it works correctly.
12
16
  # - add the subclass to the relevant repository when it is created
13
17
  # - copy the class instance variables from the superclass
14
18
  # - add a hook to the subclass so that its subclasses do the same
15
- # @api private
19
+ # @private
16
20
  def self.extended(extending_class)
17
21
  super
22
+ extending_class.extend Configurable
18
23
 
19
24
  extending_class.define_singleton_method(:inherited) do |subclass|
20
25
  copy_instance_variables(subclass)
@@ -36,14 +41,16 @@ module Inferno
36
41
  # classes. When inheriting from a Runnable class, these class instance
37
42
  # variables need to be copied. Any child Runnable classes will themselves
38
43
  # need to be subclassed so that their parent can be updated.
39
- # @api private
44
+ # @private
40
45
  def copy_instance_variables(subclass)
41
46
  instance_variables.each do |variable|
42
- next if [:@id, :@groups, :@tests, :@parent, :@children, :@test_count].include?(variable)
47
+ next if [:@id, :@groups, :@tests, :@parent, :@children, :@test_count, :@config].include?(variable)
43
48
 
44
49
  subclass.instance_variable_set(variable, instance_variable_get(variable).dup)
45
50
  end
46
51
 
52
+ subclass.config(config)
53
+
47
54
  child_types.each do |child_type|
48
55
  new_children = send(child_type).map do |child|
49
56
  Class.new(child).tap do |subclass_child|
@@ -56,12 +63,13 @@ module Inferno
56
63
  end
57
64
  end
58
65
 
59
- # @api private
66
+ # @private
60
67
  def add_self_to_repository
61
68
  repository.insert(self)
62
69
  end
63
70
 
64
71
  # An instance of the repository for the class using this module
72
+ # @private
65
73
  def repository
66
74
  nil
67
75
  end
@@ -69,7 +77,7 @@ module Inferno
69
77
  # This method defines a child entity. Classes using this module should
70
78
  # alias the method name they wish to use to define child entities to this
71
79
  # method.
72
- # @api private
80
+ # @private
73
81
  def define_child(*args, &block)
74
82
  hash_args = process_args(args)
75
83
 
@@ -89,7 +97,7 @@ module Inferno
89
97
  klass
90
98
  end
91
99
 
92
- # @api private
100
+ # @private
93
101
  def process_args(args)
94
102
  hash_args =
95
103
  if args[0].is_a? Hash
@@ -105,13 +113,13 @@ module Inferno
105
113
  hash_args
106
114
  end
107
115
 
108
- # @api private
116
+ # @private
109
117
  def child_metadata(metadata = nil)
110
118
  @child_metadata = metadata if metadata
111
119
  @child_metadata
112
120
  end
113
121
 
114
- # @api private
122
+ # @private
115
123
  def create_child_class(hash_args)
116
124
  superclass_id = hash_args.delete :from
117
125
 
@@ -124,18 +132,18 @@ module Inferno
124
132
  Class.new(superclass)
125
133
  end
126
134
 
127
- # @api private
135
+ # @private
128
136
  def configure_child_class(klass, hash_args) # rubocop:disable Metrics/CyclomaticComplexity
129
- inputs.each do |input_definition|
130
- next if klass.inputs.any? { |input| input[:name] == input_definition[:name] }
137
+ inputs.each do |name|
138
+ next if klass.inputs.any? { |klass_input_name| klass_input_name == name }
131
139
 
132
- klass.input input_definition[:name], input_definition
140
+ klass.input name
133
141
  end
134
142
 
135
- outputs.each do |output_definition|
136
- next if klass.outputs.include? output_definition
143
+ outputs.each do |output_name|
144
+ next if klass.outputs.include? output_name
137
145
 
138
- klass.output output_definition
146
+ klass.output output_name
139
147
  end
140
148
 
141
149
  new_fhir_client_definitions = klass.instance_variable_get(:@fhir_client_definitions) || {}
@@ -154,8 +162,14 @@ module Inferno
154
162
  end
155
163
  klass.instance_variable_set(:@http_client_definitions, new_http_client_definitions)
156
164
 
165
+ klass.config(config)
166
+
157
167
  hash_args.each do |key, value|
158
- klass.send(key, *value)
168
+ if value.is_a? Array
169
+ klass.send(key, *value)
170
+ else
171
+ klass.send(key, value)
172
+ end
159
173
  end
160
174
 
161
175
  klass.children.each do |child_class|
@@ -164,11 +178,15 @@ module Inferno
164
178
  end
165
179
  end
166
180
 
167
- # @api private
181
+ # @private
168
182
  def handle_child_definition_block(klass, &block)
169
183
  klass.class_eval(&block) if block_given?
170
184
  end
171
185
 
186
+ # Set/Get a runnable's id
187
+ #
188
+ # @param new_id [String,Symbol]
189
+ # @return [String,Symbol] the id
172
190
  def id(new_id = nil)
173
191
  return @id if new_id.nil? && @id.present?
174
192
 
@@ -184,70 +202,93 @@ module Inferno
184
202
  @id = "#{prefix}#{@base_id}"
185
203
  end
186
204
 
205
+ # Set/Get a runnable's title
206
+ #
207
+ # @param new_title [String]
208
+ # @return [String] the title
187
209
  def title(new_title = nil)
188
210
  return @title if new_title.nil?
189
211
 
190
212
  @title = new_title
191
213
  end
192
214
 
215
+ # Set/Get a runnable's description
216
+ #
217
+ # @param new_description [String]
218
+ # @return [String] the description
193
219
  def description(new_description = nil)
194
220
  return @description if new_description.nil?
195
221
 
196
- @description = new_description
222
+ @description = format_markdown(new_description)
197
223
  end
198
224
 
199
225
  # Define inputs
200
226
  #
201
- # @param name [Symbol] name of the input
202
- # @param other_names [Symbol] array of symbols if specifying multiple inputs
227
+ # @param identifier [Symbol] identifier for the input
228
+ # @param other_identifiers [Symbol] array of symbols if specifying multiple inputs
203
229
  # @param input_definition [Hash] options for input such as type, description, or title
204
230
  # @option input_definition [String] :title Human readable title for input
205
231
  # @option input_definition [String] :description Description for the input
206
232
  # @option input_definition [String] :type text | textarea
207
233
  # @option input_definition [String] :default The default value for the input
234
+ # @option input_definition [Boolean] :optional Set to true to not require input for test execution
208
235
  # @return [void]
209
236
  # @example
210
237
  # input :patientid, title: 'Patient ID', description: 'The ID of the patient being searched for',
211
238
  # default: 'default_patient_id'
212
239
  # @example
213
- # input :textarea, title: 'Textarea Input Example', type: 'textarea'
214
- def input(name, *other_names, **input_definition)
215
- if other_names.present?
216
- [name, *other_names].each do |input_name|
217
- inputs.push({ name: input_name, title: nil, description: nil, type: 'text' })
240
+ # input :textarea, title: 'Textarea Input Example', type: 'textarea', optional: true
241
+ def input(identifier, *other_identifiers, **input_definition)
242
+ if other_identifiers.present?
243
+ [identifier, *other_identifiers].compact.each do |input_identifier|
244
+ inputs << input_identifier
245
+ config.add_input(input_identifier)
218
246
  end
219
247
  else
220
- input_definition[:type] = 'text' unless input_definition.key? :type
221
- inputs.push({ name: name }.merge(input_definition))
248
+ inputs << identifier
249
+ config.add_input(identifier, input_definition)
222
250
  end
223
251
  end
224
252
 
225
253
  # Define outputs
226
254
  #
227
- # @param output_definitions [Symbol]
255
+ # @param output_list [Symbol]
228
256
  # @return [void]
229
257
  # @example
230
258
  # output :patient_id, :bearer_token
231
- def output(*output_definitions)
232
- outputs.concat(output_definitions)
259
+ def output(*output_list)
260
+ output_list.each do |output_identifier|
261
+ outputs << output_identifier
262
+ config.add_output(output_identifier)
263
+ end
233
264
  end
234
265
 
235
- # @api private
266
+ # @private
236
267
  def default_id
237
268
  to_s
238
269
  end
239
270
 
240
- # @api private
271
+ # @private
241
272
  def inputs
242
273
  @inputs ||= []
243
274
  end
244
275
 
245
- # @api private
276
+ # @private
277
+ def input_definitions
278
+ config.inputs.slice(*inputs)
279
+ end
280
+
281
+ # @private
282
+ def output_definitions
283
+ config.outputs.slice(*outputs)
284
+ end
285
+
286
+ # @private
246
287
  def outputs
247
288
  @outputs ||= []
248
289
  end
249
290
 
250
- # @api private
291
+ # @private
251
292
  def child_types
252
293
  return [] if ancestors.include? Inferno::Entities::Test
253
294
  return [:groups] if ancestors.include? Inferno::Entities::TestSuite
@@ -255,7 +296,7 @@ module Inferno
255
296
  [:groups, :tests]
256
297
  end
257
298
 
258
- # @api private
299
+ # @private
259
300
  def children
260
301
  @children ||= []
261
302
  end
@@ -266,7 +307,7 @@ module Inferno
266
307
  @validator_url = url
267
308
  end
268
309
 
269
- # @api private
310
+ # @private
270
311
  def suite
271
312
  return self if ancestors.include? Inferno::Entities::TestSuite
272
313
 
@@ -303,8 +344,8 @@ module Inferno
303
344
  # @yield This method takes a block which must return the identifier
304
345
  # defined when a test was set to wait for the test run that hit this
305
346
  # route. The block has access to the `request` method which returns a
306
- # {Inferno::DSL::Request} object with the information for the incoming
307
- # request.
347
+ # {Inferno::Entities::Request} object with the information for the
348
+ # incoming request.
308
349
  def resume_test_route(method, path, &block)
309
350
  route_class = Class.new(ResumeTestRoute) do
310
351
  define_method(:test_run_identifier, &block)
@@ -331,9 +372,34 @@ module Inferno
331
372
  Inferno.routes << { method: method, path: path, handler: handler, suite: suite }
332
373
  end
333
374
 
375
+ # @private
334
376
  def test_count
335
377
  @test_count ||= children&.reduce(0) { |sum, child| sum + child.test_count } || 0
336
378
  end
379
+
380
+ # @private
381
+ def required_inputs(prior_outputs = [])
382
+ required_inputs = inputs.select do |input|
383
+ !input_definitions[input][:optional] && !prior_outputs.include?(input)
384
+ end
385
+ required_inputs.map! { |input_identifier| input_definitions[input_identifier][:name] }
386
+ children_required_inputs = children.flat_map { |child| child.required_inputs(prior_outputs) }
387
+ prior_outputs.concat(outputs)
388
+ (required_inputs + children_required_inputs).flatten.uniq
389
+ end
390
+
391
+ # @private
392
+ def missing_inputs(submitted_inputs)
393
+ submitted_inputs = [] if submitted_inputs.nil?
394
+
395
+ required_inputs.map(&:to_s) - submitted_inputs.map { |input| input[:name] }
396
+ end
397
+
398
+ def user_runnable?
399
+ @user_runnable ||= parent.nil? ||
400
+ !parent.respond_to?(:run_as_group?) ||
401
+ (parent.user_runnable? && !parent.run_as_group?)
402
+ end
337
403
  end
338
404
  end
339
405
  end
@@ -2,13 +2,20 @@ module Inferno
2
2
  module Entities
3
3
  # A `Header` represents an HTTP request/response header
4
4
  #
5
- # @attr_accessor [String] id of the header
6
- # @attr_accessor [String] request_id index of the HTTP request
7
- # @attr_accessor [String] name header name
8
- # @attr_accessor [String] value header value
9
- # @attr_accessor [String] type request/response
10
- # @attr_accessor [Time] created_at
11
- # @attr_accessor [Time] updated_at
5
+ # @!attribute id
6
+ # @return [String] id of the header
7
+ # @!attribute request_id
8
+ # @return [String] index of the HTTP request
9
+ # @!attribute name
10
+ # @return [String] header name
11
+ # @!attribute value
12
+ # @return [String] header value
13
+ # @!attribute type
14
+ # @return [String] request/response
15
+ # @!attribute created_at
16
+ # @return [Time]
17
+ # @!attribute updated_at
18
+ # @return [Time]
12
19
  class Header < Entity
13
20
  ATTRIBUTES = [:id, :request_id, :name, :type, :value, :created_at, :updated_at].freeze
14
21
 
@@ -2,14 +2,22 @@ module Inferno
2
2
  module Entities
3
3
  # A `Message` represents a message generated during a test.
4
4
  #
5
- # @attr_accessor [String] id of the message
6
- # @attr_accessor [String] index of the message. Used for ordering.
7
- # @attr_accessor [String] result_id
8
- # @attr_accessor [Inferno::Entities::Result] result
9
- # @attr_accessor [String] type
10
- # @attr_accessor [String] message
11
- # @attr_accessor [Time] created_at
12
- # @attr_accessor [Time] updated_at
5
+ # @!attribute id
6
+ # @return [String] id of the message
7
+ # @!attribute index
8
+ # @return [String] index of the message. Used for ordering.
9
+ # @!attribute result_id
10
+ # @return [String]
11
+ # @!attribute result
12
+ # @return [Inferno::Entities::Result]
13
+ # @!attribute type
14
+ # @return [String]
15
+ # @!attribute message
16
+ # @return [String]
17
+ # @!attribute created_at
18
+ # @return [Time]
19
+ # @!attribute updated_at
20
+ # @return [Time]
13
21
  class Message < Entity
14
22
  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type, :created_at, :updated_at].freeze
15
23
  TYPES = ['error', 'warning', 'info'].freeze
@@ -2,21 +2,34 @@ module Inferno
2
2
  module Entities
3
3
  # A `Request` represents a request and response issued during a test.
4
4
  #
5
- # @attr_accessor [String] id of the request
6
- # @attr_accessor [String] index of the request. Used for ordering.
7
- # @attr_accessor [String] verb http verb
8
- # @attr_accessor [String] url request url
9
- # @attr_accessor [String] direction incoming/outgoing
10
- # @attr_accessor [String] name name for the request
11
- # @attr_accessor [String] status http response status code
12
- # @attr_accessor [String] request_body body of the http request
13
- # @attr_accessor [String] response_body body of the http response
14
- # @attr_accessor [Array<Inferno::Entities::Header>] headers http
15
- # request/response headers
16
- # @attr_accessor [String] result_id id of the result for this request
17
- # @attr_accessor [String] test_session_id id of the test session for this request
18
- # @attr_accessor [Time] created_at creation timestamp
19
- # @attr_accessor [Time] updated_at update timestamp
5
+ # @!attribute id
6
+ # @return [String] id of the request
7
+ # @!attribute index
8
+ # @return [String] index of the request. Used for ordering.
9
+ # @!attribute verb
10
+ # @return [String] http verb
11
+ # @!attribute url
12
+ # @return [String] request url
13
+ # @!attribute direction
14
+ # @return [String] incoming/outgoing
15
+ # @!attribute name
16
+ # @return [String] name for the request
17
+ # @!attribute status
18
+ # @return [String] http response status code
19
+ # @!attribute request_body
20
+ # @return [String] body of the http request
21
+ # @!attribute response_body
22
+ # @return [String] body of the http response
23
+ # @!attribute headers
24
+ # @return [Array<Inferno::Entities::Header>] http request/response headers
25
+ # @!attribute result_id
26
+ # @return [String] id of the result for this request
27
+ # @!attribute test_session_id
28
+ # @return [String] id of the test session for this request
29
+ # @!attribute created_at
30
+ # @return [Time] creation timestamp
31
+ # @!attribute updated_at
32
+ # @return [Time] update timestamp
20
33
  class Request < Entity
21
34
  ATTRIBUTES = [
22
35
  :id, :index, :verb, :url, :direction, :name, :status,
@@ -46,7 +59,7 @@ module Inferno
46
59
  # @param name [String] the header name
47
60
  # @return [Inferno::Entities::RequestHeader, nil]
48
61
  def response_header(name)
49
- response_headers.find { |header| header.name == name.downcase }
62
+ response_headers.find { |header| header.name.casecmp(name).zero? }
50
63
  end
51
64
 
52
65
  # Find a request header
@@ -54,7 +67,7 @@ module Inferno
54
67
  # @param name [String] the header name
55
68
  # @return [Inferno::Entities::RequestHeader, nil]
56
69
  def request_header(name)
57
- request_headers.find { |header| header.name == name.downcase }
70
+ request_headers.find { |header| header.name.casecmp(name).zero? }
58
71
  end
59
72
 
60
73
  # All of the request headers
@@ -94,7 +107,7 @@ module Inferno
94
107
  }
95
108
  end
96
109
 
97
- # @api private
110
+ # @private
98
111
  def to_hash
99
112
  {
100
113
  id: id,
@@ -122,7 +135,7 @@ module Inferno
122
135
  end
123
136
 
124
137
  class << self
125
- # @api private
138
+ # @private
126
139
  def from_rack_env(env, name: nil)
127
140
  rack_request = env['router.request'].rack_request
128
141
  url = "#{rack_request.base_url}#{rack_request.path}"
@@ -143,7 +156,7 @@ module Inferno
143
156
  )
144
157
  end
145
158
 
146
- # @api private
159
+ # @private
147
160
  def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
148
161
  request_headers =
149
162
  response.env.request_headers
@@ -165,7 +178,7 @@ module Inferno
165
178
  )
166
179
  end
167
180
 
168
- # @api private
181
+ # @private
169
182
  def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
170
183
  request = reply.request
171
184
  response = reply.response
@@ -3,36 +3,43 @@ module Inferno
3
3
  # A `Result` represents the result of running a `Test`, `TestGroup`,
4
4
  # or `TestSuite`
5
5
  #
6
- # @attr_accessor [String] id id of the session
7
- # @attr_accessor [Time] created_at creation timestamp
8
- # @attr_accessor [Time] updated_at update timestamp
9
- # @attr_accessor [String] reference_type type of entity this result belongs
10
- # to (`Test`, `TestGroup`, or `TestSuite`)
11
- # @attr_accessor [String, nil] test_id id of the `Test` this result belongs
12
- # to
13
- # @attr_accessor [Test, nil] test the `Test` this result belongs to
14
- # @attr_accessor [String, nil] test_group_id id of the `TestGroup` this
15
- # result belongs to
16
- # @attr_accessor [TestGroup, nil] test_group the `TestGroup` this result
17
- # belongs to
18
- # @attr_accessor [String, nil] test_suite_id id of the `TestSuite` this
19
- # result belongs to
20
- # @attr_accessor [TestSuite, nil] test_suite the `TestSuite` this result
21
- # belongs to
22
- # @attr_accessor [String] result the result (`pass`, `fail`, `skip`, `omit`,
23
- # `error`, `running`, `wait`, `cancel`)
24
- # @attr_accessor [String] result_message summary message for this result
25
- # @attr_accessor [String] test_run_id the `TestRun` this result belongs to
26
- # @attr_accessor [String] test_session_id the `TestSession` this result
27
- # belongs to
28
- # @attr_accessor [Array<Inferno::Entities::Message>] messages additional
29
- # messages for this result
30
- # @attr_accessor [Array<Inferno::Entities::Request>] request_summaries
31
- # summaries of the requests associated with this result
32
- # @attr_accessor [String] input_json JSON string of the inputs used for this
6
+ # @!attribute id
7
+ # @return [String] id of the session
8
+ # @!attribute created_at
9
+ # @return [Time] creation timestamp
10
+ # @!attribute updated_at
11
+ # @return [Time] update timestamp
12
+ # @!attribute test_id
13
+ # @return [String, nil] id of the `Test` this result belongs to
14
+ # @!attribute test
15
+ # @return [Test, nil] the `Test` this result belongs to
16
+ # @!attribute test_group_id
17
+ # @return [String, nil] id of the `TestGroup` this result belongs to
18
+ # @!attribute test_group
19
+ # @return [TestGroup, nil] the `TestGroup` this result belongs to
20
+ # @!attribute test_suite_id
21
+ # @return [String, nil] id of the `TestSuite` this result belongs to
22
+ # @!attribute test_suite
23
+ # @return [TestSuite, nil] the `TestSuite` this result belongs to
24
+ # @!attribute result
25
+ # @return [String] the result (`pass`, `fail`, `skip`, `omit`, `error`,
26
+ # `running`, `wait`, `cancel`)
27
+ # @!attribute result_message
28
+ # @return [String] summary message for this result
29
+ # @!attribute test_run_id
30
+ # @return [String] the `TestRun` this result belongs to
31
+ # @!attribute test_session_id
32
+ # @return [String] the `TestSession` this result belongs to
33
+ # @!attribute messages
34
+ # @return [Array<Inferno::Entities::Message>] additional messages for this
33
35
  # result
34
- # @attr_accessor [String] output_json JSON string of the outputs created by
35
- # this result
36
+ # @!attribute requests
37
+ # @return [Array<Inferno::Entities::Request>] summaries of the requests
38
+ # associated with this result
39
+ # @!attribute input_json
40
+ # @return [String] JSON string of the inputs used for this result
41
+ # @!attribute output_json
42
+ # @return [String] JSON string of the outputs created by this result
36
43
  class Result < Entity
37
44
  ATTRIBUTES = [
38
45
  :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
@@ -3,12 +3,18 @@ module Inferno
3
3
  # `SessionData` represents a piece of saved state for a `TestSession`.
4
4
  # These are used to store test inputs and outputs.
5
5
  #
6
- # @attr_accessor [String] id of the test input
7
- # @attr_accessor [String] name
8
- # @attr_accessor [String] value
9
- # @attr_accessor [String] test_session_id
10
- # @attr_accessor [Time] created_at
11
- # @attr_accessor [Time] updated_at
6
+ # @!attribute id
7
+ # @return [String] id of the test input
8
+ # @!attribute name
9
+ # @return [String]
10
+ # @!attribute value
11
+ # @return [String]
12
+ # @!attribute test_session_id
13
+ # @return [String]
14
+ # @!attribute created_at
15
+ # @return [Time]
16
+ # @!attribute updated_at
17
+ # @return [Time]
12
18
  class SessionData < Entity
13
19
  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
14
20