From 527edb00333ed3c1e1f97f1dc3bb7d27fd6951bd Mon Sep 17 00:00:00 2001 From: Inferno CI Date: Wed, 1 Nov 2023 14:31:43 +0000 Subject: [PATCH] generate docs --- docs/docs/FHIR.html | 119 + docs/docs/FHIR/Client.html | 368 + docs/docs/FHIR/Json.html | 121 + docs/docs/FHIR/Model.html | 142 + docs/docs/FHIR/Xml.html | 121 + docs/docs/Inferno.html | 235 + docs/docs/Inferno/Application.html | 124 + docs/docs/Inferno/CLI.html | 117 + docs/docs/Inferno/CLI/Console.html | 197 + docs/docs/Inferno/CLI/Main.html | 379 + docs/docs/Inferno/CLI/Migration.html | 197 + docs/docs/Inferno/CLI/Services.html | 420 + docs/docs/Inferno/CLI/Suite.html | 303 + docs/docs/Inferno/CLI/SuiteInputTemplate.html | 229 + docs/docs/Inferno/CLI/Suites.html | 231 + docs/docs/Inferno/DSL.html | 163 + docs/docs/Inferno/DSL/Assertions.html | 1035 +++ docs/docs/Inferno/DSL/Configurable.html | 328 + .../DSL/Configurable/Configuration.html | 532 ++ docs/docs/Inferno/DSL/FHIRClient.html | 1973 +++++ .../Inferno/DSL/FHIRClient/ClassMethods.html | 234 + docs/docs/Inferno/DSL/FHIRClientBuilder.html | 644 ++ docs/docs/Inferno/DSL/FHIRValidation.html | 363 + .../DSL/FHIRValidation/ClassMethods.html | 362 + .../Inferno/DSL/FHIRValidation/Validator.html | 774 ++ docs/docs/Inferno/DSL/HTTPClient.html | 1044 +++ .../Inferno/DSL/HTTPClient/ClassMethods.html | 234 + docs/docs/Inferno/DSL/HTTPClientBuilder.html | 440 ++ .../docs/Inferno/DSL/InputOutputHandling.html | 694 ++ docs/docs/Inferno/DSL/OAuthCredentials.html | 674 ++ docs/docs/Inferno/DSL/RequestStorage.html | 448 ++ .../DSL/RequestStorage/ClassMethods.html | 378 + docs/docs/Inferno/DSL/Results.html | 889 +++ docs/docs/Inferno/DSL/Runnable.html | 1620 ++++ docs/docs/Inferno/DSL/SuiteOption.html | 448 ++ docs/docs/Inferno/Entities.html | 130 + docs/docs/Inferno/Entities/Entity.html | 268 + docs/docs/Inferno/Entities/HasRunnable.html | 207 + docs/docs/Inferno/Entities/Header.html | 1139 +++ docs/docs/Inferno/Entities/Input.html | 461 ++ docs/docs/Inferno/Entities/Message.html | 839 ++ docs/docs/Inferno/Entities/Preset.html | 267 + docs/docs/Inferno/Entities/Request.html | 6962 +++++++++++++++++ docs/docs/Inferno/Entities/Result.html | 2954 +++++++ docs/docs/Inferno/Entities/SessionData.html | 1019 +++ docs/docs/Inferno/Entities/Test.html | 1389 ++++ docs/docs/Inferno/Entities/TestGroup.html | 813 ++ docs/docs/Inferno/Entities/TestRun.html | 2854 +++++++ docs/docs/Inferno/Entities/TestSession.html | 1772 +++++ docs/docs/Inferno/Entities/TestSuite.html | 1034 +++ docs/docs/Inferno/Exceptions.html | 115 + .../Exceptions/AssertionException.html | 202 + .../Exceptions/BadSessionDataType.html | 204 + .../Inferno/Exceptions/CancelException.html | 202 + .../Exceptions/ErrorInValidatorException.html | 218 + .../Exceptions/NotUserRunnableException.html | 204 + .../Inferno/Exceptions/OmitException.html | 202 + .../Exceptions/ParentNotLoadedException.html | 204 + .../Inferno/Exceptions/PassException.html | 202 + .../Exceptions/RequiredInputsNotFound.html | 204 + .../Inferno/Exceptions/SkipException.html | 202 + .../Exceptions/TestResultException.html | 128 + .../Exceptions/UnknownAttributeException.html | 206 + .../Exceptions/UnknownSessionDataType.html | 204 + .../ValidatorNotFoundException.html | 204 + .../Inferno/Exceptions/WaitException.html | 202 + docs/docs/Inferno/Jobs.html | 195 + docs/docs/Inferno/Jobs/ExecuteTestRun.html | 203 + docs/docs/Inferno/Jobs/ResumeTestRun.html | 203 + docs/docs/Inferno/Repositories.html | 140 + docs/docs/Inferno/Repositories/Headers.html | 145 + .../Inferno/Repositories/Headers/Model.html | 248 + .../Repositories/InMemoryRepository.html | 457 ++ docs/docs/Inferno/Repositories/Messages.html | 227 + .../Inferno/Repositories/Messages/Model.html | 254 + docs/docs/Inferno/Repositories/Presets.html | 292 + .../docs/Inferno/Repositories/Repository.html | 1115 +++ docs/docs/Inferno/Repositories/Requests.html | 570 ++ .../Inferno/Repositories/Requests/Model.html | 199 + docs/docs/Inferno/Repositories/Results.html | 872 +++ .../Inferno/Repositories/Results/Model.html | 510 ++ .../Inferno/Repositories/SessionData.html | 677 ++ .../Repositories/SessionData/Model.html | 121 + .../docs/Inferno/Repositories/TestGroups.html | 145 + docs/docs/Inferno/Repositories/TestRuns.html | 927 +++ .../Inferno/Repositories/TestRuns/Model.html | 280 + .../Inferno/Repositories/TestSessions.html | 499 ++ .../Repositories/TestSessions/Model.html | 260 + .../docs/Inferno/Repositories/TestSuites.html | 145 + docs/docs/Inferno/Repositories/Tests.html | 145 + .../ValidateRunnableReference.html | 371 + docs/docs/Inferno/SpecSupport.html | 169 + docs/docs/Inferno/Utils.html | 117 + docs/docs/Inferno/Utils/Migration.html | 207 + docs/docs/Inferno/Utils/PresetProcessor.html | 676 ++ .../Utils/PresetTemplateGenerator.html | 525 ++ docs/docs/Inferno/Web.html | 228 + docs/docs/Inferno/Web/Controllers.html | 119 + .../Inferno/Web/Controllers/Controller.html | 304 + .../Inferno/Web/Controllers/Requests.html | 115 + .../Web/Controllers/Requests/Show.html | 213 + .../Inferno/Web/Controllers/TestRuns.html | 119 + .../Web/Controllers/TestRuns/Create.html | 503 ++ .../Web/Controllers/TestRuns/Destroy.html | 245 + .../Web/Controllers/TestRuns/Results.html | 115 + .../Controllers/TestRuns/Results/Index.html | 209 + .../Web/Controllers/TestRuns/Show.html | 235 + .../Inferno/Web/Controllers/TestSessions.html | 119 + .../Controllers/TestSessions/ClientShow.html | 261 + .../Web/Controllers/TestSessions/Create.html | 300 + .../Controllers/TestSessions/LastTestRun.html | 221 + .../Web/Controllers/TestSessions/Results.html | 115 + .../TestSessions/Results/Index.html | 217 + .../Controllers/TestSessions/SessionData.html | 117 + .../TestSessions/SessionData/ApplyPreset.html | 309 + .../TestSessions/SessionData/Index.html | 275 + .../Web/Controllers/TestSessions/Show.html | 213 + .../Inferno/Web/Controllers/TestSuites.html | 117 + .../TestSuites/CheckConfiguration.html | 215 + .../Web/Controllers/TestSuites/Index.html | 207 + .../Web/Controllers/TestSuites/Show.html | 213 + docs/docs/Inferno/Web/Serializers.html | 117 + .../Web/Serializers/HashValueExtractor.html | 194 + docs/docs/Inferno/Web/Serializers/Header.html | 137 + docs/docs/Inferno/Web/Serializers/Input.html | 137 + .../docs/Inferno/Web/Serializers/Message.html | 137 + docs/docs/Inferno/Web/Serializers/Preset.html | 137 + .../docs/Inferno/Web/Serializers/Request.html | 137 + docs/docs/Inferno/Web/Serializers/Result.html | 137 + .../Inferno/Web/Serializers/Serializer.html | 231 + .../Inferno/Web/Serializers/SessionData.html | 137 + .../Inferno/Web/Serializers/SuiteOption.html | 137 + docs/docs/Inferno/Web/Serializers/Test.html | 137 + .../Inferno/Web/Serializers/TestGroup.html | 137 + .../docs/Inferno/Web/Serializers/TestRun.html | 137 + .../Inferno/Web/Serializers/TestSession.html | 137 + .../Inferno/Web/Serializers/TestSuite.html | 137 + docs/docs/InfernoFHIRModelExtensions.html | 393 + docs/docs/InfernoJson.html | 195 + docs/docs/InfernoXml.html | 195 + docs/docs/_index.html | 1238 +++ docs/docs/class_list.html | 51 + docs/docs/css/common.css | 1 + docs/docs/css/full_list.css | 58 + docs/docs/css/style.css | 497 ++ docs/docs/file.README.html | 241 + docs/docs/file_list.html | 56 + docs/docs/frames.html | 17 + docs/docs/index.html | 241 + docs/docs/js/app.js | 314 + docs/docs/js/full_list.js | 216 + docs/docs/js/jquery.js | 4 + docs/docs/method_list.html | 3155 ++++++++ docs/docs/top-level-namespace.html | 110 + 154 files changed, 67294 insertions(+) create mode 100644 docs/docs/FHIR.html create mode 100644 docs/docs/FHIR/Client.html create mode 100644 docs/docs/FHIR/Json.html create mode 100644 docs/docs/FHIR/Model.html create mode 100644 docs/docs/FHIR/Xml.html create mode 100644 docs/docs/Inferno.html create mode 100644 docs/docs/Inferno/Application.html create mode 100644 docs/docs/Inferno/CLI.html create mode 100644 docs/docs/Inferno/CLI/Console.html create mode 100644 docs/docs/Inferno/CLI/Main.html create mode 100644 docs/docs/Inferno/CLI/Migration.html create mode 100644 docs/docs/Inferno/CLI/Services.html create mode 100644 docs/docs/Inferno/CLI/Suite.html create mode 100644 docs/docs/Inferno/CLI/SuiteInputTemplate.html create mode 100644 docs/docs/Inferno/CLI/Suites.html create mode 100644 docs/docs/Inferno/DSL.html create mode 100644 docs/docs/Inferno/DSL/Assertions.html create mode 100644 docs/docs/Inferno/DSL/Configurable.html create mode 100644 docs/docs/Inferno/DSL/Configurable/Configuration.html create mode 100644 docs/docs/Inferno/DSL/FHIRClient.html create mode 100644 docs/docs/Inferno/DSL/FHIRClient/ClassMethods.html create mode 100644 docs/docs/Inferno/DSL/FHIRClientBuilder.html create mode 100644 docs/docs/Inferno/DSL/FHIRValidation.html create mode 100644 docs/docs/Inferno/DSL/FHIRValidation/ClassMethods.html create mode 100644 docs/docs/Inferno/DSL/FHIRValidation/Validator.html create mode 100644 docs/docs/Inferno/DSL/HTTPClient.html create mode 100644 docs/docs/Inferno/DSL/HTTPClient/ClassMethods.html create mode 100644 docs/docs/Inferno/DSL/HTTPClientBuilder.html create mode 100644 docs/docs/Inferno/DSL/InputOutputHandling.html create mode 100644 docs/docs/Inferno/DSL/OAuthCredentials.html create mode 100644 docs/docs/Inferno/DSL/RequestStorage.html create mode 100644 docs/docs/Inferno/DSL/RequestStorage/ClassMethods.html create mode 100644 docs/docs/Inferno/DSL/Results.html create mode 100644 docs/docs/Inferno/DSL/Runnable.html create mode 100644 docs/docs/Inferno/DSL/SuiteOption.html create mode 100644 docs/docs/Inferno/Entities.html create mode 100644 docs/docs/Inferno/Entities/Entity.html create mode 100644 docs/docs/Inferno/Entities/HasRunnable.html create mode 100644 docs/docs/Inferno/Entities/Header.html create mode 100644 docs/docs/Inferno/Entities/Input.html create mode 100644 docs/docs/Inferno/Entities/Message.html create mode 100644 docs/docs/Inferno/Entities/Preset.html create mode 100644 docs/docs/Inferno/Entities/Request.html create mode 100644 docs/docs/Inferno/Entities/Result.html create mode 100644 docs/docs/Inferno/Entities/SessionData.html create mode 100644 docs/docs/Inferno/Entities/Test.html create mode 100644 docs/docs/Inferno/Entities/TestGroup.html create mode 100644 docs/docs/Inferno/Entities/TestRun.html create mode 100644 docs/docs/Inferno/Entities/TestSession.html create mode 100644 docs/docs/Inferno/Entities/TestSuite.html create mode 100644 docs/docs/Inferno/Exceptions.html create mode 100644 docs/docs/Inferno/Exceptions/AssertionException.html create mode 100644 docs/docs/Inferno/Exceptions/BadSessionDataType.html create mode 100644 docs/docs/Inferno/Exceptions/CancelException.html create mode 100644 docs/docs/Inferno/Exceptions/ErrorInValidatorException.html create mode 100644 docs/docs/Inferno/Exceptions/NotUserRunnableException.html create mode 100644 docs/docs/Inferno/Exceptions/OmitException.html create mode 100644 docs/docs/Inferno/Exceptions/ParentNotLoadedException.html create mode 100644 docs/docs/Inferno/Exceptions/PassException.html create mode 100644 docs/docs/Inferno/Exceptions/RequiredInputsNotFound.html create mode 100644 docs/docs/Inferno/Exceptions/SkipException.html create mode 100644 docs/docs/Inferno/Exceptions/TestResultException.html create mode 100644 docs/docs/Inferno/Exceptions/UnknownAttributeException.html create mode 100644 docs/docs/Inferno/Exceptions/UnknownSessionDataType.html create mode 100644 docs/docs/Inferno/Exceptions/ValidatorNotFoundException.html create mode 100644 docs/docs/Inferno/Exceptions/WaitException.html create mode 100644 docs/docs/Inferno/Jobs.html create mode 100644 docs/docs/Inferno/Jobs/ExecuteTestRun.html create mode 100644 docs/docs/Inferno/Jobs/ResumeTestRun.html create mode 100644 docs/docs/Inferno/Repositories.html create mode 100644 docs/docs/Inferno/Repositories/Headers.html create mode 100644 docs/docs/Inferno/Repositories/Headers/Model.html create mode 100644 docs/docs/Inferno/Repositories/InMemoryRepository.html create mode 100644 docs/docs/Inferno/Repositories/Messages.html create mode 100644 docs/docs/Inferno/Repositories/Messages/Model.html create mode 100644 docs/docs/Inferno/Repositories/Presets.html create mode 100644 docs/docs/Inferno/Repositories/Repository.html create mode 100644 docs/docs/Inferno/Repositories/Requests.html create mode 100644 docs/docs/Inferno/Repositories/Requests/Model.html create mode 100644 docs/docs/Inferno/Repositories/Results.html create mode 100644 docs/docs/Inferno/Repositories/Results/Model.html create mode 100644 docs/docs/Inferno/Repositories/SessionData.html create mode 100644 docs/docs/Inferno/Repositories/SessionData/Model.html create mode 100644 docs/docs/Inferno/Repositories/TestGroups.html create mode 100644 docs/docs/Inferno/Repositories/TestRuns.html create mode 100644 docs/docs/Inferno/Repositories/TestRuns/Model.html create mode 100644 docs/docs/Inferno/Repositories/TestSessions.html create mode 100644 docs/docs/Inferno/Repositories/TestSessions/Model.html create mode 100644 docs/docs/Inferno/Repositories/TestSuites.html create mode 100644 docs/docs/Inferno/Repositories/Tests.html create mode 100644 docs/docs/Inferno/Repositories/ValidateRunnableReference.html create mode 100644 docs/docs/Inferno/SpecSupport.html create mode 100644 docs/docs/Inferno/Utils.html create mode 100644 docs/docs/Inferno/Utils/Migration.html create mode 100644 docs/docs/Inferno/Utils/PresetProcessor.html create mode 100644 docs/docs/Inferno/Utils/PresetTemplateGenerator.html create mode 100644 docs/docs/Inferno/Web.html create mode 100644 docs/docs/Inferno/Web/Controllers.html create mode 100644 docs/docs/Inferno/Web/Controllers/Controller.html create mode 100644 docs/docs/Inferno/Web/Controllers/Requests.html create mode 100644 docs/docs/Inferno/Web/Controllers/Requests/Show.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns/Create.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns/Destroy.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns/Results.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns/Results/Index.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestRuns/Show.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/ClientShow.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/Create.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/LastTestRun.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/Results.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/Results/Index.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/SessionData.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/ApplyPreset.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/Index.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSessions/Show.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSuites.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSuites/CheckConfiguration.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSuites/Index.html create mode 100644 docs/docs/Inferno/Web/Controllers/TestSuites/Show.html create mode 100644 docs/docs/Inferno/Web/Serializers.html create mode 100644 docs/docs/Inferno/Web/Serializers/HashValueExtractor.html create mode 100644 docs/docs/Inferno/Web/Serializers/Header.html create mode 100644 docs/docs/Inferno/Web/Serializers/Input.html create mode 100644 docs/docs/Inferno/Web/Serializers/Message.html create mode 100644 docs/docs/Inferno/Web/Serializers/Preset.html create mode 100644 docs/docs/Inferno/Web/Serializers/Request.html create mode 100644 docs/docs/Inferno/Web/Serializers/Result.html create mode 100644 docs/docs/Inferno/Web/Serializers/Serializer.html create mode 100644 docs/docs/Inferno/Web/Serializers/SessionData.html create mode 100644 docs/docs/Inferno/Web/Serializers/SuiteOption.html create mode 100644 docs/docs/Inferno/Web/Serializers/Test.html create mode 100644 docs/docs/Inferno/Web/Serializers/TestGroup.html create mode 100644 docs/docs/Inferno/Web/Serializers/TestRun.html create mode 100644 docs/docs/Inferno/Web/Serializers/TestSession.html create mode 100644 docs/docs/Inferno/Web/Serializers/TestSuite.html create mode 100644 docs/docs/InfernoFHIRModelExtensions.html create mode 100644 docs/docs/InfernoJson.html create mode 100644 docs/docs/InfernoXml.html create mode 100644 docs/docs/_index.html create mode 100644 docs/docs/class_list.html create mode 100644 docs/docs/css/common.css create mode 100644 docs/docs/css/full_list.css create mode 100644 docs/docs/css/style.css create mode 100644 docs/docs/file.README.html create mode 100644 docs/docs/file_list.html create mode 100644 docs/docs/frames.html create mode 100644 docs/docs/index.html create mode 100644 docs/docs/js/app.js create mode 100644 docs/docs/js/full_list.js create mode 100644 docs/docs/js/jquery.js create mode 100644 docs/docs/method_list.html create mode 100644 docs/docs/top-level-namespace.html diff --git a/docs/docs/FHIR.html b/docs/docs/FHIR.html new file mode 100644 index 0000000000..8a0cd9c2ce --- /dev/null +++ b/docs/docs/FHIR.html @@ -0,0 +1,119 @@ + + + + + + + Module: FHIR + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: FHIR + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/ext/fhir_client.rb,
+ lib/inferno/ext/fhir_models.rb,
lib/inferno/ext/fhir_models.rb,
lib/inferno/ext/fhir_models.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Json, Xml + + + + Classes: Client, Model + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/FHIR/Client.html b/docs/docs/FHIR/Client.html new file mode 100644 index 0000000000..51e22906f8 --- /dev/null +++ b/docs/docs/FHIR/Client.html @@ -0,0 +1,368 @@ + + + + + + + Class: FHIR::Client + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: FHIR::Client + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/ext/fhir_client.rb
+
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #oauth_credentialsObject + + + + + +

+
+

Returns the value of attribute oauth_credentials.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+3
+4
+5
+
+
# File 'lib/inferno/ext/fhir_client.rb', line 3
+
+def oauth_credentials
+  @oauth_credentials
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #able_to_refresh?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+9
+10
+11
+
+
# File 'lib/inferno/ext/fhir_client.rb', line 9
+
+def able_to_refresh?
+  oauth_credentials&.able_to_refresh?
+end
+
+
+ +
+

+ + #need_to_refresh?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+5
+6
+7
+
+
# File 'lib/inferno/ext/fhir_client.rb', line 5
+
+def need_to_refresh?
+  oauth_credentials&.need_to_refresh?
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/FHIR/Json.html b/docs/docs/FHIR/Json.html new file mode 100644 index 0000000000..ed7691fb25 --- /dev/null +++ b/docs/docs/FHIR/Json.html @@ -0,0 +1,121 @@ + + + + + + + Module: FHIR::Json + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: FHIR::Json + + + +

+
+ + + + +
+
Extended by:
+
InfernoJson
+
+ + + + + + + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods included from InfernoJson

+

from_json

+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/FHIR/Model.html b/docs/docs/FHIR/Model.html new file mode 100644 index 0000000000..7c440cd6ad --- /dev/null +++ b/docs/docs/FHIR/Model.html @@ -0,0 +1,142 @@ + + + + + + + Class: FHIR::Model + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: FHIR::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
InfernoFHIRModelExtensions
+
+ + + + + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ + + + + + + +

Instance Attribute Summary

+ +

Attributes included from InfernoFHIRModelExtensions

+

#source_hash, #source_text

+ + + + + + + + + +

Method Summary

+ +

Methods included from InfernoFHIRModelExtensions

+

#initialize, #source_contents

+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/FHIR/Xml.html b/docs/docs/FHIR/Xml.html new file mode 100644 index 0000000000..a17acca16c --- /dev/null +++ b/docs/docs/FHIR/Xml.html @@ -0,0 +1,121 @@ + + + + + + + Module: FHIR::Xml + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: FHIR::Xml + + + +

+
+ + + + +
+
Extended by:
+
InfernoXml
+
+ + + + + + + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods included from InfernoXml

+

from_xml

+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno.html b/docs/docs/Inferno.html new file mode 100644 index 0000000000..701eec619b --- /dev/null +++ b/docs/docs/Inferno.html @@ -0,0 +1,235 @@ + + + + + + + Module: Inferno + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno.rb,
+ lib/inferno/dsl.rb,
lib/inferno/jobs.rb,
lib/inferno/version.rb,
lib/inferno/apps/cli.rb,
lib/inferno/entities.rb,
lib/inferno/exceptions.rb,
lib/inferno/dsl/results.rb,
lib/inferno/test_runner.rb,
lib/inferno/dsl/runnable.rb,
lib/inferno/repositories.rb,
lib/inferno/spec_support.rb,
lib/inferno/apps/cli/main.rb,
lib/inferno/entities/test.rb,
lib/inferno/apps/cli/suite.rb,
lib/inferno/dsl/assertions.rb,
lib/inferno/entities/input.rb,
lib/inferno/apps/cli/suites.rb,
lib/inferno/apps/web/router.rb,
lib/inferno/dsl/fhir_client.rb,
lib/inferno/dsl/http_client.rb,
lib/inferno/entities/entity.rb,
lib/inferno/entities/header.rb,
lib/inferno/entities/preset.rb,
lib/inferno/entities/result.rb,
lib/inferno/utils/migration.rb,
lib/inferno/apps/cli/console.rb,
lib/inferno/dsl/configurable.rb,
lib/inferno/dsl/suite_option.rb,
lib/inferno/entities/message.rb,
lib/inferno/entities/request.rb,
lib/inferno/apps/cli/services.rb,
lib/inferno/entities/test_run.rb,
lib/inferno/result_summarizer.rb,
lib/inferno/apps/cli/migration.rb,
lib/inferno/config/application.rb,
lib/inferno/repositories/tests.rb,
lib/inferno/dsl/fhir_validation.rb,
lib/inferno/dsl/request_storage.rb,
lib/inferno/entities/attributes.rb,
lib/inferno/entities/test_group.rb,
lib/inferno/entities/test_suite.rb,
lib/inferno/utils/static_assets.rb,
lib/inferno/apps/web/application.rb,
lib/inferno/jobs/resume_test_run.rb,
lib/inferno/repositories/headers.rb,
lib/inferno/repositories/presets.rb,
lib/inferno/repositories/results.rb,
lib/inferno/dsl/oauth_credentials.rb,
lib/inferno/dsl/resume_test_route.rb,
lib/inferno/entities/has_runnable.rb,
lib/inferno/entities/session_data.rb,
lib/inferno/entities/test_session.rb,
lib/inferno/jobs/execute_test_run.rb,
lib/inferno/repositories/messages.rb,
lib/inferno/repositories/requests.rb,
lib/inferno/repositories/test_runs.rb,
lib/inferno/utils/preset_processor.rb,
lib/inferno/dsl/fhir_client_builder.rb,
lib/inferno/dsl/http_client_builder.rb,
lib/inferno/repositories/repository.rb,
lib/inferno/repositories/test_groups.rb,
lib/inferno/repositories/test_suites.rb,
lib/inferno/utils/markdown_formatter.rb,
lib/inferno/apps/web/serializers/test.rb,
lib/inferno/dsl/input_output_handling.rb,
lib/inferno/dsl/tcp_exception_handler.rb,
lib/inferno/repositories/session_data.rb,
lib/inferno/apps/web/serializers/input.rb,
lib/inferno/repositories/test_sessions.rb,
lib/inferno/apps/web/serializers/header.rb,
lib/inferno/apps/web/serializers/preset.rb,
lib/inferno/apps/web/serializers/result.rb,
lib/inferno/apps/web/serializers/message.rb,
lib/inferno/apps/web/serializers/request.rb,
lib/inferno/apps/cli/suite_input_template.rb,
lib/inferno/apps/web/serializers/test_run.rb,
lib/inferno/apps/web/controllers/controller.rb,
lib/inferno/apps/web/serializers/serializer.rb,
lib/inferno/apps/web/serializers/test_group.rb,
lib/inferno/apps/web/serializers/test_suite.rb,
lib/inferno/utils/middleware/request_logger.rb,
lib/inferno/utils/preset_template_generator.rb,
lib/inferno/apps/web/serializers/session_data.rb,
lib/inferno/apps/web/serializers/suite_option.rb,
lib/inferno/apps/web/serializers/test_session.rb,
lib/inferno/repositories/in_memory_repository.rb,
lib/inferno/apps/web/controllers/requests/show.rb,
lib/inferno/apps/web/controllers/test_runs/show.rb,
lib/inferno/apps/web/controllers/test_runs/create.rb,
lib/inferno/apps/web/controllers/test_suites/show.rb,
lib/inferno/apps/web/controllers/test_runs/destroy.rb,
lib/inferno/apps/web/controllers/test_suites/index.rb,
lib/inferno/apps/web/controllers/test_sessions/show.rb,
lib/inferno/repositories/validate_runnable_reference.rb,
lib/inferno/apps/web/controllers/test_sessions/create.rb,
lib/inferno/apps/web/serializers/hash_value_extractor.rb,
lib/inferno/apps/web/controllers/test_runs/results/index.rb,
lib/inferno/apps/web/controllers/test_sessions/client_show.rb,
lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb,
lib/inferno/apps/web/controllers/test_sessions/results/index.rb,
lib/inferno/apps/web/controllers/test_suites/check_configuration.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: CLI, DSL, Entities, Exceptions, Jobs, Repositories, SpecSupport, Utils, Web + + + + Classes: Application + + +

+ + +

+ Constant Summary + collapse +

+ +
+ +
VERSION = +
+
+

Standard patterns for gem versions: https://guides.rubygems.org/patterns/

+ + +
+
+
+ + +
+
+
'0.4.21'.freeze
+ +
Test = + +
+
Entities::Test
+ +
Import = + +
+
injector
+ +
TestGroup = + +
+
Entities::TestGroup
+ +
TestSuite = + +
+
Entities::TestSuite
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .routesObject + + + + + +

+ + + + +
+
+
+
+2
+3
+4
+
+
# File 'lib/inferno.rb', line 2
+
+def self.routes
+  @routes ||= []
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Application.html b/docs/docs/Inferno/Application.html new file mode 100644 index 0000000000..1e05d9c39c --- /dev/null +++ b/docs/docs/Inferno/Application.html @@ -0,0 +1,124 @@ + + + + + + + Class: Inferno::Application + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Application + + + +

+
+ +
+
Inherits:
+
+ Dry::System::Container + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/config/application.rb
+
+ +
+ + + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI.html b/docs/docs/Inferno/CLI.html new file mode 100644 index 0000000000..2aece8842b --- /dev/null +++ b/docs/docs/Inferno/CLI.html @@ -0,0 +1,117 @@ + + + + + + + Module: Inferno::CLI + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::CLI + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli.rb,
+ lib/inferno/apps/cli/main.rb,
lib/inferno/apps/cli/suite.rb,
lib/inferno/apps/cli/suites.rb,
lib/inferno/apps/cli/console.rb,
lib/inferno/apps/cli/services.rb,
lib/inferno/apps/cli/migration.rb,
lib/inferno/apps/cli/suite_input_template.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Console, Main, Migration, Services, Suite, SuiteInputTemplate, Suites + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Console.html b/docs/docs/Inferno/CLI/Console.html new file mode 100644 index 0000000000..c1d8332bba --- /dev/null +++ b/docs/docs/Inferno/CLI/Console.html @@ -0,0 +1,197 @@ + + + + + + + Class: Inferno::CLI::Console + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Console + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/console.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #runObject + + + + + +

+ + + + +
+
+
+
+4
+5
+6
+7
+8
+9
+
+
# File 'lib/inferno/apps/cli/console.rb', line 4
+
+def run
+  require_relative '../../../inferno'
+
+  Inferno::Application.finalize!
+  Pry.start
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Main.html b/docs/docs/Inferno/CLI/Main.html new file mode 100644 index 0000000000..d9fadbc4b5 --- /dev/null +++ b/docs/docs/Inferno/CLI/Main.html @@ -0,0 +1,379 @@ + + + + + + + Class: Inferno::CLI::Main + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Main + + + +

+
+ +
+
Inherits:
+
+ Thor + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/main.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #consoleObject + + + + + +

+ + + + +
+
+
+
+11
+12
+13
+
+
# File 'lib/inferno/apps/cli/main.rb', line 11
+
+def console
+  Console.new.run
+end
+
+
+ +
+

+ + #migrateObject + + + + + +

+ + + + +
+
+
+
+16
+17
+18
+
+
# File 'lib/inferno/apps/cli/main.rb', line 16
+
+def migrate
+  Migration.new.run
+end
+
+
+ +
+

+ + #startObject + + + + + +

+ + + + +
+
+
+
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+
+
# File 'lib/inferno/apps/cli/main.rb', line 25
+
+def start
+  command = 'foreman start --env=/dev/null'
+  if `gem list -i foreman`.chomp == 'false'
+    puts "You must install foreman with 'gem install foreman' prior to running Inferno."
+  end
+
+  if options[:watch]
+    if `gem list -i rerun`.chomp == 'false'
+      puts "You must install 'rerun' with 'gem install rerun' to restart on file changes."
+    end
+
+    command = "rerun \"#{command}\" --background"
+  end
+
+  exec command
+end
+
+
+ +
+

+ + #suitesObject + + + + + +

+ + + + +
+
+
+
+43
+44
+45
+
+
# File 'lib/inferno/apps/cli/main.rb', line 43
+
+def suites
+  Suites.new.run
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Migration.html b/docs/docs/Inferno/CLI/Migration.html new file mode 100644 index 0000000000..bab351e780 --- /dev/null +++ b/docs/docs/Inferno/CLI/Migration.html @@ -0,0 +1,197 @@ + + + + + + + Class: Inferno::CLI::Migration + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Migration + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/migration.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #runObject + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/apps/cli/migration.rb', line 6
+
+def run
+  Inferno::Application.start(:logging)
+  Inferno::Application['logger'].level = Logger::DEBUG
+
+  Utils::Migration.new.run
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Services.html b/docs/docs/Inferno/CLI/Services.html new file mode 100644 index 0000000000..fd2d821d0c --- /dev/null +++ b/docs/docs/Inferno/CLI/Services.html @@ -0,0 +1,420 @@ + + + + + + + Class: Inferno::CLI::Services + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Services + + + +

+
+ +
+
Inherits:
+
+ Thor + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/services.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #buildObject + + + + + +

+ + + + +
+
+
+
+28
+29
+30
+
+
# File 'lib/inferno/apps/cli/services.rb', line 28
+
+def build
+  system "#{base_command} build"
+end
+
+
+ +
+

+ + #logsObject + + + + + +

+ + + + +
+
+
+
+47
+48
+49
+50
+51
+52
+53
+
+
# File 'lib/inferno/apps/cli/services.rb', line 47
+
+def logs
+  command = "#{base_command} logs"
+  command += ' -f' if options[:follow]
+  command += " --tail #{options[:tail]}" if options[:tail]
+
+  system command
+end
+
+
+ +
+

+ + #pullObject + + + + + +

+ + + + +
+
+
+
+33
+34
+35
+
+
# File 'lib/inferno/apps/cli/services.rb', line 33
+
+def pull
+  system "#{base_command} pull"
+end
+
+
+ +
+

+ + #startObject + + + + + +

+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+
+
# File 'lib/inferno/apps/cli/services.rb', line 15
+
+def start
+  command = "#{base_command} up"
+  command += ' -d' unless options[:foreground]
+
+  system command
+end
+
+
+ +
+

+ + #stopObject + + + + + +

+ + + + +
+
+
+
+23
+24
+25
+
+
# File 'lib/inferno/apps/cli/services.rb', line 23
+
+def stop
+  system "#{base_command} down"
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Suite.html b/docs/docs/Inferno/CLI/Suite.html new file mode 100644 index 0000000000..685378763f --- /dev/null +++ b/docs/docs/Inferno/CLI/Suite.html @@ -0,0 +1,303 @@ + + + + + + + Class: Inferno::CLI::Suite + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Suite + + + +

+
+ +
+
Inherits:
+
+ Thor + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/suite.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #describe(suite_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+
+
# File 'lib/inferno/apps/cli/suite.rb', line 25
+
+def describe(suite_id)
+  ENV['NO_DB'] = 'true'
+  Inferno::Application.start(:suites)
+
+  suite = Inferno::Repositories::TestSuites.new.find(suite_id)
+
+  if suite.blank?
+    message = "No suite found with id `#{suite_id}`. Run `inferno suites` to see a list of available suites"
+
+    puts TTY::Markdown.parse(message)
+    return
+  end
+
+  description = ''
+  description += "# #{suite.title}\n"
+  description += "#{suite.description}\n" if suite.description
+
+  if suite.suite_options.present?
+    description += "***\n\n"
+    description += "# Suite Options\n\n"
+    suite.suite_options.each do |option|
+      description += "* `#{option.id}`: #{option.title}\n"
+      option.list_options.each do |list_option|
+        description += "  * `#{list_option[:value]}`: #{list_option[:label]}\n"
+      end
+    end
+  end
+
+  puts TTY::Markdown.parse(description)
+end
+
+
+ +
+

+ + #input_template(suite_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+16
+17
+18
+19
+
+
# File 'lib/inferno/apps/cli/suite.rb', line 16
+
+def input_template(suite_id)
+  ENV['NO_DB'] = 'true'
+  SuiteInputTemplate.new.run(suite_id, options)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/SuiteInputTemplate.html b/docs/docs/Inferno/CLI/SuiteInputTemplate.html new file mode 100644 index 0000000000..fea884d03a --- /dev/null +++ b/docs/docs/Inferno/CLI/SuiteInputTemplate.html @@ -0,0 +1,229 @@ + + + + + + + Class: Inferno::CLI::SuiteInputTemplate + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::SuiteInputTemplate + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/suite_input_template.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #run(suite_id, options) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+
+
# File 'lib/inferno/apps/cli/suite_input_template.rb', line 6
+
+def run(suite_id, options)
+  require_relative '../../../inferno'
+
+  Inferno::Application.start(:suites)
+
+  suite = Inferno::Repositories::TestSuites.new.find(suite_id)
+  if suite.nil?
+    puts "No Test Suite found with id: #{suite_id}"
+    return 1
+  end
+
+  output = JSON.pretty_generate(Inferno::Utils::PresetTemplateGenerator.new(suite).generate)
+
+  if options[:filename].present?
+    path = File.join(Dir.pwd, 'config', 'presets', options[:filename])
+    FileUtils.mkdir_p(File.dirname(path))
+
+    File.open(path, 'w') { |f| f.puts(output) }
+  else
+    puts output
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/CLI/Suites.html b/docs/docs/Inferno/CLI/Suites.html new file mode 100644 index 0000000000..baceed3137 --- /dev/null +++ b/docs/docs/Inferno/CLI/Suites.html @@ -0,0 +1,231 @@ + + + + + + + Class: Inferno::CLI::Suites + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::CLI::Suites + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/cli/suites.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #runObject + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+
+
# File 'lib/inferno/apps/cli/suites.rb', line 6
+
+def run
+  ENV['NO_DB'] = 'true'
+
+  require_relative '../../../inferno'
+
+  Inferno::Application.start(:suites)
+
+  suites = Inferno::Repositories::TestSuites.new.all
+  suite_hash = suites.each_with_object({}) { |suite, hash| hash[suite.id] = suite.title }
+
+  id_column_length = suite_hash.keys.map(&:length).max + 2
+  title_column_length = suite_hash.values.map(&:length).max + 1
+
+  output = ''
+  output += "| #{'Title'.ljust(title_column_length)}| #{'ID'.ljust(id_column_length)}|\n"
+  output += "|-#{'-' * title_column_length}|-#{'-' * id_column_length}|\n"
+
+  suite_hash.each do |id, title|
+    output += "| #{title.ljust(title_column_length)}| #{id.ljust(id_column_length)}|\n"
+  end
+
+  puts TTY::Markdown.parse(output)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL.html b/docs/docs/Inferno/DSL.html new file mode 100644 index 0000000000..783d86efd6 --- /dev/null +++ b/docs/docs/Inferno/DSL.html @@ -0,0 +1,163 @@ + + + + + + + Module: Inferno::DSL + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::Test
+
+ + + +
+
Defined in:
+
lib/inferno/dsl.rb,
+ lib/inferno/dsl/results.rb,
lib/inferno/dsl/runnable.rb,
lib/inferno/dsl/assertions.rb,
lib/inferno/dsl/fhir_client.rb,
lib/inferno/dsl/http_client.rb,
lib/inferno/dsl/configurable.rb,
lib/inferno/dsl/suite_option.rb,
lib/inferno/dsl/fhir_validation.rb,
lib/inferno/dsl/request_storage.rb,
lib/inferno/dsl/oauth_credentials.rb,
lib/inferno/dsl/resume_test_route.rb,
lib/inferno/dsl/fhir_client_builder.rb,
lib/inferno/dsl/http_client_builder.rb,
lib/inferno/dsl/input_output_handling.rb,
lib/inferno/dsl/tcp_exception_handler.rb
+
+
+ +
+ +

Overview

+
+

The DSL for writing tests.

+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + Modules: Assertions, Configurable, FHIRClient, FHIRValidation, HTTPClient, InputOutputHandling, RequestStorage, Results, Runnable + + + + Classes: FHIRClientBuilder, HTTPClientBuilder, OAuthCredentials, SuiteOption + + +

+ + +

+ Constant Summary + collapse +

+ +
+ +
INCLUDABLE_DSL_MODULES = + +
+
[
+  Assertions,
+  FHIRClient,
+  HTTPClient,
+  Results,
+  FHIRValidation
+].freeze
+ +
EXTENDABLE_DSL_MODULES = + +
+
[
+  Runnable
+].freeze
+ +
+ + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Assertions.html b/docs/docs/Inferno/DSL/Assertions.html new file mode 100644 index 0000000000..513a378be6 --- /dev/null +++ b/docs/docs/Inferno/DSL/Assertions.html @@ -0,0 +1,1035 @@ + + + + + + + Module: Inferno::DSL::Assertions + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::Assertions + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/assertions.rb
+
+ +
+ +

Overview

+
+

This module contains the assertions used within tests to verify the +behavior of the systems under test. Failing an assertion causes a test to +immediately stop execution and receive a fail result. Additional +assertions added to this module will be available in all tests.

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #assert(test, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Make an assertion

+ + +
+
+
+

Parameters:

+
    + +
  • + + test + + + + + + + — +

    a value whose truthiness will determine whether the +assertion passes or fails

    +
    + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + + — +

    failure message

    +
    + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+16
+17
+18
+
+
# File 'lib/inferno/dsl/assertions.rb', line 16
+
+def assert(test, message = '')
+  raise Exceptions::AssertionException, message unless test
+end
+
+
+ +
+

+ + #assert_resource_type(resource_type, resource: self.resource) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Check a FHIR resource’s type

+ + +
+
+
+ +
+

Examples:

+ + +
# The resource type can be a symbol, String, or FHIR::Model class
+assert_resource_type(:capability_statement)
+assert_resource_type('CapabilityStatement')
+assert_resource_type(FHIR::CapabilityStatement)
+ +
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + +
  • + +
  • + + resource + + + (FHIR::Model) + + + (defaults to: self.resource) + + +
  • + +
+ + +
+ + + + +
+
+
+
+52
+53
+54
+55
+56
+57
+
+
# File 'lib/inferno/dsl/assertions.rb', line 52
+
+def assert_resource_type(resource_type, resource: self.resource)
+  resource_type_name = normalize_resource_type(resource_type)
+
+  assert resource&.resourceType == resource_type_name,
+         bad_resource_type_message(resource_type_name, resource&.resourceType)
+end
+
+
+ +
+

+ + #assert_response_content_type(type, request: self.request) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Check the Content-Type header of a response. This assertion will fail if +the response’s content type does not begin with the provided type.

+ + +
+
+
+

Parameters:

+
    + +
  • + + type + + + (String) + + + +
  • + +
  • + + request + + + (Inferno::Entities::Request) + + + (defaults to: self.request) + + +
  • + +
+ + +
+ + + + +
+
+
+
+184
+185
+186
+187
+188
+189
+
+
# File 'lib/inferno/dsl/assertions.rb', line 184
+
+def assert_response_content_type(type, request: self.request)
+  header = request.response_header('Content-Type')
+  assert header.present?, no_content_type_message
+
+  assert header.value.start_with?(type), bad_content_type_message(type, header.value)
+end
+
+
+ +
+

+ + #assert_response_status(status, request: self.request, response: nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Check a response’s status

+ + +
+
+
+

Parameters:

+
    + +
  • + + status + + + (Integer, Array<Integer>) + + + + — +

    a single integer or an array of +integer status codes

    +
    + +
  • + +
  • + + request + + + (Inferno::Entities::Request) + + + (defaults to: self.request) + + +
  • + +
  • + + response + + + (Hash) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+32
+33
+34
+35
+
+
# File 'lib/inferno/dsl/assertions.rb', line 32
+
+def assert_response_status(status, request: self.request, response: nil)
+  response ||= request&.response
+  assert Array.wrap(status).include?(response[:status]), bad_response_status_message(status, response[:status])
+end
+
+
+ +
+

+ + #assert_valid_bundle_entries(bundle: resource, resource_types: {}) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Validate each entry of a Bundle

+ +

[String,Symbol,FHIR::Model,Array<String,Symbol,FHIR::Model>,Hash] If a + string, symbol, or FHIR::Model is provided, only that resource type + will be validated. If an array of strings is provided, only those + resource types will be validated. If a hash is provided with resource + types as keys and profile urls (or nil) as values, only those resource + types will be validated against the provided profile url or the base + resource if nil.

+ + +
+
+
+ +
+

Examples:

+ + +
# Only validate Patient bundle entries
+assert_valid_bundle_entries(resource_types: 'Patient')
+
+# Only valiadte Patient and Condition bundle entries
+assert_valid_bundle_entries(resource_types: ['Patient', 'Condition'])
+
+# Only validate Patient and Condition bundle entries. Validate Patient
+# resources against the given profile, and Codition resources against the
+# base FHIR Condition resource.
+assert_valid_bundle_entries(
+  resource_types: {
+    'Patient': 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient',
+    'Condition': nil
+  }
+)
+ +
+

Parameters:

+
    + +
  • + + bundle + + + (FHIR::Bundle) + + + (defaults to: resource) + + +
  • + +
  • + + resource_types + + + + + + (defaults to: {}) + + +
  • + +
+ + +
+ + + + +
+
+
+
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+
+
# File 'lib/inferno/dsl/assertions.rb', line 106
+
+def assert_valid_bundle_entries(bundle: resource, resource_types: {})
+  assert_resource_type('Bundle', resource: bundle)
+
+  types_to_check = normalize_types_to_check(resource_types)
+
+  invalid_resources =
+    bundle
+      .entry
+      .map(&:resource)
+      .select { |resource| types_to_check.empty? || types_to_check.include?(resource.resourceType) }
+      .reject do |resource|
+        validation_params = { resource: }
+        profile = types_to_check[resource.resourceType]
+        validation_params[:profile_url] = profile if profile
+
+        resource_is_valid?(**validation_params)
+      end
+
+  assert invalid_resources.empty?, invalid_bundle_entries_message(invalid_resources)
+end
+
+
+ +
+

+ + #assert_valid_http_uri(uri, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Check for a valid http/https uri

+ + +
+
+
+

Parameters:

+
    + +
  • + + uri + + + (String) + + + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + + — +

    custom failure message

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+173
+174
+175
+176
+
+
# File 'lib/inferno/dsl/assertions.rb', line 173
+
+def assert_valid_http_uri(uri, message = '')
+  error_message = message.presence || "\"#{uri}\" is not a valid URI"
+  assert uri =~ /\A#{URI::DEFAULT_PARSER.make_regexp(['http', 'https'])}\z/, error_message
+end
+
+
+ +
+

+ + #assert_valid_json(maybe_json_string, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Check for valid JSON

+ + +
+
+
+

Parameters:

+
    + +
  • + + maybe_json_string + + + (String) + + + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + + — +

    extra failure message

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+162
+163
+164
+165
+166
+
+
# File 'lib/inferno/dsl/assertions.rb', line 162
+
+def assert_valid_json(maybe_json_string, message = '')
+  assert JSON.parse(maybe_json_string)
+rescue JSON::ParserError
+  assert false, "Invalid JSON. #{message}"
+end
+
+
+ +
+

+ + #assert_valid_resource(resource: self.resource, profile_url: nil, validator: :default) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Validate a FHIR resource

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + (defaults to: self.resource) + + +
  • + +
  • + + profile_url + + + (String) + + + (defaults to: nil) + + + — +

    url of the profile to validate against, +defaults to validating against the base FHIR resource

    +
    + +
  • + +
  • + + validator + + + (Symbol) + + + (defaults to: :default) + + + — +

    the name of the validator to use

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+73
+74
+75
+76
+
+
# File 'lib/inferno/dsl/assertions.rb', line 73
+
+def assert_valid_resource(resource: self.resource, profile_url: nil, validator: :default)
+  assert resource_is_valid?(resource:, profile_url:, validator:),
+         invalid_resource_message(resource, profile_url)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Configurable.html b/docs/docs/Inferno/DSL/Configurable.html new file mode 100644 index 0000000000..2d3972256d --- /dev/null +++ b/docs/docs/Inferno/DSL/Configurable.html @@ -0,0 +1,328 @@ + + + + + + + Module: Inferno::DSL::Configurable + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::Configurable + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/configurable.rb
+
+ +
+ +

Overview

+
+

This module contains the DSL for managing runnable configuration. Runnable +configuration provides a way to modify test behavior at boot time.

+ +

The main features enabled by configuration are:

+ +
    +
  • Modifying the properties of a runnable’s inputs. This could include +locking a particular input, making a particular input optional/required, +or changing an input’s value.
  • +
  • Renaming an input/output/request to avoid name collisions when a test +suite uses the same test multiple times.
  • +
  • Tests can define custom configuration options to enable different
  • +
  • testing behavior.
  • +
+ + +
+
+
+ +
+

Examples:

+ + +
test do
+  id :json_request_test
+
+  input :url
+  output :response_body
+  makes_request :json_request
+
+  run do
+    if config.options[:include_content_type]
+      get url, headers: { 'Content-Type' => 'application/json' }
+    else
+      get url
+    end
+
+    assert_response_status(200)
+    output response_body: request.response_body
+    assert_valid_json
+  end
+end
+
+group do
+  test from :json_request_test do
+    id :json_request_without_content_type
+
+    config(
+      inputs: {
+        url: { name: :url_without_content_type }
+      },
+      outputs: {
+        response_body: { name: :response_body_without_content_type }
+      },
+      requests: {
+        json_request: { name: :json_request_without_content_type }
+      }
+    )
+  end
+
+  test from :json_request_test do
+    id :json_request_with_content_type
+
+    config(
+      options: {
+        include_content_type: true
+      },
+      inputs: {
+        url: { name: :url_with_content_type }
+      },
+      outputs: {
+        response_body: { name: :response_body_with_content_type }
+      },
+      requests: {
+        json_request: { name: :json_request_with_content_type }
+      }
+    )
+  end
+end
+ +
+ + +

Defined Under Namespace

+

+ + + + + Classes: Configuration + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #config(new_configuration = {}) ⇒ Inferno::DSL::Configurable::Configuration + + + + + +

+
+

Define/update/get the configuration for a runnable. This configuration +will be applied to the runnable and all of its children.

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_configuration + + + (Hash) + + + (defaults to: {}) + + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+
+
# File 'lib/inferno/dsl/configurable.rb', line 86
+
+def config(new_configuration = {})
+  @config ||= Configuration.new
+
+  return @config if new_configuration.blank?
+
+  @config.apply(new_configuration)
+
+  all_children.each { |child| child.config(new_configuration) }
+
+  @config
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Configurable/Configuration.html b/docs/docs/Inferno/DSL/Configurable/Configuration.html new file mode 100644 index 0000000000..b8a69ca9b8 --- /dev/null +++ b/docs/docs/Inferno/DSL/Configurable/Configuration.html @@ -0,0 +1,532 @@ + + + + + + + Class: Inferno::DSL::Configurable::Configuration + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::Configurable::Configuration + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/configurable.rb
+
+ +
+ +

Overview

+
+

This class stores a runnable’s configuration. It should never be +directly instantiated within a test suite. Instead, a runnable’s +configuration can be modified or retrieved using the config method.

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ +
    + +
  • + + + #inputs ⇒ Hash + + + + + + + + + + + + + +

    The input configuration for this runnable.

    +
    + +
  • + + +
  • + + + #options ⇒ Hash + + + + + + + + + + + + + +

    The configuration options defined for this runnable.

    +
    + +
  • + + +
  • + + + #outputs ⇒ Hash + + + + + + + + + + + + + +

    The output configuration for this runnable.

    +
    + +
  • + + +
  • + + + #requests ⇒ Hash + + + + + + + + + + + + + +

    The request configuration for this runnable.

    +
    + +
  • + + +
+ + + +
+

Instance Attribute Details

+ + + +
+

+ + #configurationObject + + + + + +

+
+

Returns the value of attribute configuration.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+102
+103
+104
+
+
# File 'lib/inferno/dsl/configurable.rb', line 102
+
+def configuration
+  @configuration
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #inputsHash + + + + + +

+
+

The input configuration for this runnable.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + +
  • + +
+ +
+ + + + +
+
+
+
+137
+138
+139
+
+
# File 'lib/inferno/dsl/configurable.rb', line 137
+
+def inputs
+  configuration[:inputs] ||= {}
+end
+
+
+ +
+

+ + #optionsHash + + + + + +

+
+

The configuration options defined for this runnable.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + +
  • + +
+ +
+ + + + +
+
+
+
+128
+129
+130
+
+
# File 'lib/inferno/dsl/configurable.rb', line 128
+
+def options
+  configuration[:options] ||= {}
+end
+
+
+ +
+

+ + #outputsHash + + + + + +

+
+

The output configuration for this runnable.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + +
  • + +
+ +
+ + + + +
+
+
+
+185
+186
+187
+
+
# File 'lib/inferno/dsl/configurable.rb', line 185
+
+def outputs
+  configuration[:outputs] ||= {}
+end
+
+
+ +
+

+ + #requestsHash + + + + + +

+
+

The request configuration for this runnable.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + +
  • + +
+ +
+ + + + +
+
+
+
+225
+226
+227
+
+
# File 'lib/inferno/dsl/configurable.rb', line 225
+
+def requests
+  configuration[:requests] ||= {}
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRClient.html b/docs/docs/Inferno/DSL/FHIRClient.html new file mode 100644 index 0000000000..533293d5c4 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRClient.html @@ -0,0 +1,1973 @@ + + + + + + + Module: Inferno::DSL::FHIRClient + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIRClient + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_client.rb
+
+ +
+ +

Overview

+
+

This module contains the FHIR DSL available to test writers.

+ + +
+
+
+ +
+

Examples:

+ + +
class MyTestGroup < Inferno::TestGroup
+  # create a "default" client for a group
+  fhir_client do
+    url 'https://example.com/fhir'
+  end
+
+  # create a named client for a group
+  fhir_client :with_custom_header do
+    url 'https://example.com/fhir'
+    headers 'X-my-custom-header': 'ABC123'
+  end
+
+  test :some_test do
+    run do
+      # uses the default client
+      fhir_read('Patient', 5)
+
+      # uses a named client
+      fhir_read('Patient', 5, client: :with_custom_header)
+
+      request  # the most recent request
+      response # the most recent response
+      resource # the resource from the most recent response
+      requests # all of the requests which have been made in this test
+    end
+  end
+end
+ +
+ + +

See Also:

+ + +

Defined Under Namespace

+

+ + + Modules: ClassMethods + + + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #fhir_client(client = :default) ⇒ FHIR::Client + + + + + +

+
+

Return a previously defined FHIR client

+ + +
+
+
+

Parameters:

+
    + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + + — +

    the name of the client

    +
    + +
  • + +
+ +

Returns:

+ + +

See Also:

+ + +
+ + + + +
+
+
+
+53
+54
+55
+56
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 53
+
+def fhir_client(client = :default)
+  fhir_clients[client] ||=
+    FHIRClientBuilder.new.build(self, self.class.fhir_client_definitions[client])
+end
+
+
+ +
+

+ + #fhir_create(resource, client: :default, name: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR create interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+147
+148
+149
+150
+151
+152
+153
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 147
+
+def fhir_create(resource, client: :default, name: nil)
+  store_request_and_refresh_token(fhir_client(client), name) do
+    tcp_exception_handler do
+      fhir_client(client).create(resource)
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_delete(resource_type, id, client: :default, name: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR delete interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + +
  • + +
  • + + id + + + (String) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+280
+281
+282
+283
+284
+285
+286
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 280
+
+def fhir_delete(resource_type, id, client: :default, name: nil)
+  store_request('outgoing', name) do
+    tcp_exception_handler do
+      fhir_client(client).destroy(fhir_class_from_resource_type(resource_type), id)
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_get_capability_statement(client: :default, name: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Fetch the capability statement.

+ + +
+
+
+

Parameters:

+
    + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+131
+132
+133
+134
+135
+136
+137
+138
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 131
+
+def fhir_get_capability_statement(client: :default, name: nil)
+  store_request_and_refresh_token(fhir_client(client), name) do
+    tcp_exception_handler do
+      fhir_client(client).conformance_statement
+      fhir_client(client).reply
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_history(resource_type = nil, id = nil, client: :default, name: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR history interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + (defaults to: nil) + + +
  • + +
  • + + id + + + (String) + + + (defaults to: nil) + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 229
+
+def fhir_history(resource_type = nil, id = nil, client: :default, name: nil)
+  store_request_and_refresh_token(fhir_client(client), name) do
+    tcp_exception_handler do
+      if id
+        fhir_client(client).resource_instance_history(fhir_class_from_resource_type(resource_type), id)
+      elsif resource_type
+        fhir_client(client).resource_history(fhir_class_from_resource_type(resource_type))
+      else
+        fhir_client(client).all_history
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_operation(path, body: nil, client: :default, name: nil, headers: {}, operation_method: :post) ⇒ Inferno::Entities::Request + + + + + +

+
+ +
+ Note: +

This is a placeholder method until the FHIR::Client supports +general operations. Note that while both POST and GET methods are allowed, +GET is only allowed when the operation does not affect the server’s state. +See https://build.fhir.org/operationdefinition-definitions.html#OperationDefinition.affectsState

+
+
+ +
+ Note: +

Currently does not allow for repeated parameters if using GET

+
+
+ +

Perform a FHIR operation

+ + +
+
+
+

Parameters:

+
    + +
  • + + path + + + (String) + + + +
  • + +
  • + + body + + + (FHIR::Parameters) + + + (defaults to: nil) + + + — +

    Must all be primitive if making GET request

    +
    + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + headers + + + (Hash) + + + (defaults to: {}) + + + — +

    custom headers for this operation

    +
    + +
  • + +
  • + + operation_method + + + (Symbol) + + + (defaults to: :post) + + + — +

    indicates which request type to use for the operation

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 105
+
+def fhir_operation(path, body: nil, client: :default, name: nil, headers: {}, operation_method: :post)
+  store_request_and_refresh_token(fhir_client(client), name) do
+    tcp_exception_handler do
+      operation_headers = fhir_client(client).fhir_headers
+      operation_headers.merge!('Content-Type' => 'application/fhir+json') if body.present?
+      operation_headers.merge!(headers) if headers.present?
+      case operation_method
+      when :post
+        fhir_client(client).send(:post, path, body, operation_headers)
+      when :get
+        path = "#{path}?#{body_to_path(body)}" if body.present?
+        fhir_client(client).send(:get, path, operation_headers)
+      else
+        Inferno::Application[:logger].error "Cannot perform #{operation_method} requests, use GET or POST"
+        raise ArgumentError, "Cannot perform #{operation_method} requests, use GET or POST"
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_patch(resource_type, id, patchset, client: :default, name: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR patch interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + +
  • + +
  • + + id + + + (String) + + + +
  • + +
  • + + patchset + + + (Array) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+213
+214
+215
+216
+217
+218
+219
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 213
+
+def fhir_patch(resource_type, id, patchset, client: :default, name: nil)
+  store_request_and_refresh_token(fhir_client(client), name) do
+    tcp_exception_handler do
+      fhir_client(client).partial_update(fhir_class_from_resource_type(resource_type), id, patchset)
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_read(resource_type, id, client: :default, name: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR read interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + +
  • + +
  • + + id + + + (String) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+163
+164
+165
+166
+167
+168
+169
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 163
+
+def fhir_read(resource_type, id, client: :default, name: nil)
+  store_request_and_refresh_token(fhir_client(client), name) do
+    tcp_exception_handler do
+      fhir_client(client).read(fhir_class_from_resource_type(resource_type), id)
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_search(resource_type = nil, client: :default, params: {}, name: nil, search_method: :get) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR search interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + (defaults to: nil) + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + params + + + (Hash) + + + (defaults to: {}) + + + — +

    the search params

    +
    + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + search_method + + + (Symbol) + + + (defaults to: :get) + + + — +

    Use :post to search via POST

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 252
+
+def fhir_search(resource_type = nil, client: :default, params: {}, name: nil, search_method: :get)
+  search =
+    if search_method == :post
+      { body: params }
+    else
+      { parameters: params }
+    end
+
+  store_request_and_refresh_token(fhir_client(client), name) do
+    tcp_exception_handler do
+      if resource_type
+        fhir_client(client)
+          .search(fhir_class_from_resource_type(resource_type), { search: })
+      else
+        fhir_client(client).search_all({ search: })
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_transaction(bundle = nil, client: :default, name: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR batch/transaction interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + bundle + + + (FHIR::Bundle) + + + (defaults to: nil) + + + — +

    the FHIR batch/transaction Bundle

    +
    + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+295
+296
+297
+298
+299
+300
+301
+302
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 295
+
+def fhir_transaction(bundle = nil, client: :default, name: nil)
+  store_request('outgoing', name) do
+    tcp_exception_handler do
+      fhir_client(client).transaction_bundle = bundle if bundle.present?
+      fhir_client(client).end_transaction
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_update(resource, id, client: :default, name: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR update interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + +
  • + +
  • + + id + + + (String) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+196
+197
+198
+199
+200
+201
+202
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 196
+
+def fhir_update(resource, id, client: :default, name: nil)
+  store_request_and_refresh_token(fhir_client(client), name) do
+    tcp_exception_handler do
+      fhir_client(client).update(resource, id)
+    end
+  end
+end
+
+
+ +
+

+ + #fhir_vread(resource_type, id, version_id, client: :default, name: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform a FHIR vread interaction.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource_type + + + (String, Symbol, Class) + + + +
  • + +
  • + + id + + + (String) + + + +
  • + +
  • + + version_id + + + (String) + + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+180
+181
+182
+183
+184
+185
+186
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 180
+
+def fhir_vread(resource_type, id, version_id, client: :default, name: nil)
+  store_request_and_refresh_token(fhir_client(client), name) do
+    tcp_exception_handler do
+      fhir_client(client).vread(fhir_class_from_resource_type(resource_type), id, version_id)
+    end
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRClient/ClassMethods.html b/docs/docs/Inferno/DSL/FHIRClient/ClassMethods.html new file mode 100644 index 0000000000..6a7c8b1243 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRClient/ClassMethods.html @@ -0,0 +1,234 @@ + + + + + + + Module: Inferno::DSL::FHIRClient::ClassMethods + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIRClient::ClassMethods + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/fhir_client.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #fhir_client(name = :default, &block) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define a FHIR client to be used by a Runnable.

+ + +
+
+
+

Parameters:

+
    + +
  • + + name + + + (Symbol) + + + (defaults to: :default) + + + — +

    a name used to reference this particular client

    +
    + +
  • + +
  • + + block + + + + + + + — +

    a block to configure the client

    +
    + +
  • + +
+ + +

See Also:

+
    + +
  • Documentation for the client +configuration DSL
  • + +
+ +
+ + + + +
+
+
+
+361
+362
+363
+
+
# File 'lib/inferno/dsl/fhir_client.rb', line 361
+
+def fhir_client(name = :default, &block)
+  fhir_client_definitions[name] = block
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRClientBuilder.html b/docs/docs/Inferno/DSL/FHIRClientBuilder.html new file mode 100644 index 0000000000..088233b0c4 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRClientBuilder.html @@ -0,0 +1,644 @@ + + + + + + + Class: Inferno::DSL::FHIRClientBuilder + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::FHIRClientBuilder + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_client_builder.rb
+
+ +
+ +

Overview

+
+

DSL for configuring FHIR clients

+ + +
+
+
+ +
+

Examples:

+ + +
input :url
+input :fhir_credentials, type: :oauth_credentials
+input :access_token
+
+fhir_client do
+  url :url
+  headers 'My-Custom_header' => 'CUSTOM_HEADER_VALUE'
+  oauth_credentials :fhir_credentials
+end
+
+fhir_client :with_bearer_token do
+  url :url
+  bearer_token :access_token
+end
+ +
+ + +
+ + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #runnable ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute runnable.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Dynamic Method Handling

+

+ This class handles dynamic methods through the method_missing method + +

+ +
+

+ + #method_missing(name, *args) ⇒ Object + + + + + +

+ + + + +
+
+
+
+92
+93
+94
+95
+96
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 92
+
+def method_missing(name, *args, &)
+  return runnable.call(name, *args, &) if runnable.respond_to? name
+
+  super
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #runnableObject + + + + + +

+
+

Returns the value of attribute runnable.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+24
+25
+26
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 24
+
+def runnable
+  @runnable
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #bearer_token(bearer_token = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define the bearer token for a client. A string or symbol can be provided. +A string is interpreted as a token. A symbol is interpreted as the name of +an input to the Runnable.

+ + +
+
+
+

Parameters:

+
    + +
  • + + bearer_token + + + (String, Symbol) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+60
+61
+62
+63
+64
+65
+66
+67
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 60
+
+def bearer_token(bearer_token = nil)
+  @bearer_token ||=
+    if bearer_token.is_a? Symbol
+      runnable.send(bearer_token)
+    else
+      bearer_token
+    end
+end
+
+
+ +
+

+ + #headers(headers = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define custom headers for a client

+ + +
+
+
+

Parameters:

+
    + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+87
+88
+89
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 87
+
+def headers(headers = nil)
+  @headers ||= headers
+end
+
+
+ +
+

+ + #oauth_credentials(oauth_credentials = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define OAuth credentials for a client. These can allow a client to +automatically refresh its access token when it expires.

+ + +
+
+
+

Parameters:

+ + + +
+ + + + +
+
+
+
+74
+75
+76
+77
+78
+79
+80
+81
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 74
+
+def oauth_credentials(oauth_credentials = nil)
+  @oauth_credentials ||=
+    if oauth_credentials.is_a? Symbol
+      runnable.send(oauth_credentials)
+    else
+      oauth_credentials
+    end
+end
+
+
+ +
+

+ + #url(url = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define the base FHIR url for a client. A string or symbol can be provided. +A string is interpreted as a url. A symbol is interpreted as the name of +an input to the Runnable.

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String, Symbol) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+45
+46
+47
+48
+49
+50
+51
+52
+
+
# File 'lib/inferno/dsl/fhir_client_builder.rb', line 45
+
+def url(url = nil)
+  @url ||=
+    if url.is_a? Symbol
+      runnable.send(url)
+    else
+      url
+    end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRValidation.html b/docs/docs/Inferno/DSL/FHIRValidation.html new file mode 100644 index 0000000000..d408e77f9d --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRValidation.html @@ -0,0 +1,363 @@ + + + + + + + Module: Inferno::DSL::FHIRValidation + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIRValidation + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/fhir_validation.rb
+
+ +
+ +

Overview

+
+

This module contains the methods needed to configure a validator to +perform validation of FHIR resources. The actual validation is performed +by an external FHIR validation service. Tests will typically rely on +assert_valid_resource for validation rather than directly calling +methods on a validator.

+ + +
+
+
+ +
+

Examples:

+ + +

+validator do
+  url 'http://example.com/validator'
+  exclude_message { |message| message.type == 'info' }
+  perform_additional_validation do |resource, profile_url|
+    if something_is_wrong
+      { type: 'error', message: 'something is wrong' }
+    else
+      { type: 'info', message: 'everything is ok' }
+    end
+  end
+end
+ +
+ + +

Defined Under Namespace

+

+ + + Modules: ClassMethods + + + + Classes: Validator + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #find_validator(validator_name) ⇒ Object + + + + + +

+
+

Find a particular validator. Looks through a runnable’s parents up to +the suite to find a validator with a particular name

+ + +
+
+
+ + +
+ + + + +
+
+
+
+40
+41
+42
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 40
+
+def find_validator(validator_name)
+  self.class.find_validator(validator_name, suite_options)
+end
+
+
+ +
+

+ + #resource_is_valid?(resource: self.resource, profile_url: nil, validator: :default) ⇒ Boolean + + + + + +

+
+

Perform validation, and add validation messages to the runnable

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + (defaults to: self.resource) + + +
  • + +
  • + + profile_url + + + (String) + + + (defaults to: nil) + + +
  • + +
  • + + validator + + + (Symbol) + + + (defaults to: :default) + + + — +

    the name of the validator to use

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + + — +

    whether the resource is valid

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+34
+35
+36
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 34
+
+def resource_is_valid?(resource: self.resource, profile_url: nil, validator: :default)
+  find_validator(validator).resource_is_valid?(resource, profile_url, self)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRValidation/ClassMethods.html b/docs/docs/Inferno/DSL/FHIRValidation/ClassMethods.html new file mode 100644 index 0000000000..831ce8697b --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRValidation/ClassMethods.html @@ -0,0 +1,362 @@ + + + + + + + Module: Inferno::DSL::FHIRValidation::ClassMethods + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::FHIRValidation::ClassMethods + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_validation.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #find_validator(validator_name, selected_suite_options = nil) ⇒ Object + + + + + +

+
+

Find a particular validator. Looks through a runnable’s parents up to +the suite to find a validator with a particular name

+ + +
+
+
+ +

Raises:

+ + +
+ + + + +
+
+
+
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 265
+
+def find_validator(validator_name, selected_suite_options = nil)
+  validators = fhir_validators[validator_name] ||
+               Array.wrap(parent&.find_validator(validator_name, selected_suite_options))
+
+  validator =
+    if selected_suite_options.present?
+      validators.find do |possible_validator|
+        possible_validator.requirements.nil? || selected_suite_options >= possible_validator.requirements
+      end
+    else
+      validators.first
+    end
+
+  raise Exceptions::ValidatorNotFoundException, validator_name if validator.nil?
+
+  validator
+end
+
+
+ +
+

+ + #validator(name = :default, required_suite_options: nil, &block) ⇒ Object + + + + + +

+
+

Define a validator

+ + +
+
+
+ +
+

Examples:

+ + +
validator do
+  url 'http://example.com/validator'
+  exclude_message { |message| message.type == 'info' }
+  perform_additional_validation do |resource, profile_url|
+    if something_is_wrong
+      { type: 'error', message: 'something is wrong' }
+    else
+      { type: 'info', message: 'everything is ok' }
+    end
+  end
+end
+ +
+

Parameters:

+
    + +
  • + + name + + + (Symbol) + + + (defaults to: :default) + + + — +

    the name of the validator, only needed if you are +using multiple validators

    +
    + +
  • + +
  • + + required_suite_options + + + (Hash) + + + (defaults to: nil) + + + — +

    suite options that must be +selected in order to use this validator

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 252
+
+def validator(name = :default, required_suite_options: nil, &block)
+  current_validators = fhir_validators[name] || []
+
+  new_validator = Inferno::DSL::FHIRValidation::Validator.new(required_suite_options, &block)
+
+  current_validators.reject! { |validator| validator.requirements == required_suite_options }
+  current_validators << new_validator
+
+  fhir_validators[name] = current_validators
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/FHIRValidation/Validator.html b/docs/docs/Inferno/DSL/FHIRValidation/Validator.html new file mode 100644 index 0000000000..0e04cd6973 --- /dev/null +++ b/docs/docs/Inferno/DSL/FHIRValidation/Validator.html @@ -0,0 +1,774 @@ + + + + + + + Class: Inferno::DSL::FHIRValidation::Validator + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::FHIRValidation::Validator + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/fhir_validation.rb
+
+ +
+ + + + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #requirements ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute requirements.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #requirementsObject (readonly) + + + + + +

+
+

Returns the value of attribute requirements.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+45
+46
+47
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 45
+
+def requirements
+  @requirements
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #exclude_message {|message| ... } ⇒ Object + + + + + +

+
+

Filter out unwanted validation messages. Any messages for which the +block evalutates to a truthy value will be excluded.

+ + +
+
+
+ +
+

Examples:

+ + +
validator do
+  exclude_message { |message| message.type == 'info' }
+end
+ +
+ +

Yield Parameters:

+ + +
+ + + + +
+
+
+
+110
+111
+112
+113
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 110
+
+def exclude_message(&block)
+  @exclude_message = block if block_given?
+  @exclude_message
+end
+
+
+ +
+

+ + #perform_additional_validation {|resource, profile_url| ... } ⇒ Object + + + + + +

+
+

Perform validation steps in addition to FHIR validation.

+ + +
+
+
+ +
+

Examples:

+ + +
perform_additional_validation do |resource, profile_url|
+  if something_is_wrong
+    { type: 'error', message: 'something is wrong' }
+  else
+    { type: 'info', message: 'everything is ok' }
+  end
+end
+ +
+ +

Yield Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + + — +

    the resource being validated

    +
    + +
  • + +
  • + + profile_url + + + (String) + + + + — +

    the profile the resource is being +validated against

    +
    + +
  • + +
+

Yield Returns:

+
    + +
  • + + + (Array<Hash<Symbol, String>>, Hash<Symbol, String>) + + + + — +

    The +block should return a Hash or an Array of Hashes if any validation +messages should be added. The Hash must contain two keys: :type +and :message. :type can have a value of 'info', 'warning', +or 'error'. A type of 'error' means the resource is invalid. +:message contains the message string itself.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+91
+92
+93
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 91
+
+def perform_additional_validation(&block)
+  additional_validations << block
+end
+
+
+ +
+

+ + #resource_is_valid?(resource, profile_url, runnable) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +

See Also:

+ + +
+ + + + +
+
+
+
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 116
+
+def resource_is_valid?(resource, profile_url, runnable)
+  profile_url ||= FHIR::Definitions.resource_definition(resource.resourceType).url
+
+  begin
+    response = call_validator(resource, profile_url)
+  rescue StandardError => e
+    # This could be a complete failure to connect (validator isn't running)
+    # or a timeout (validator took too long to respond).
+    runnable.add_message('error', e.message)
+    raise Inferno::Exceptions::ErrorInValidatorException, "Unable to connect to validator at #{url}."
+  end
+  outcome = operation_outcome_from_validator_response(response.body, runnable)
+
+  message_hashes = message_hashes_from_outcome(outcome, resource, profile_url)
+
+  message_hashes
+    .each { |message_hash| runnable.add_message(message_hash[:type], message_hash[:message]) }
+
+  unless response.status == 200
+    raise Inferno::Exceptions::ErrorInValidatorException,
+          'Error occurred in the validator. Review Messages tab or validator service logs for more information.'
+  end
+
+  message_hashes
+    .none? { |message_hash| message_hash[:type] == 'error' }
+rescue Inferno::Exceptions::ErrorInValidatorException
+  raise
+rescue StandardError => e
+  runnable.add_message('error', e.message)
+  raise Inferno::Exceptions::ErrorInValidatorException,
+        'Error occurred in the validator. Review Messages tab or validator service logs for more information.'
+end
+
+
+ +
+

+ + #url(validator_url = nil) ⇒ Object + + + + + +

+
+

Set the url of the validator service

+ + +
+
+
+

Parameters:

+
    + +
  • + + validator_url + + + (String) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+61
+62
+63
+64
+65
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 61
+
+def url(validator_url = nil)
+  @url = validator_url if validator_url
+
+  @url
+end
+
+
+ +
+

+ + #validate(resource, profile_url) ⇒ String + + + + + +

+
+

Post a resource to the validation service for validating.

+ + +
+
+
+

Parameters:

+
    + +
  • + + resource + + + (FHIR::Model) + + + +
  • + +
  • + + profile_url + + + (String) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the body of the validation response

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+203
+204
+205
+
+
# File 'lib/inferno/dsl/fhir_validation.rb', line 203
+
+def validate(resource, profile_url)
+  call_validator(resource, profile_url).body
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/HTTPClient.html b/docs/docs/Inferno/DSL/HTTPClient.html new file mode 100644 index 0000000000..7d9f1ec660 --- /dev/null +++ b/docs/docs/Inferno/DSL/HTTPClient.html @@ -0,0 +1,1044 @@ + + + + + + + Module: Inferno::DSL::HTTPClient + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::HTTPClient + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/http_client.rb
+
+ +
+ +

Overview

+
+

This module contains the HTTP DSL available to test writers.

+ + +
+
+
+ +
+

Examples:

+ + +
class MyTestGroup < Inferno::TestGroup
+  # create a "default" client for a group
+  http_client do
+    url 'https://example.com/'
+  end
+
+  test :some_test do
+    run do
+      # performs a GET to https://example.com
+      get
+      # performs a GET to https://example.com/abc
+      get('abc')
+
+      request  # the most recent request
+      response # the most recent response
+      requests # all of the requests which have been made in this test
+    end
+  end
+end
+ +
+ + +

See Also:

+ + +

Defined Under Namespace

+

+ + + Modules: ClassMethods + + + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #delete(url = '', client: :default, name: :nil, headers: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform an HTTP DELETE request

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String) + + + (defaults to: '') + + + — +

    if this request is using a defined client, this will +be appended to the client’s url. Must be an absolute url for requests +made without a defined client

    +
    + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: :nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + + — +

    Input headers here

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+
+
# File 'lib/inferno/dsl/http_client.rb', line 133
+
+def delete(url = '', client: :default, name: :nil, headers: nil)
+  store_request('outgoing', name) do
+    tcp_exception_handler do
+      client = http_client(client)
+
+      if client
+        client.delete(url, nil, headers)
+      elsif url.match?(%r{\Ahttps?://})
+        connection.delete(url, nil, headers)
+      else
+        raise StandardError, 'Must use an absolute url or define an HTTP client with a base url'
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #get(url = '', client: :default, name: nil, headers: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform an HTTP GET request

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String) + + + (defaults to: '') + + + — +

    if this request is using a defined client, this will +be appended to the client’s url. Must be an absolute url for requests +made without a defined client

    +
    + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + + — +

    Input headers here

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+
+
# File 'lib/inferno/dsl/http_client.rb', line 72
+
+def get(url = '', client: :default, name: nil, headers: nil)
+  store_request('outgoing', name) do
+    tcp_exception_handler do
+      client = http_client(client)
+
+      if client
+        client.get(url, nil, headers)
+      elsif url.match?(%r{\Ahttps?://})
+        connection.get(url, nil, headers)
+      else
+        raise StandardError, 'Must use an absolute url or define an HTTP client with a base url'
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #http_client(client = :default) ⇒ Faraday::Connection + + + + + +

+
+

Return a previously defined HTTP client

+ + +
+
+
+

Parameters:

+
    + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + + — +

    the name of the client

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Faraday::Connection) + + + +
  • + +
+ +

See Also:

+
    + +
  • HTTPClientBuilder
  • + +
+ +
+ + + + +
+
+
+
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+
+
# File 'lib/inferno/dsl/http_client.rb', line 46
+
+def http_client(client = :default)
+  return http_clients[client] if http_clients[client]
+
+  definition = self.class.http_client_definitions[client]
+  return nil if definition.nil?
+
+  tcp_exception_handler do
+    http_clients[client] = HTTPClientBuilder.new.build(self, definition)
+  end
+end
+
+
+ +
+

+ + #post(url = '', body: nil, client: :default, name: nil, headers: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform an HTTP POST request

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String) + + + (defaults to: '') + + + — +

    if this request is using a defined client, this will +be appended to the client’s url. Must be an absolute url for requests +made without a defined client

    +
    + +
  • + +
  • + + body + + + (String) + + + (defaults to: nil) + + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + + — +

    Input headers here

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+
+
# File 'lib/inferno/dsl/http_client.rb', line 107
+
+def post(url = '', body: nil, client: :default, name: nil, headers: nil)
+  store_request('outgoing', name) do
+    tcp_exception_handler do
+      client = http_client(client)
+
+      if client
+        client.post(url, body, headers)
+      elsif url.match?(%r{\Ahttps?://})
+        connection.post(url, body, headers)
+      else
+        raise StandardError, 'Must use an absolute url or define an HTTP client with a base url'
+      end
+    end
+  end
+end
+
+
+ +
+

+ + #stream(block, url = '', limit = 100, client: :default, name: nil, headers: nil) ⇒ Inferno::Entities::Request + + + + + +

+
+

Perform an HTTP GET request and stream the response

+ + +
+
+
+

Parameters:

+
    + +
  • + + block + + + (Proc) + + + + — +

    A Proc object whose input will be the string chunks +received while streaming response to the get request.

    +
    + +
  • + +
  • + + url + + + (String) + + + (defaults to: '') + + + — +

    If this request is using a defined client, this will +be appended to the client’s url. Must be an absolute url for requests +made without a defined client

    +
    + +
  • + +
  • + + limit + + + (Integer) + + + (defaults to: 100) + + + — +

    The number of streamed-in chunks to be stored in +the response body. This optional input defaults to 100.

    +
    + +
  • + +
  • + + client + + + (Symbol) + + + (defaults to: :default) + + +
  • + +
  • + + name + + + (Symbol) + + + (defaults to: nil) + + + — +

    Name for this request to allow it to be used by +other tests

    +
    + +
  • + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + + — +

    Input headers here

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+
+
# File 'lib/inferno/dsl/http_client.rb', line 163
+
+def stream(block, url = '', limit = 100, client: :default, name: nil, headers: nil)
+  streamed = []
+
+  collector = proc do |chunk, bytes|
+    streamed << chunk if limit.positive?
+    limit -= 1
+    block.call(chunk, bytes)
+  end
+
+  store_request('outgoing', name) do
+    tcp_exception_handler do
+      client = http_client(client)
+
+      if client
+        response = client.get(url, nil, headers) { |req| req.options.on_data = collector }
+      elsif url.match?(%r{\Ahttps?://})
+        response = connection.get(url, nil, headers) { |req| req.options.on_data = collector }
+      else
+        raise StandardError, 'Must use an absolute url or define an HTTP client with a base url'
+      end
+      response.env.body = streamed.join
+      response
+    end
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/HTTPClient/ClassMethods.html b/docs/docs/Inferno/DSL/HTTPClient/ClassMethods.html new file mode 100644 index 0000000000..84af369294 --- /dev/null +++ b/docs/docs/Inferno/DSL/HTTPClient/ClassMethods.html @@ -0,0 +1,234 @@ + + + + + + + Module: Inferno::DSL::HTTPClient::ClassMethods + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::HTTPClient::ClassMethods + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/http_client.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #http_client(name = :default, &block) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define a HTTP client to be used by a Runnable.

+ + +
+
+
+

Parameters:

+
    + +
  • + + name + + + (Symbol) + + + (defaults to: :default) + + + — +

    a name used to reference this particular client

    +
    + +
  • + +
  • + + block + + + + + + + — +

    a block to configure the client

    +
    + +
  • + +
+ + +

See Also:

+
    + +
  • Documentation for the client +configuration DSL
  • + +
+ +
+ + + + +
+
+
+
+202
+203
+204
+
+
# File 'lib/inferno/dsl/http_client.rb', line 202
+
+def http_client(name = :default, &block)
+  http_client_definitions[name] = block
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/HTTPClientBuilder.html b/docs/docs/Inferno/DSL/HTTPClientBuilder.html new file mode 100644 index 0000000000..9d82cffedc --- /dev/null +++ b/docs/docs/Inferno/DSL/HTTPClientBuilder.html @@ -0,0 +1,440 @@ + + + + + + + Class: Inferno::DSL::HTTPClientBuilder + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::HTTPClientBuilder + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/http_client_builder.rb
+
+ +
+ +

Overview

+
+

This module contains the HTTP DSL available to test writers.

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #runnable ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute runnable.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Dynamic Method Handling

+

+ This class handles dynamic methods through the method_missing method + +

+ +
+

+ + #method_missing(name, *args) ⇒ Object + + + + + +

+ + + + +
+
+
+
+47
+48
+49
+50
+51
+
+
# File 'lib/inferno/dsl/http_client_builder.rb', line 47
+
+def method_missing(name, *args, &)
+  return runnable.call(name, *args, &) if runnable.respond_to? name
+
+  super
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #runnableObject + + + + + +

+
+

Returns the value of attribute runnable.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/dsl/http_client_builder.rb', line 7
+
+def runnable
+  @runnable
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #headers(headers = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define custom headers for a client

+ + +
+
+
+

Parameters:

+
    + +
  • + + headers + + + (Hash) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+42
+43
+44
+
+
# File 'lib/inferno/dsl/http_client_builder.rb', line 42
+
+def headers(headers = nil)
+  @headers ||= headers
+end
+
+
+ +
+

+ + #url(url = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define the base url for an HTTP client. A string or symbol can be +provided. A string is interpreted as a url. A symbol is interpreted as +the name of an input to the Runnable.

+ + +
+
+
+

Parameters:

+
    + +
  • + + url + + + (String, Symbol) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+29
+30
+31
+32
+33
+34
+35
+36
+
+
# File 'lib/inferno/dsl/http_client_builder.rb', line 29
+
+def url(url = nil)
+  @url ||=
+    if url.is_a? Symbol
+      runnable.send(url)
+    else
+      url
+    end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/InputOutputHandling.html b/docs/docs/Inferno/DSL/InputOutputHandling.html new file mode 100644 index 0000000000..825fc31d1a --- /dev/null +++ b/docs/docs/Inferno/DSL/InputOutputHandling.html @@ -0,0 +1,694 @@ + + + + + + + Module: Inferno::DSL::InputOutputHandling + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::InputOutputHandling + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/input_output_handling.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #input(identifier, *other_identifiers, **input_params) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define inputs

+ + +
+
+
+ +
+

Examples:

+ + +
input :patient_id, title: 'Patient ID', description: 'The ID of the patient being searched for',
+                  default: 'default_patient_id'
+ + +
input :textarea, title: 'Textarea Input Example', type: 'textarea', optional: true
+ +
+

Parameters:

+
    + +
  • + + identifier + + + (Symbol) + + + + — +

    identifier for the input

    +
    + +
  • + +
  • + + other_identifiers + + + (Symbol) + + + + — +

    array of symbols if specifying multiple inputs

    +
    + +
  • + +
  • + + input_params + + + (Hash) + + + + — +

    options for input such as type, description, or title

    +
    + +
  • + +
  • + + options + + + (Hash) + + + + — +

    a customizable set of options

    +
    + +
  • + +
+ + + + + + + + +

Options Hash (**input_params):

+
    + +
  • + :title + (String) + + + + + —

    Human readable title for input

    +
    + +
  • + +
  • + :description + (String) + + + + + —

    Description for the input

    +
    + +
  • + +
  • + :type + (String) + + + + + —
    + + + + + + + + + +
    texttextarearadiocheckboxoauth_credentials
    +
    + +
  • + +
  • + :default + (String) + + + + + —

    The default value for the input

    +
    + +
  • + +
  • + :optional + (Boolean) + + + + + —

    Set to true to not require input for test execution

    +
    + +
  • + +
  • + :locked + (Boolean) + + + + + —

    If true, the user can not alter the value

    +
    + +
  • + +
  • + :options + (Hash) + + + + + —

    Possible input option formats based on input type

    +
    + +
  • + +
+ + + +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+
+
# File 'lib/inferno/dsl/input_output_handling.rb', line 24
+
+def input(identifier, *other_identifiers, **input_params)
+  if other_identifiers.present?
+    [identifier, *other_identifiers].compact.each do |input_identifier|
+      inputs << input_identifier
+      config.add_input(input_identifier)
+      children
+        .reject { |child| child.inputs.include? input_identifier }
+        .each do |child|
+          child.input(input_identifier)
+        end
+    end
+  else
+    inputs << identifier
+    config.add_input(identifier, input_params)
+    children
+      .reject { |child| child.inputs.include? identifier }
+      .each do |child|
+        child.input(identifier, **input_params)
+      end
+  end
+end
+
+
+ +
+

+ + #input_order(*new_input_order) ⇒ Array<String, Symbol> + + + + + +

+
+

Define a particular order for inputs to be presented in the API/UI

+ + +
+
+
+ +
+

Examples:

+ + +
group do
+  input :input1, :input2, :input3
+  input_order :input3, :input2, :input1
+end
+ +
+

Parameters:

+
    + +
  • + + new_input_order + + + (Array<String,Symbol>) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<String, Symbol>) + + + +
  • + +
+ +
+ + + + +
+
+
+
+116
+117
+118
+119
+120
+
+
# File 'lib/inferno/dsl/input_output_handling.rb', line 116
+
+def input_order(*new_input_order)
+  return @input_order = new_input_order if new_input_order.present?
+
+  @input_order ||= []
+end
+
+
+ +
+

+ + #output(identifier, *other_identifiers, **output_definition) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define outputs

+ + +
+
+
+ +
+

Examples:

+ + +
output :patient_id, :condition_id, :observation_id
+ + +
output :oauth_credentials, type: 'oauth_credentials'
+ +
+

Parameters:

+
    + +
  • + + identifier + + + (Symbol) + + + + — +

    identifier for the output

    +
    + +
  • + +
  • + + other_identifiers + + + (Symbol) + + + + — +

    array of symbols if specifying multiple outputs

    +
    + +
  • + +
  • + + output_definition + + + (Hash) + + + + — +

    options for output

    +
    + +
  • + +
+ + + + + + + + +

Options Hash (**output_definition):

+
    + +
  • + :type + (String) + + + + + —

    text, textarea, or oauth_credentials

    +
    + +
  • + +
+ + + +
+ + + + +
+
+
+
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+
+
# File 'lib/inferno/dsl/input_output_handling.rb', line 57
+
+def output(identifier, *other_identifiers, **output_definition)
+  if other_identifiers.present?
+    [identifier, *other_identifiers].compact.each do |output_identifier|
+      outputs << output_identifier
+      config.add_output(output_identifier)
+      children
+        .reject { |child| child.outputs.include? output_identifier }
+        .each do |child|
+          child.output(output_identifier)
+        end
+    end
+  else
+    outputs << identifier
+    config.add_output(identifier, output_definition)
+    children
+      .reject { |child| child.outputs.include? identifier }
+      .each do |child|
+        child.output(identifier, **output_definition)
+      end
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/OAuthCredentials.html b/docs/docs/Inferno/DSL/OAuthCredentials.html new file mode 100644 index 0000000000..a26ed22c5f --- /dev/null +++ b/docs/docs/Inferno/DSL/OAuthCredentials.html @@ -0,0 +1,674 @@ + + + + + + + Class: Inferno::DSL::OAuthCredentials + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::OAuthCredentials + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/oauth_credentials.rb
+
+ +
+ +

Overview

+
+

OAuthCredentials provide a user with a single input which allows a fhir +client to use a bearer token and automatically refresh the token when it +expires.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :access_token,
+  :refresh_token,
+  :token_url,
+  :client_id,
+  :client_secret,
+  :token_retrieval_time,
+  :expires_in,
+  :name
+].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + + + + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #access_tokenObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #clientObject + + + + + +

+
+

Returns the value of attribute client.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+22
+23
+24
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 22
+
+def client
+  @client
+end
+
+
+ + + +
+

+ + #client_idObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #client_secretObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #expires_inObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #nameObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #refresh_tokenObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #token_retrieval_timeObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ + + +
+

+ + #token_urlObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/oauth_credentials.rb', line 24
+
+
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/RequestStorage.html b/docs/docs/Inferno/DSL/RequestStorage.html new file mode 100644 index 0000000000..138256e3be --- /dev/null +++ b/docs/docs/Inferno/DSL/RequestStorage.html @@ -0,0 +1,448 @@ + + + + + + + Module: Inferno::DSL::RequestStorage + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::RequestStorage + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/request_storage.rb
+
+ +
+ +

Overview

+
+

This module handles storing and retrieving requests/responses made by +FHIR/HTTP clients

+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + Modules: ClassMethods + + + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #requestInferno::Entities::Request? + + + + + +

+
+

Returns the most recent FHIR/HTTP request

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+20
+21
+22
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 20
+
+def request
+  requests.last
+end
+
+
+ +
+

+ + #requestsArray<Inferno::Entities::Request> + + + + + +

+
+

Returns the FHIR/HTTP requests that have been made in this Test

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 13
+
+def requests
+  @requests ||= []
+end
+
+
+ +
+

+ + #resourceFHIR::Model? + + + + + +

+
+

Returns the FHIR resource from the response to the most recent FHIR +request

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+35
+36
+37
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 35
+
+def resource
+  request&.resource
+end
+
+
+ +
+

+ + #responseHash? + + + + + +

+
+

Returns the response from the most recent FHIR/HTTP request

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash, nil) + + + +
  • + +
+ +
+ + + + +
+
+
+
+27
+28
+29
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 27
+
+def response
+  request&.response
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/RequestStorage/ClassMethods.html b/docs/docs/Inferno/DSL/RequestStorage/ClassMethods.html new file mode 100644 index 0000000000..05778a9eb7 --- /dev/null +++ b/docs/docs/Inferno/DSL/RequestStorage/ClassMethods.html @@ -0,0 +1,378 @@ + + + + + + + Module: Inferno::DSL::RequestStorage::ClassMethods + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::RequestStorage::ClassMethods + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/request_storage.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #makes_request(*identifiers) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Specify the named requests made by a test

+ + +
+
+
+

Parameters:

+
    + +
  • + + identifiers + + + (Symbol) + + + + — +

    one or more request identifiers

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+93
+94
+95
+96
+97
+98
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 93
+
+def makes_request(*identifiers)
+  named_requests_made.concat(identifiers).uniq!
+  identifiers.each do |identifier|
+    config.add_request(identifier)
+  end
+end
+
+
+ +
+

+ + #receives_request(identifier) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Specify the name for a request received by a test

+ + +
+
+
+

Parameters:

+
    + +
  • + + identifier + + + (Symbol) + + + +
  • + +
+ + +
+ + + + +
+
+
+
+104
+105
+106
+107
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 104
+
+def receives_request(identifier)
+  config.add_request(identifier)
+  @incoming_request_name = identifier
+end
+
+
+ +
+

+ + #uses_request(*identifiers) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Specify the named requests used by a test

+ + +
+
+
+

Parameters:

+
    + +
  • + + identifiers + + + (Symbol) + + + + — +

    one or more request identifiers

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+118
+119
+120
+121
+122
+123
+
+
# File 'lib/inferno/dsl/request_storage.rb', line 118
+
+def uses_request(*identifiers)
+  named_requests_used.concat(identifiers).uniq!
+  identifiers.each do |identifier|
+    config.add_request(identifier)
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Results.html b/docs/docs/Inferno/DSL/Results.html new file mode 100644 index 0000000000..55948c2e16 --- /dev/null +++ b/docs/docs/Inferno/DSL/Results.html @@ -0,0 +1,889 @@ + + + + + + + Module: Inferno::DSL::Results + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::Results + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/results.rb
+
+ +
+ +

Overview

+
+

This module contains methods to set test results.

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #omit(message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as omitted.

+ + +
+
+
+

Parameters:

+
    + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+45
+46
+47
+
+
# File 'lib/inferno/dsl/results.rb', line 45
+
+def omit(message = '')
+  raise Exceptions::OmitException, message
+end
+
+
+ +
+

+ + #omit_if(test, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as omitted if a condition +is true.

+ + +
+
+
+

Parameters:

+
    + +
  • + + test + + + (Boolean) + + + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+55
+56
+57
+
+
# File 'lib/inferno/dsl/results.rb', line 55
+
+def omit_if(test, message = '')
+  raise Exceptions::OmitException, message if test
+end
+
+
+ +
+

+ + #pass(message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as passed.

+ + +
+
+
+

Parameters:

+
    + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+9
+10
+11
+
+
# File 'lib/inferno/dsl/results.rb', line 9
+
+def pass(message = '')
+  raise Exceptions::PassException, message
+end
+
+
+ +
+

+ + #pass_if(test, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as passed if a condition +is true.

+ + +
+
+
+

Parameters:

+
    + +
  • + + test + + + (Boolean) + + + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/inferno/dsl/results.rb', line 19
+
+def pass_if(test, message = '')
+  raise Exceptions::PassException, message if test
+end
+
+
+ +
+

+ + #skip(message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as skipped.

+ + +
+
+
+

Parameters:

+
    + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+27
+28
+29
+
+
# File 'lib/inferno/dsl/results.rb', line 27
+
+def skip(message = '')
+  raise Exceptions::SkipException, message
+end
+
+
+ +
+

+ + #skip_if(test, message = '') ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and mark it as skipped if a condition +is true.

+ + +
+
+
+

Parameters:

+
    + +
  • + + test + + + (Boolean) + + + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
+ +

Raises:

+ + +
+ + + + +
+
+
+
+37
+38
+39
+
+
# File 'lib/inferno/dsl/results.rb', line 37
+
+def skip_if(test, message = '')
+  raise Exceptions::SkipException, message if test
+end
+
+
+ +
+

+ + #wait(identifier:, message: '', timeout: 300) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Halt execution of the current test and wait for execution to resume.

+ + +
+
+
+ +
+

Examples:

+ + +
resume_test_route :get, '/launch' do
+  request.query_parameters['iss']
+end
+
+test do
+  input :issuer
+  receives_request :launch
+
+  run do
+    wait(
+      identifier: issuer,
+      message: "Wating to receive a request with an issuer of #{issuer}"
+    )
+  end
+end
+ +
+

Parameters:

+
    + +
  • + + identifier + + + (String) + + + + — +

    An identifier which can uniquely identify +this test run based on an incoming request. This is necessary so that +the correct test run can be resumed.

    +
    + +
  • + +
  • + + message + + + (String) + + + (defaults to: '') + + +
  • + +
  • + + timeout + + + (Integer) + + + (defaults to: 300) + + + — +

    Number of seconds to wait for an incoming +request

    +
    + +
  • + +
+ +

Raises:

+ + +

See Also:

+ + +
+ + + + +
+
+
+
+85
+86
+87
+88
+89
+90
+
+
# File 'lib/inferno/dsl/results.rb', line 85
+
+def wait(identifier:, message: '', timeout: 300)
+  identifier(identifier)
+  wait_timeout(timeout)
+
+  raise Exceptions::WaitException, message
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/Runnable.html b/docs/docs/Inferno/DSL/Runnable.html new file mode 100644 index 0000000000..6fdfe58326 --- /dev/null +++ b/docs/docs/Inferno/DSL/Runnable.html @@ -0,0 +1,1620 @@ + + + + + + + Module: Inferno::DSL::Runnable + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::DSL::Runnable + + + +

+
+ + + + + + + + + +
+
Included in:
+
Entities::TestGroup, Entities::TestSuite
+
+ + + +
+
Defined in:
+
lib/inferno/dsl/runnable.rb
+
+ +
+ +

Overview

+
+

This module contains the DSL for defining child entities in the test +definition framework.

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #parentObject + + + + + +

+
+

Returns the value of attribute parent.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+11
+12
+13
+
+
# File 'lib/inferno/dsl/runnable.rb', line 11
+
+def parent
+  @parent
+end
+
+
+ + + +
+

+ + #suite_option_requirementsObject (readonly) + + + + + +

+
+

Returns the value of attribute suite_option_requirements.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+12
+13
+14
+
+
# File 'lib/inferno/dsl/runnable.rb', line 12
+
+def suite_option_requirements
+  @suite_option_requirements
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #description(new_description = nil) ⇒ String + + + + + +

+
+

Set/Get a runnable’s description

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_description + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the description

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+241
+242
+243
+244
+245
+
+
# File 'lib/inferno/dsl/runnable.rb', line 241
+
+def description(new_description = nil)
+  return @description if new_description.nil?
+
+  @description = format_markdown(new_description)
+end
+
+
+ +
+

+ + #id(new_id = nil) ⇒ String, Symbol + + + + + +

+
+

Set/Get a runnable’s id

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_id + + + (String, Symbol) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String, Symbol) + + + + — +

    the id

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+
+
# File 'lib/inferno/dsl/runnable.rb', line 202
+
+def id(new_id = nil)
+  return @id if new_id.nil? && @id.present?
+
+  prefix =
+    if parent
+      "#{parent.id}-"
+    else
+      ''
+    end
+
+  @base_id = new_id || @base_id || default_id
+
+  @id = "#{prefix}#{@base_id}"
+end
+
+
+ +
+

+ + #input_instructions(new_input_instructions = nil) ⇒ String + + + + + +

+
+

Set/Get a runnable’s input instructions

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_input_instructions + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the input instructions

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+261
+262
+263
+264
+265
+
+
# File 'lib/inferno/dsl/runnable.rb', line 261
+
+def input_instructions(new_input_instructions = nil)
+  return @input_instructions if new_input_instructions.nil?
+
+  @input_instructions = format_markdown(new_input_instructions)
+end
+
+
+ +
+

+ + #optional(optional = true) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Mark as optional. Tests are required by default.

+ + +
+
+
+

Parameters:

+
    + +
  • + + optional + + + (Boolean) + + + (defaults to: true) + + +
  • + +
+ + +
+ + + + +
+
+
+
+271
+272
+273
+
+
# File 'lib/inferno/dsl/runnable.rb', line 271
+
+def optional(optional = true) # rubocop:disable Style/OptionalBooleanParameter
+  @optional = optional
+end
+
+
+ +
+

+ + #optional?Boolean + + + + + +

+
+

The test or group is optional if true

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+289
+290
+291
+
+
# File 'lib/inferno/dsl/runnable.rb', line 289
+
+def optional?
+  !!@optional
+end
+
+
+ +
+

+ + #required(required = true) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Mark as required

+ +

Tests are required by default. This method is provided to make an +existing optional test required.

+ + +
+
+
+

Parameters:

+
    + +
  • + + required + + + (Boolean) + + + (defaults to: true) + + +
  • + +
+ + +
+ + + + +
+
+
+
+282
+283
+284
+
+
# File 'lib/inferno/dsl/runnable.rb', line 282
+
+def required(required = true) # rubocop:disable Style/OptionalBooleanParameter
+  @optional = !required
+end
+
+
+ +
+

+ + #required?Boolean + + + + + +

+
+

The test or group is required if true

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+296
+297
+298
+
+
# File 'lib/inferno/dsl/runnable.rb', line 296
+
+def required?
+  !optional?
+end
+
+
+ +
+

+ + #required_suite_options(suite_option_requirements) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Set/get suite options required for this runnable to be executed.

+ + +
+
+
+ +
+

Examples:

+ + +
suite_option :ig_version,
+            list_options: [
+              {
+                label: 'IG v1',
+                value: 'ig_v1'
+              },
+              {
+                label: 'IG v2',
+                value: 'ig_v2'
+              }
+            ]
+
+group from: :ig_v1_group,
+      required_suite_options: { ig_version: 'ig_v1' }
+
+group from: :ig_v2_group do
+  required_suite_options ig_version: 'ig_v2'
+end
+ +
+

Parameters:

+
    + +
  • + + suite_option_requirements + + + (Hash) + + + +
  • + +
+ + +
+ + + + +
+
+
+
+419
+420
+421
+422
+423
+424
+
+
# File 'lib/inferno/dsl/runnable.rb', line 419
+
+def required_suite_options(suite_option_requirements)
+  @suite_option_requirements =
+    suite_option_requirements.map do |key, value|
+      DSL::SuiteOption.new(id: key, value:)
+    end
+end
+
+
+ +
+

+ + #resume_test_route(method, path) { ... } ⇒ void + + + + + +

+
+

This method returns an undefined value.

Create a route which will resume a test run when a request is received

+ + +
+
+
+ +
+

Examples:

+ + +
resume_test_route :get, '/launch' do
+  request.query_parameters['iss']
+end
+
+test do
+  input :issuer
+  receives_request :launch
+
+  run do
+    wait(
+      identifier: issuer,
+      message: "Wating to receive a request with an issuer of #{issuer}"
+    )
+  end
+end
+ +
+

Parameters:

+
    + +
  • + + method + + + (Symbol) + + + + — +

    the HTTP request type (:get, :post, etc.) for the +incoming request

    +
    + +
  • + +
  • + + path + + + (String) + + + + — +

    the path for this request. The route will be served +with a prefix of /custom/TEST_SUITE_ID to prevent path conflicts. +Any of the path options available in Hanami +Router +can be used here.

    +
    + +
  • + +
+ +

Yields:

+
    + +
  • + + + + + + + +

    This method takes a block which must return the identifier +defined when a test was set to wait for the test run that hit this +route. The block has access to the request method which returns a +Entities::Request object with the information for the +incoming request.

    +
    + +
  • + +
+ +

See Also:

+ + +
+ + + + +
+
+
+
+350
+351
+352
+353
+354
+355
+356
+
+
# File 'lib/inferno/dsl/runnable.rb', line 350
+
+def resume_test_route(method, path, &block)
+  route_class = Class.new(ResumeTestRoute) do |klass|
+    klass.singleton_class.instance_variable_set(:@test_run_identifier_block, block)
+  end
+
+  route(method, path, route_class)
+end
+
+
+ +
+

+ + #route(method, path, handler) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Create a route to handle a request

+ + +
+
+
+

Parameters:

+
    + +
  • + + method + + + (Symbol) + + + + — +

    the HTTP request type (:get, :post, etc.) for the +incoming request. :all will accept all HTTP request types.

    +
    + +
  • + +
  • + + path + + + (String) + + + + — +

    the path for this request. The route will be served +with a prefix of /custom/TEST_SUITE_ID to prevent path conflicts. +Any of the path options available in Hanami +Router +can be used here.

    +
    + +
  • + +
  • + + handler + + + (#call) + + + + — +

    the route handler. This can be any Rack +compatible object (e.g. a Proc object, a Sinatra +app) as described in the Hanami Router +documentation.

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+372
+373
+374
+
+
# File 'lib/inferno/dsl/runnable.rb', line 372
+
+def route(method, path, handler)
+  Inferno.routes << { method:, path:, handler:, suite: }
+end
+
+
+ +
+

+ + #short_description(new_short_description = nil) ⇒ String + + + + + +

+
+

Set/Get a runnable’s short one-sentence description

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_short_description + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the one-sentence description

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+251
+252
+253
+254
+255
+
+
# File 'lib/inferno/dsl/runnable.rb', line 251
+
+def short_description(new_short_description = nil)
+  return @short_description if new_short_description.nil?
+
+  @short_description = format_markdown(new_short_description)
+end
+
+
+ +
+

+ + #short_title(new_short_title = nil) ⇒ String + + + + + +

+
+

Set/Get a runnable’s short title

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_short_title + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the short title

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+231
+232
+233
+234
+235
+
+
# File 'lib/inferno/dsl/runnable.rb', line 231
+
+def short_title(new_short_title = nil)
+  return @short_title if new_short_title.nil?
+
+  @short_title = new_short_title
+end
+
+
+ +
+

+ + #title(new_title = nil) ⇒ String + + + + + +

+
+

Set/Get a runnable’s title

+ + +
+
+
+

Parameters:

+
    + +
  • + + new_title + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the title

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+221
+222
+223
+224
+225
+
+
# File 'lib/inferno/dsl/runnable.rb', line 221
+
+def title(new_title = nil)
+  return @title if new_title.nil?
+
+  @title = new_title
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/DSL/SuiteOption.html b/docs/docs/Inferno/DSL/SuiteOption.html new file mode 100644 index 0000000000..88a007b969 --- /dev/null +++ b/docs/docs/Inferno/DSL/SuiteOption.html @@ -0,0 +1,448 @@ + + + + + + + Class: Inferno::DSL::SuiteOption + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::DSL::SuiteOption + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/dsl/suite_option.rb
+
+ +
+ +

Overview

+
+

This class is used to represent TestSuite-level options which are selected +by the user, and can affect which tests/groups are displayed and run as +well as the behavior of those tests.

+ + +
+
+
+ + +

See Also:

+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id,
+  :title,
+  :description,
+  :list_options,
+  :value
+].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + + + + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #descriptionObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/suite_option.rb', line 21
+
+
+
+
+ + + +
+

+ + #idObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/suite_option.rb', line 21
+
+
+
+
+ + + +
+

+ + #list_optionsObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/suite_option.rb', line 21
+
+
+
+
+ + + +
+

+ + #titleObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/suite_option.rb', line 21
+
+
+
+
+ + + +
+

+ + #valueObject + + + + + +

+ + + + +
+
+
+
+
+
+
# File 'lib/inferno/dsl/suite_option.rb', line 21
+
+
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities.html b/docs/docs/Inferno/Entities.html new file mode 100644 index 0000000000..2802e102b1 --- /dev/null +++ b/docs/docs/Inferno/Entities.html @@ -0,0 +1,130 @@ + + + + + + + Module: Inferno::Entities + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Entities + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities.rb,
+ lib/inferno/entities/test.rb,
lib/inferno/entities/input.rb,
lib/inferno/entities/entity.rb,
lib/inferno/entities/header.rb,
lib/inferno/entities/preset.rb,
lib/inferno/entities/result.rb,
lib/inferno/entities/message.rb,
lib/inferno/entities/request.rb,
lib/inferno/entities/test_run.rb,
lib/inferno/entities/attributes.rb,
lib/inferno/entities/test_group.rb,
lib/inferno/entities/test_suite.rb,
lib/inferno/entities/has_runnable.rb,
lib/inferno/entities/session_data.rb,
lib/inferno/entities/test_session.rb
+
+
+ +
+ +

Overview

+
+

Entities are domain objects whose identity is based on an id. Entities +don’t know anything about persistence, which is handled by Repositories.

+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + Modules: HasRunnable + + + + Classes: Entity, Header, Input, Message, Preset, Request, Result, SessionData, Test, TestGroup, TestRun, TestSession, TestSuite + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Entity.html b/docs/docs/Inferno/Entities/Entity.html new file mode 100644 index 0000000000..12a746bd62 --- /dev/null +++ b/docs/docs/Inferno/Entities/Entity.html @@ -0,0 +1,268 @@ + + + + + + + Class: Inferno::Entities::Entity + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Entity + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/entity.rb
+
+ +
+ +
+

Direct Known Subclasses

+

Header, Message, Preset, Request, Result, SessionData, TestRun, TestSession

+
+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(params, attributes) ⇒ Entity + + + + + +

+
+

Returns a new instance of Entity.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+4
+5
+6
+
+
# File 'lib/inferno/entities/entity.rb', line 4
+
+def initialize(params, attributes)
+  attributes.each { |name| instance_variable_set("@#{name}", params[name]) }
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #to_hashObject + + + + + +

+ + + + +
+
+
+
+8
+9
+10
+11
+12
+
+
# File 'lib/inferno/entities/entity.rb', line 8
+
+def to_hash
+  self.class::ATTRIBUTES.each_with_object({}) do |attribute, hash|
+    hash[attribute] = send(attribute)
+  end.compact
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/HasRunnable.html b/docs/docs/Inferno/Entities/HasRunnable.html new file mode 100644 index 0000000000..cb2f25ea0f --- /dev/null +++ b/docs/docs/Inferno/Entities/HasRunnable.html @@ -0,0 +1,207 @@ + + + + + + + Module: Inferno::Entities::HasRunnable + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Entities::HasRunnable + + + +

+
+ + + + + + + + + +
+
Included in:
+
Preset, Result, TestRun
+
+ + + +
+
Defined in:
+
lib/inferno/entities/has_runnable.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #runnableInferno::Entities::Test, ... + + + + + +

+
+

Returns the Test, TestGroup, or TestSuite associated with this entity

+ + +
+
+ + + + + +
+
+
+
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/entities/has_runnable.rb', line 7
+
+def runnable
+  return @runnable if @runnable
+
+  @runnable = (test || test_group || test_suite || load_runnable)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Header.html b/docs/docs/Inferno/Entities/Header.html new file mode 100644 index 0000000000..b45744f003 --- /dev/null +++ b/docs/docs/Inferno/Entities/Header.html @@ -0,0 +1,1139 @@ + + + + + + + Class: Inferno::Entities::Header + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Header + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/header.rb
+
+ +
+ +

Overview

+
+

A Header represents an HTTP request/response header

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[:id, :request_id, :name, :type, :value].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + +
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ Header + + + + + +

+
+

Returns a new instance of Header.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+20
+21
+22
+
+
# File 'lib/inferno/entities/header.rb', line 20
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the header.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the header

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/entities/header.rb', line 15
+
+class Header < Entity
+  ATTRIBUTES = [:id, :request_id, :name, :type, :value].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def request?
+    type == 'request'
+  end
+
+  def response?
+    type == 'response'
+  end
+
+  def to_hash
+    {
+      id:,
+      request_id:,
+      type:,
+      name:,
+      value:
+    }.compact
+  end
+end
+
+
+ + + +
+

+ + #nameString + + + + + +

+
+

Returns header name.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    header name

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/entities/header.rb', line 15
+
+class Header < Entity
+  ATTRIBUTES = [:id, :request_id, :name, :type, :value].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def request?
+    type == 'request'
+  end
+
+  def response?
+    type == 'response'
+  end
+
+  def to_hash
+    {
+      id:,
+      request_id:,
+      type:,
+      name:,
+      value:
+    }.compact
+  end
+end
+
+
+ + + +
+

+ + #request_idString + + + + + +

+
+

Returns index of the HTTP request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    index of the HTTP request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/entities/header.rb', line 15
+
+class Header < Entity
+  ATTRIBUTES = [:id, :request_id, :name, :type, :value].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def request?
+    type == 'request'
+  end
+
+  def response?
+    type == 'response'
+  end
+
+  def to_hash
+    {
+      id:,
+      request_id:,
+      type:,
+      name:,
+      value:
+    }.compact
+  end
+end
+
+
+ + + +
+

+ + #typeString + + + + + +

+
+

Returns request/response.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    request/response

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/entities/header.rb', line 15
+
+class Header < Entity
+  ATTRIBUTES = [:id, :request_id, :name, :type, :value].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def request?
+    type == 'request'
+  end
+
+  def response?
+    type == 'response'
+  end
+
+  def to_hash
+    {
+      id:,
+      request_id:,
+      type:,
+      name:,
+      value:
+    }.compact
+  end
+end
+
+
+ + + +
+

+ + #valueString + + + + + +

+
+

Returns header value.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    header value

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/inferno/entities/header.rb', line 15
+
+class Header < Entity
+  ATTRIBUTES = [:id, :request_id, :name, :type, :value].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def request?
+    type == 'request'
+  end
+
+  def response?
+    type == 'response'
+  end
+
+  def to_hash
+    {
+      id:,
+      request_id:,
+      type:,
+      name:,
+      value:
+    }.compact
+  end
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #request?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+
+
# File 'lib/inferno/entities/header.rb', line 24
+
+def request?
+  type == 'request'
+end
+
+
+ +
+

+ + #response?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+28
+29
+30
+
+
# File 'lib/inferno/entities/header.rb', line 28
+
+def response?
+  type == 'response'
+end
+
+
+ +
+

+ + #to_hashObject + + + + + +

+ + + + +
+
+
+
+32
+33
+34
+35
+36
+37
+38
+39
+40
+
+
# File 'lib/inferno/entities/header.rb', line 32
+
+def to_hash
+  {
+    id:,
+    request_id:,
+    type:,
+    name:,
+    value:
+  }.compact
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Input.html b/docs/docs/Inferno/Entities/Input.html new file mode 100644 index 0000000000..2e2963493c --- /dev/null +++ b/docs/docs/Inferno/Entities/Input.html @@ -0,0 +1,461 @@ + + + + + + + Class: Inferno::Entities::Input + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Input + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/input.rb
+
+ +
+ +

Overview

+
+

This class represents an Input for a runnable.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :name,
+  :title,
+  :description,
+  :type,
+  :default,
+  :optional,
+  :options,
+  :locked,
+  :value
+].freeze
+ +
UNINHERITABLE_ATTRIBUTES = +
+
+

These attributes require special handling when merging input +definitions.

+ + +
+
+
+ + +
+
+
[
+  # Locking an input only has meaning at the level it is locked.
+  # Consider:
+  # - ParentGroup
+  #   - Group 1, input :a
+  #   - Group 2, input :a, locked: true
+  # The input 'a' should be only be locked when running Group 2 in
+  # isolation. It should not be locked when running Group 1 or the
+  # ParentGroup.
+  :locked,
+  # Input type is sometimes only a UI concern (e.g. text vs. textarea), so
+  # it is common to not redeclare the type everywhere it's used and needs
+  # special handling to avoid clobbering the type with the default (text)
+  # type.
+  :type
+].freeze
+ +
INHERITABLE_ATTRIBUTES = +
+
+

These are the attributes that can be directly copied when merging a +runnable’s input with the input of one of its children.

+ + +
+
+
+ + +
+
+
(ATTRIBUTES - UNINHERITABLE_ATTRIBUTES).freeze
+ +
MERGEABLE_ATTRIBUTES = +
+
+

These are the attributes that can be directly copied when merging a +runnable’s input with an input configuration.

+ + +
+
+
+ + +
+
+
(ATTRIBUTES - [:type]).freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + +
+

Constructor Details

+ +
+

+ + #initialize(**params) ⇒ Input + + + + + +

+
+

Returns a new instance of Input.

+ + +
+
+
+ +

Raises:

+ + +
+ + + + +
+
+
+
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+
+
# File 'lib/inferno/entities/input.rb', line 48
+
+def initialize(**params)
+  bad_params = params.keys - ATTRIBUTES
+
+  raise Exceptions::UnknownAttributeException.new(bad_params, self.class) if bad_params.present?
+
+  params
+    .compact
+    .each { |key, value| send("#{key}=", value) }
+
+  self.name = name.to_s if params[:name].present?
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #==(other) ⇒ Object + + + + + +

+ + + + +
+
+
+
+115
+116
+117
+118
+119
+
+
# File 'lib/inferno/entities/input.rb', line 115
+
+def ==(other)
+  return false unless other.is_a? Input
+
+  ATTRIBUTES.all? { |attribute| send(attribute) == other.send(attribute) }
+end
+
+
+ +
+

+ + #to_hashObject + + + + + +

+ + + + +
+
+
+
+106
+107
+108
+109
+110
+111
+112
+113
+
+
# File 'lib/inferno/entities/input.rb', line 106
+
+def to_hash
+  ATTRIBUTES.each_with_object({}) do |attribute, hash|
+    value = send(attribute)
+    next if value.nil?
+
+    hash[attribute] = value
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Message.html b/docs/docs/Inferno/Entities/Message.html new file mode 100644 index 0000000000..b415ea477b --- /dev/null +++ b/docs/docs/Inferno/Entities/Message.html @@ -0,0 +1,839 @@ + + + + + + + Class: Inferno::Entities::Message + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Message + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/message.rb
+
+ +
+ +

Overview

+
+

A Message represents a message generated during a test.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[:id, :index, :message, :result_id, :result, :type].freeze
+ +
TYPES = + +
+
['error', 'warning', 'info'].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + + + + +

Methods inherited from Entity

+

#to_hash

+
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ Message + + + + + +

+
+

Returns a new instance of Message.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+23
+24
+25
+
+
# File 'lib/inferno/entities/message.rb', line 23
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the message.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the message

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ + + +
+

+ + #indexString + + + + + +

+
+

Returns index of the message. Used for ordering.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    index of the message. Used for ordering.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ + + +
+

+ + #messageString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ + + +
+

+ + #resultInferno::Entities::Result + + + + + +

+
+ + + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ + + +
+

+ + #result_idString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ + + +
+

+ + #typeString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/entities/message.rb', line 17
+
+class Message < Entity
+  ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
+  TYPES = ['error', 'warning', 'info'].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Preset.html b/docs/docs/Inferno/Entities/Preset.html new file mode 100644 index 0000000000..bcbd9ee739 --- /dev/null +++ b/docs/docs/Inferno/Entities/Preset.html @@ -0,0 +1,267 @@ + + + + + + + Class: Inferno::Entities::Preset + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Preset + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
HasRunnable
+
+ + + + + + +
+
Defined in:
+
lib/inferno/entities/preset.rb
+
+ +
+ +

Overview

+
+

A Preset represents a set of input values for a runnable.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id,
+  :test_suite_id,
+  :inputs,
+  :title
+].freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from HasRunnable

+

#runnable

+ + + + + + + + + + + + + + + +

Methods inherited from Entity

+

#to_hash

+
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ Preset + + + + + +

+
+

Returns a new instance of Preset.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/inferno/entities/preset.rb', line 19
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Request.html b/docs/docs/Inferno/Entities/Request.html new file mode 100644 index 0000000000..dd8caad889 --- /dev/null +++ b/docs/docs/Inferno/Entities/Request.html @@ -0,0 +1,6962 @@ + + + + + + + Class: Inferno::Entities::Request + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Request + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/request.rb
+
+ +
+ +

Overview

+
+

A Request represents a request and response issued during a test.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id, :index, :verb, :url, :direction, :name, :status,
+  :request_body, :response_body, :result_id, :test_session_id, :created_at,
+  :updated_at, :headers
+].freeze
+ +
SUMMARY_FIELDS = + +
+
[
+  :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #created_atTime + + + + + +

+
+

Returns creation timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    creation timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #directionString + + + + + +

+
+

Returns incoming/outgoing.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    incoming/outgoing

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #headersArray<Inferno::Entities::Header> + + + + + +

+
+

Returns http request/response headers.

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #indexString + + + + + +

+
+

Returns index of the request. Used for ordering.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    index of the request. Used for ordering.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #nameString + + + + + +

+
+

Returns name for the request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    name for the request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #request_bodyString + + + + + +

+
+

Returns body of the http request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    body of the http request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #response_bodyString + + + + + +

+
+

Returns body of the http response.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    body of the http response

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #result_idString + + + + + +

+
+

Returns id of the result for this request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the result for this request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #statusString + + + + + +

+
+

Returns http response status code.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    http response status code

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #test_session_idString + + + + + +

+
+

Returns id of the test session for this request.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the test session for this request

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #updated_atTime + + + + + +

+
+

Returns update timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    update timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #urlString + + + + + +

+
+

Returns request url.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    request url

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ + + +
+

+ + #verbString + + + + + +

+
+

Returns http verb.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    http verb

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+33
+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
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/inferno/entities/request.rb', line 33
+
+class Request < Entity
+  ATTRIBUTES = [
+    :id, :index, :verb, :url, :direction, :name, :status,
+    :request_body, :response_body, :result_id, :test_session_id, :created_at,
+    :updated_at, :headers
+  ].freeze
+  SUMMARY_FIELDS = [
+    :id, :index, :url, :verb, :direction, :name, :status, :result_id, :created_at, :updated_at
+  ].freeze
+
+  include Attributes
+
+  # @private
+  def initialize(params)
+    super(params, ATTRIBUTES - [:headers, :name])
+
+    @name = params[:name]&.to_sym
+    @headers = params[:headers]&.map { |header| header.is_a?(Hash) ? Header.new(header) : header } || []
+  end
+
+  # @return [Hash<String, String>]
+  def query_parameters
+    Addressable::URI.parse(url).query_values || {}
+  end
+
+  # Find a response header
+  #
+  # @param name [String] the header name
+  # @return [Inferno::Entities::Header, nil]
+  def response_header(name)
+    response_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # Find a request header
+  #
+  # @param name [String] the header name.
+  # @return [Inferno::Entities::Header, nil]
+  def request_header(name)
+    request_headers.find { |header| header.name.casecmp(name).zero? }
+  end
+
+  # All of the request headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def request_headers
+    headers.select(&:request?)
+  end
+
+  # All of the response headers
+  #
+  # @return [Array<Inferno::Entities::Header>]
+  def response_headers
+    headers.select(&:response?)
+  end
+
+  # Return a hash of the request parameters
+  #
+  # @return [Hash] A Hash with `:verb`, `:url`, `:headers`, and `:body`
+  #   fields
+  def request
+    {
+      verb:,
+      url:,
+      headers: request_headers,
+      body: request_body
+    }
+  end
+
+  # Return a hash of the response parameters
+  #
+  # @return [Hash] A Hash with `:status`, `:headers`, and `:body` fields
+  def response
+    {
+      status:,
+      headers: response_headers,
+      body: response_body
+    }
+  end
+
+  # @private
+  def to_hash
+    {
+      id:,
+      verb:,
+      url:,
+      direction:,
+      status:,
+      name:,
+      request_body:,
+      response_body:,
+      result_id:,
+      test_session_id:,
+      request_headers: request_headers.map(&:to_hash),
+      response_headers: response_headers.map(&:to_hash),
+      created_at:,
+      updated_at:
+    }.compact
+  end
+
+  # Return the FHIR resource from the response body.
+  #
+  # @return [FHIR::Model, nil]
+  def resource
+    FHIR.from_contents(response_body)
+  end
+
+  class << self
+    # @private
+    def from_hanami_request(request, name: nil)
+      url = "#{request.base_url}#{request.path}"
+      url += "?#{request.query_string}" if request.query_string.present?
+      request_headers =
+        request.params.env
+          .select { |key, _| key.start_with? 'HTTP_' }
+          .transform_keys { |key| key.delete_prefix('HTTP_').tr('_', '-').downcase }
+          .map { |header_name, value| Header.new(name: header_name, value:, type: 'request') }
+
+      new(
+        verb: request.request_method.downcase,
+        url:,
+        direction: 'incoming',
+        name:,
+        request_body: request.body.string,
+        headers: request_headers
+      )
+    end
+
+    # @private
+    def from_http_response(response, test_session_id:, direction: 'outgoing', name: nil)
+      request_headers =
+        response.env.request_headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers =
+        response.headers
+          .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+
+      new(
+        verb: response.env.method,
+        url: response.env.url.to_s,
+        direction:,
+        name:,
+        status: response.status,
+        request_body: response.env.request_body,
+        response_body: response.body,
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+
+    # @private
+    def from_fhir_client_reply(reply, test_session_id:, direction: 'outgoing', name: nil)
+      request = reply.request
+      response = reply.response
+      request_headers = request[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'request') }
+      response_headers = response[:headers]
+        .map { |header_name, value| Header.new(name: header_name.downcase, value:, type: 'response') }
+      request_body =
+        if request.dig(:headers, 'Content-Type')&.include?('application/x-www-form-urlencoded')
+          URI.encode_www_form(request[:payload])
+        else
+          request[:payload]
+        end
+
+      new(
+        verb: request[:method],
+        url: request[:url],
+        direction:,
+        name:,
+        status: response[:code].to_i,
+        request_body:,
+        response_body: response[:body],
+        test_session_id:,
+        headers: request_headers + response_headers
+      )
+    end
+  end
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #query_parametersHash<String, String> + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash<String, String>) + + + +
  • + +
+ +
+ + + + +
+
+
+
+54
+55
+56
+
+
# File 'lib/inferno/entities/request.rb', line 54
+
+def query_parameters
+  Addressable::URI.parse(url).query_values || {}
+end
+
+
+ +
+

+ + #requestHash + + + + + +

+
+

Return a hash of the request parameters

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + + — +

    A Hash with :verb, :url, :headers, and :body +fields

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+92
+93
+94
+95
+96
+97
+98
+99
+
+
# File 'lib/inferno/entities/request.rb', line 92
+
+def request
+  {
+    verb:,
+    url:,
+    headers: request_headers,
+    body: request_body
+  }
+end
+
+
+ +
+

+ + #request_header(name) ⇒ Inferno::Entities::Header? + + + + + +

+
+

Find a request header

+ + +
+
+
+

Parameters:

+
    + +
  • + + name + + + (String) + + + + — +

    the header name.

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+70
+71
+72
+
+
# File 'lib/inferno/entities/request.rb', line 70
+
+def request_header(name)
+  request_headers.find { |header| header.name.casecmp(name).zero? }
+end
+
+
+ +
+

+ + #request_headersArray<Inferno::Entities::Header> + + + + + +

+
+

All of the request headers

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+77
+78
+79
+
+
# File 'lib/inferno/entities/request.rb', line 77
+
+def request_headers
+  headers.select(&:request?)
+end
+
+
+ +
+

+ + #resourceFHIR::Model? + + + + + +

+
+

Return the FHIR resource from the response body.

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+135
+136
+137
+
+
# File 'lib/inferno/entities/request.rb', line 135
+
+def resource
+  FHIR.from_contents(response_body)
+end
+
+
+ +
+

+ + #responseHash + + + + + +

+
+

Return a hash of the response parameters

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + + — +

    A Hash with :status, :headers, and :body fields

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+104
+105
+106
+107
+108
+109
+110
+
+
# File 'lib/inferno/entities/request.rb', line 104
+
+def response
+  {
+    status:,
+    headers: response_headers,
+    body: response_body
+  }
+end
+
+
+ +
+

+ + #response_header(name) ⇒ Inferno::Entities::Header? + + + + + +

+
+

Find a response header

+ + +
+
+
+

Parameters:

+
    + +
  • + + name + + + (String) + + + + — +

    the header name

    +
    + +
  • + +
+ +

Returns:

+ + +
+ + + + +
+
+
+
+62
+63
+64
+
+
# File 'lib/inferno/entities/request.rb', line 62
+
+def response_header(name)
+  response_headers.find { |header| header.name.casecmp(name).zero? }
+end
+
+
+ +
+

+ + #response_headersArray<Inferno::Entities::Header> + + + + + +

+
+

All of the response headers

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+84
+85
+86
+
+
# File 'lib/inferno/entities/request.rb', line 84
+
+def response_headers
+  headers.select(&:response?)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Result.html b/docs/docs/Inferno/Entities/Result.html new file mode 100644 index 0000000000..46b6c9ba52 --- /dev/null +++ b/docs/docs/Inferno/Entities/Result.html @@ -0,0 +1,2954 @@ + + + + + + + Class: Inferno::Entities::Result + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Result + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
HasRunnable
+
+ + + + + + +
+
Defined in:
+
lib/inferno/entities/result.rb
+
+ +
+ +

Overview

+
+

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

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+  :test_group, :test_suite_id, :test_suite, :test_run_id,
+  :test_session_id, :result, :result_message, :messages, :requests,
+  :input_json, :output_json
+].freeze
+ +
RESULT_OPTIONS = + +
+
['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from HasRunnable

+

#runnable

+ + + + + + + + + + + + + + + +

Methods inherited from Entity

+

#to_hash

+
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ Result + + + + + +

+
+

Returns a new instance of Result.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+55
+56
+57
+58
+59
+60
+
+
# File 'lib/inferno/entities/result.rb', line 55
+
+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
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #created_atTime + + + + + +

+
+

Returns creation timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    creation timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the session.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the session

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #input_jsonString + + + + + +

+
+

Returns JSON string of the inputs used for this result.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    JSON string of the inputs used for this result

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #messagesArray<Inferno::Entities::Message> + + + + + +

+
+

result

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #output_jsonString + + + + + +

+
+

Returns JSON string of the outputs created by this result.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    JSON string of the outputs created by this result

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #requestsArray<Inferno::Entities::Request> + + + + + +

+
+

associated with this result

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #resultString + + + + + +

+
+

running, wait, cancel)

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the result (pass, fail, skip, omit, error,

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #result_messageString + + + + + +

+
+

Returns summary message for this result.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    summary message for this result

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #testTest? + + + + + +

+
+

Returns the Test this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Test, nil) + + + + — +

    the Test this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_groupTestGroup? + + + + + +

+
+

Returns the TestGroup this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (TestGroup, nil) + + + + — +

    the TestGroup this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  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

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_idString? + + + + + +

+
+

Returns id of the Test this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + + — +

    id of the Test this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_run_idString + + + + + +

+
+

Returns the TestRun this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the TestRun this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_session_idString + + + + + +

+
+

Returns the TestSession this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    the TestSession this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #test_suiteTestSuite? + + + + + +

+
+

Returns the TestSuite this result belongs to.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (TestSuite, nil) + + + + — +

    the TestSuite this result belongs to

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  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

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ + + +
+

+ + #updated_atTime + + + + + +

+
+

Returns update timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    update timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+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/result.rb', line 43
+
+class Result < Entity
+  ATTRIBUTES = [
+    :id, :created_at, :updated_at, :test_id, :test, :test_group_id,
+    :test_group, :test_suite_id, :test_suite, :test_run_id,
+    :test_session_id, :result, :result_message, :messages, :requests,
+    :input_json, :output_json
+  ].freeze
+  RESULT_OPTIONS = ['cancel', 'wait', 'running', 'error', 'fail', 'skip', 'pass', 'omit'].freeze
+
+  include Inferno::Entities::Attributes
+  include Inferno::Entities::HasRunnable
+
+  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
+
+  def optional?
+    runnable.nil? || runnable.optional?
+  end
+
+  def required?
+    !optional?
+  end
+
+  # @return [Boolean]
+  def waiting?
+    result == 'wait'
+  end
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #optional?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+62
+63
+64
+
+
# File 'lib/inferno/entities/result.rb', line 62
+
+def optional?
+  runnable.nil? || runnable.optional?
+end
+
+
+ +
+

+ + #required?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+66
+67
+68
+
+
# File 'lib/inferno/entities/result.rb', line 66
+
+def required?
+  !optional?
+end
+
+
+ +
+

+ + #waiting?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+71
+72
+73
+
+
# File 'lib/inferno/entities/result.rb', line 71
+
+def waiting?
+  result == 'wait'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/SessionData.html b/docs/docs/Inferno/Entities/SessionData.html new file mode 100644 index 0000000000..0db15d58a3 --- /dev/null +++ b/docs/docs/Inferno/Entities/SessionData.html @@ -0,0 +1,1019 @@ + + + + + + + Class: Inferno::Entities::SessionData + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::SessionData + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/session_data.rb
+
+ +
+ +

Overview

+
+

SessionData represents a piece of saved state for a TestSession. +These are used to store test inputs and outputs.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + +
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ SessionData + + + + + +

+
+

Returns a new instance of SessionData.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+23
+24
+25
+
+
# File 'lib/inferno/entities/session_data.rb', line 23
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #created_atTime + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the test input.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the test input

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ + + +
+

+ + #nameString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ + + +
+

+ + #test_session_idString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ + + +
+

+ + #updated_atTime + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ + + +
+

+ + #valueString + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/entities/session_data.rb', line 18
+
+class SessionData < Entity
+  ATTRIBUTES = [:id, :name, :value, :test_session_id, :created_at, :updated_at].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+  end
+
+  def to_hash
+    {
+      id:,
+      name:,
+      value:,
+      test_session_id:,
+      created_at:,
+      updated_at:
+    }
+  end
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #to_hashObject + + + + + +

+ + + + +
+
+
+
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+
+
# File 'lib/inferno/entities/session_data.rb', line 27
+
+def to_hash
+  {
+    id:,
+    name:,
+    value:,
+    test_session_id:,
+    created_at:,
+    updated_at:
+  }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/Test.html b/docs/docs/Inferno/Entities/Test.html new file mode 100644 index 0000000000..1ab856f6b3 --- /dev/null +++ b/docs/docs/Inferno/Entities/Test.html @@ -0,0 +1,1389 @@ + + + + + + + Class: Inferno::Entities::Test + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::Test + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + +
+
Extended by:
+
Forwardable
+
+ + + +
+
Includes:
+
DSL
+
+ + + + + + +
+
Defined in:
+
lib/inferno/entities/test.rb
+
+ +
+ + + + +

Constant Summary

+ +

Constants included + from DSL

+

DSL::EXTENDABLE_DSL_MODULES, DSL::INCLUDABLE_DSL_MODULES

+ + +

Instance Attribute Summary collapse

+
    + +
  • + + + #result_message ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute result_message.

    +
    + +
  • + + +
  • + + + #scratch ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute scratch.

    +
    + +
  • + + +
  • + + + #suite_options ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute suite_options.

    +
    + +
  • + + +
  • + + + #test_session_id ⇒ Object + + + + + + + + + readonly + + + + + + + + + +

    Returns the value of attribute test_session_id.

    +
    + +
  • + + +
+ + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + + +
+

Dynamic Method Handling

+

+ This class handles dynamic methods through the method_missing method + +

+ +
+

+ + #method_missing(name, *args) ⇒ Object + + + + + +

+ + + + +
+
+
+
+111
+112
+113
+114
+115
+116
+117
+118
+
+
# File 'lib/inferno/entities/test.rb', line 111
+
+def method_missing(name, *args, &)
+  parent_instance = self.class.parent&.new
+  if parent_instance.respond_to?(name)
+    parent_instance.send(name, *args, &)
+  else
+    super
+  end
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #result_messageObject + + + + + +

+
+

Returns the value of attribute result_message.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+15
+16
+17
+
+
# File 'lib/inferno/entities/test.rb', line 15
+
+def result_message
+  @result_message
+end
+
+
+ + + +
+

+ + #scratchObject (readonly) + + + + + +

+
+

Returns the value of attribute scratch.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+16
+17
+18
+
+
# File 'lib/inferno/entities/test.rb', line 16
+
+def scratch
+  @scratch
+end
+
+
+ + + +
+

+ + #suite_optionsObject (readonly) + + + + + +

+
+

Returns the value of attribute suite_options.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+16
+17
+18
+
+
# File 'lib/inferno/entities/test.rb', line 16
+
+def suite_options
+  @suite_options
+end
+
+
+ + + +
+

+ + #test_session_idObject (readonly) + + + + + +

+
+

Returns the value of attribute test_session_id.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+16
+17
+18
+
+
# File 'lib/inferno/entities/test.rb', line 16
+
+def test_session_id
+  @test_session_id
+end
+
+
+ +
+ + +
+

Class Method Details

+ + +
+

+ + .block(&block) ⇒ Proc + + + + Also known as: + run + + + + +

+
+

Set/Get the block that is executed when a Test is run

+ + +
+
+
+

Parameters:

+
    + +
  • + + block + + + (Proc) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Proc) + + + + — +

    the block that is executed when a Test is run

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+174
+175
+176
+177
+178
+
+
# File 'lib/inferno/entities/test.rb', line 174
+
+def block(&block)
+  return @block unless block_given?
+
+  @block = block
+end
+
+
+ +
+

+ + .input(name, *other_names, **input_params) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define inputs for this Test

+ + +
+
+
+ +
+

Examples:

+ + +
input :patientid, title: 'Patient ID', description: 'The ID of the patient being searched for'
+ + +
input :textarea, title: 'Textarea Input Example', type: 'textarea'
+ +
+

Parameters:

+
    + +
  • + + name + + + (Symbol) + + + + — +

    name of the input

    +
    + +
  • + +
  • + + other_names + + + (Symbol) + + + + — +

    array of symbols if specifying multiple inputs

    +
    + +
  • + +
  • + + input_params + + + (Hash) + + + + — +

    options for input such as type, description, or title

    +
    + +
  • + +
+ + + + + + + + +

Options Hash (**input_params):

+
    + +
  • + :title + (String) + + + + + —

    Human readable title for input

    +
    + +
  • + +
  • + :description + (String) + + + + + —

    Description for the input

    +
    + +
  • + +
  • + :type + (String) + + + + + —
    + + + + + + +
    ‘text’‘textarea’
    +
    + +
  • + +
+ + + +
+ + + + +
+
+
+
+139
+140
+141
+142
+143
+144
+145
+146
+147
+
+
# File 'lib/inferno/entities/test.rb', line 139
+
+def input(name, *other_names, **input_params)
+  super
+
+  if other_names.present?
+    [name, *other_names].each { |input| attr_reader input }
+  else
+    attr_reader name
+  end
+end
+
+
+ +
+

+ + .output(*output_definitions, **_output_params) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define outputs for this Test

+ + +
+
+
+ +
+

Examples:

+ + +
output :patient_id, :bearer_token
+ +
+

Parameters:

+
    + +
  • + + output_definitions + + + (Symbol) + + + +
  • + +
  • + + _output_params + + + (Hash) + + + + — +

    Unused parameter. Just makes method +signature compatible with Inferno::DSL::InputOutputHandling.output

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+157
+158
+159
+160
+161
+162
+163
+
+
# File 'lib/inferno/entities/test.rb', line 157
+
+def output(*output_definitions, **_output_params)
+  super
+
+  output_definitions.each do |output|
+    attr_accessor output
+  end
+end
+
+
+ +
+

+ + .short_idObject + + + + + +

+ + + + +
+
+
+
+182
+183
+184
+185
+186
+187
+188
+
+
# File 'lib/inferno/entities/test.rb', line 182
+
+def short_id
+  @short_id ||= begin
+    prefix = parent.respond_to?(:short_id) ? "#{parent.short_id}." : ''
+    suffix = parent ? (parent.tests.find_index(self) + 1).to_s.rjust(2, '0') : 'x'
+    "#{prefix}#{suffix}"
+  end
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #add_message(type, message) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Add a message to the result.

+ + +
+
+
+

Parameters:

+
    + +
  • + + type + + + (String) + + + + — +

    error, warning, or info

    +
    + +
  • + +
  • + + message + + + (String) + + + +
  • + +
+ + +
+ + + + +
+
+
+
+36
+37
+38
+
+
# File 'lib/inferno/entities/test.rb', line 36
+
+def add_message(type, message)
+  messages << { type: type.to_s, message: format_markdown(message) }
+end
+
+
+ +
+

+ + #info(message = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Add an informational message to the results of a test. If passed a +block, a failed assertion will become an info message and test execution +will continue.

+ + +
+
+
+ +
+

Examples:

+ + +
# Add an info message
+info 'This message will be added to the test results'
+
+# The message for the failed assertion will be treated as an info
+# message. Test exection will continue.
+info { assert false == true }
+ +
+

Parameters:

+
    + +
  • + + message + + + (String) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+
+
# File 'lib/inferno/entities/test.rb', line 75
+
+def info(message = nil)
+  unless block_given?
+    add_message('info', message) unless message.nil?
+    return
+  end
+
+  yield
+rescue Exceptions::AssertionException => e
+  add_message('info', e.message)
+end
+
+
+ +
+

+ + #output(outputs) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Set output values. Once set, these values will be available to any +subsequent tests.

+ + +
+
+
+ +
+

Examples:

+ + +
output(patient_id: '5', bearer_token: 'ABC')
+ +
+

Parameters:

+
    + +
  • + + outputs + + + (Hash) + + + +
  • + +
+ + +
+ + + + +
+
+
+
+47
+48
+49
+50
+51
+52
+
+
# File 'lib/inferno/entities/test.rb', line 47
+
+def output(outputs)
+  outputs.each do |key, value|
+    send("#{key}=", value)
+    outputs_to_persist[key] = value
+  end
+end
+
+
+ +
+

+ + #warning(message = nil) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Add a warning message to the results of a test. If passed a block, a +failed assertion will become a warning message and test execution will +continue.

+ + +
+
+
+ +
+

Examples:

+ + +
# Add a warning message
+warning 'This message will be added to the test results'
+
+# The message for the failed assertion will be treated as a warning
+# message. Test exection will continue.
+warning { assert false == true }
+ +
+

Parameters:

+
    + +
  • + + message + + + (String) + + + (defaults to: nil) + + +
  • + +
+ + +
+ + + + +
+
+
+
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+
+
# File 'lib/inferno/entities/test.rb', line 99
+
+def warning(message = nil)
+  unless block_given?
+    add_message('warning', message) unless message.nil?
+    return
+  end
+
+  yield
+rescue Exceptions::AssertionException => e
+  add_message('warning', e.message)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/TestGroup.html b/docs/docs/Inferno/Entities/TestGroup.html new file mode 100644 index 0000000000..ac8ec28613 --- /dev/null +++ b/docs/docs/Inferno/Entities/TestGroup.html @@ -0,0 +1,813 @@ + + + + + + + Class: Inferno::Entities::TestGroup + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::TestGroup + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + +
+
Extended by:
+
Forwardable, DSL::FHIRClient::ClassMethods, DSL::HTTPClient::ClassMethods, DSL::Runnable
+
+ + + +
+
Includes:
+
DSL::FHIRValidation
+
+ + + + + + +
+
Defined in:
+
lib/inferno/entities/test_group.rb
+
+ +
+ + + + + + + +

Instance Attribute Summary

+ +

Attributes included from DSL::Runnable

+

#parent, #suite_option_requirements

+ + + +

+ Class Method Summary + collapse +

+ + + + + + + + + + + + + + +

Methods included from DSL::FHIRClient::ClassMethods

+

fhir_client

+ + + + + + + + + +

Methods included from DSL::HTTPClient::ClassMethods

+

http_client

+ + + + + + + + + +

Methods included from DSL::Runnable

+

description, id, input_instructions, optional, optional?, required, required?, required_suite_options, resume_test_route, route, short_description, short_title, title

+ + + + + + + + + + + + + + + +

Methods included from DSL::FHIRValidation

+

#find_validator, #resource_is_valid?

+
+

Dynamic Method Handling

+

+ This class handles dynamic methods through the method_missing method + +

+ +
+

+ + #method_missing(name, *args) ⇒ Object + + + + + +

+ + + + +
+
+
+
+16
+17
+18
+19
+20
+21
+22
+23
+
+
# File 'lib/inferno/entities/test_group.rb', line 16
+
+def method_missing(name, *args, &)
+  parent_instance = self.class.parent&.new
+  if parent_instance.respond_to?(name)
+    parent_instance.send(name, *args, &)
+  else
+    super
+  end
+end
+
+
+ +
+ + +
+

Class Method Details

+ + +
+

+ + .groupvoid + + + + + +

+
+

This method returns an undefined value.

Add a child group

+ + +
+
+
+ + +
+ + + + +
+
+
+
+58
+59
+60
+61
+
+
# File 'lib/inferno/entities/test_group.rb', line 58
+
+def group(...)
+  ()
+  define_child(...)
+end
+
+
+ +
+

+ + .groups(options = nil) ⇒ Array<Inferno::Entities::TestGroup> + + + + + +

+
+

Get this group’s child groups, filtered by suite options, if provided.

+ + +
+
+
+

Parameters:

+ + +

Returns:

+ + +
+ + + + +
+
+
+
+41
+42
+43
+
+
# File 'lib/inferno/entities/test_group.rb', line 41
+
+def groups(options = nil)
+  children(options).select { |child| child < Inferno::Entities::TestGroup }
+end
+
+
+ +
+

+ + .run_as_group(value = true) ⇒ void + + + + + +

+
+

This method returns an undefined value.

When true, this group’s children can not be run individually in the +UI, and this group must be run as a group.

+ + +
+
+
+

Parameters:

+
    + +
  • + + value + + + (Boolean) + + + (defaults to: true) + + +
  • + +
+ + +
+ + + + +
+
+
+
+115
+116
+117
+
+
# File 'lib/inferno/entities/test_group.rb', line 115
+
+def run_as_group(value = true) # rubocop:disable Style/OptionalBooleanParameter
+  @run_as_group = value
+end
+
+
+ +
+

+ + .run_as_group?Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+120
+121
+122
+
+
# File 'lib/inferno/entities/test_group.rb', line 120
+
+def run_as_group?
+  @run_as_group || false
+end
+
+
+ +
+

+ + .short_idString + + + + + +

+
+

Returns A short numeric id which is displayed in the UI.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    A short numeric id which is displayed in the UI

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+87
+88
+89
+90
+91
+92
+93
+
+
# File 'lib/inferno/entities/test_group.rb', line 87
+
+def short_id
+  @short_id ||= begin
+    prefix = parent.respond_to?(:short_id) ? "#{parent.short_id}." : ''
+    suffix = parent ? (parent.groups.find_index(self) + 1).to_s : 'X'
+    "#{prefix}#{suffix}"
+  end
+end
+
+
+ +
+

+ + .testvoid + + + + + +

+
+

This method returns an undefined value.

Add a test

+ + +
+
+
+ + +
+ + + + +
+
+
+
+65
+66
+67
+68
+
+
# File 'lib/inferno/entities/test_group.rb', line 65
+
+def test(...)
+  ()
+  define_child(...)
+end
+
+
+ +
+

+ + .tests(options = nil) ⇒ Array<Inferno::Entities::Test> + + + + + +

+
+

Get this group’s child tests, filtered by suite options, if provided.

+ + +
+
+
+

Parameters:

+ + +

Returns:

+ + +
+ + + + +
+
+
+
+50
+51
+52
+
+
# File 'lib/inferno/entities/test_group.rb', line 50
+
+def tests(options = nil)
+  children(options).select { |child| child < Inferno::Entities::Test }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/TestRun.html b/docs/docs/Inferno/Entities/TestRun.html new file mode 100644 index 0000000000..a14ec8aacb --- /dev/null +++ b/docs/docs/Inferno/Entities/TestRun.html @@ -0,0 +1,2854 @@ + + + + + + + Class: Inferno::Entities::TestRun + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::TestRun + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
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

+ + + + + + + + + + + + +
+

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
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/TestSession.html b/docs/docs/Inferno/Entities/TestSession.html new file mode 100644 index 0000000000..f607a9d266 --- /dev/null +++ b/docs/docs/Inferno/Entities/TestSession.html @@ -0,0 +1,1772 @@ + + + + + + + Class: Inferno::Entities::TestSession + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::TestSession + + + +

+
+ +
+
Inherits:
+
+ Entity + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/entities/test_session.rb
+
+ +
+ +

Overview

+
+

A TestSession represents an individual testing session.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
ATTRIBUTES = + +
+
[
+  :id,
+  :created_at,
+  :updated_at,
+  :test_suite_id,
+  :test_suite,
+  :test_runs,
+  :results,
+  :suite_options
+].freeze
+ +
+ + + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + + + + +
+

Constructor Details

+ +
+

+ + #initialize(params) ⇒ TestSession + + + + + +

+
+

Returns a new instance of TestSession.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+
+
# File 'lib/inferno/entities/test_session.rb', line 38
+
+def initialize(params)
+  super(params, ATTRIBUTES)
+
+  self.suite_options ||= []
+
+  test_suite&.suite_options&.each do |option|
+    if suite_options.none? { |selected_option| selected_option.id == option.id }
+      suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+    end
+  end
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #created_atTime + + + + + +

+
+

Returns creation timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    creation timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+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
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #idString + + + + + +

+
+

Returns id of the session.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the session

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+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
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #resultsArray<Inferno::Entities::TestResult> + + + + + +

+
+

associated with this session

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Array<Inferno::Entities::TestResult>) + + + + — +

    the TestResults

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+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
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #suite_optionsHash + + + + + +

+
+

Returns the suite options associated with this session.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Hash) + + + + — +

    the suite options associated with this session

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+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
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #test_runsArray<Inferno::Entities::TestRun> + + + + + +

+
+

with this session

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+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
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #test_suiteInferno::Entities::TestSuite + + + + + +

+
+

session

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+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
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #test_suite_idString + + + + + +

+
+

Returns id of the TestSuite being run in this session.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + + — +

    id of the TestSuite being run in this session

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+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
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ + + +
+

+ + #updated_atTime + + + + + +

+
+

Returns update timestamp.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Time) + + + + — +

    update timestamp

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+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
+
+
# File 'lib/inferno/entities/test_session.rb', line 24
+
+class TestSession < Entity
+  ATTRIBUTES = [
+    :id,
+    :created_at,
+    :updated_at,
+    :test_suite_id,
+    :test_suite,
+    :test_runs,
+    :results,
+    :suite_options
+  ].freeze
+
+  include Inferno::Entities::Attributes
+
+  def initialize(params)
+    super(params, ATTRIBUTES)
+
+    self.suite_options ||= []
+
+    test_suite&.suite_options&.each do |option|
+      if suite_options.none? { |selected_option| selected_option.id == option.id }
+        suite_options << DSL::SuiteOption.new(id: option.id, value: option.list_options.first[:value])
+      end
+    end
+  end
+
+  def test_suite
+    @test_suite ||= Repositories::TestSuites.new.find(test_suite_id)
+  end
+
+  def to_hash
+    session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+      hash[attribute] = send(attribute)
+    end
+
+    session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+    session_hash.compact
+  end
+
+  def suite_options_hash
+    (suite_options || []).each_with_object({}) do |option, hash|
+      hash[option.id] = option.value
+    end
+  end
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #suite_options_hashObject + + + + + +

+ + + + +
+
+
+
+64
+65
+66
+67
+68
+
+
# File 'lib/inferno/entities/test_session.rb', line 64
+
+def suite_options_hash
+  (suite_options || []).each_with_object({}) do |option, hash|
+    hash[option.id] = option.value
+  end
+end
+
+
+ +
+

+ + #to_hashObject + + + + + +

+ + + + +
+
+
+
+54
+55
+56
+57
+58
+59
+60
+61
+62
+
+
# File 'lib/inferno/entities/test_session.rb', line 54
+
+def to_hash
+  session_hash = (self.class::ATTRIBUTES - [:suite_options]).each_with_object({}) do |attribute, hash|
+    hash[attribute] = send(attribute)
+  end
+
+  session_hash[:suite_options] = suite_options&.map(&:to_hash) || []
+
+  session_hash.compact
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Entities/TestSuite.html b/docs/docs/Inferno/Entities/TestSuite.html new file mode 100644 index 0000000000..1fce532958 --- /dev/null +++ b/docs/docs/Inferno/Entities/TestSuite.html @@ -0,0 +1,1034 @@ + + + + + + + Class: Inferno::Entities::TestSuite + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Entities::TestSuite + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + +
+
Extended by:
+
Forwardable, DSL::FHIRClient::ClassMethods, DSL::HTTPClient::ClassMethods, DSL::Runnable
+
+ + + +
+
Includes:
+
DSL::FHIRValidation
+
+ + + + + + +
+
Defined in:
+
lib/inferno/entities/test_suite.rb
+
+ +
+ +

Overview

+
+

A TestSuite represents a packaged group of tests, usually for a +single Implementation Guide

+ + +
+
+
+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes included from DSL::Runnable

+

#parent, #suite_option_requirements

+ + + +

+ Class Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from DSL::Runnable

+

description, id, input_instructions, optional, optional?, required, required?, required_suite_options, resume_test_route, route, short_description, short_title, title

+ + + + + + + + + + + + + + + +

Methods included from DSL::FHIRClient::ClassMethods

+

fhir_client

+ + + + + + + + + +

Methods included from DSL::HTTPClient::ClassMethods

+

http_client

+ + + + + + + + + + +

Methods included from DSL::FHIRValidation

+

#find_validator, #resource_is_valid?

+ + +
+

Class Method Details

+ + +
+

+ + .check_configuration(&block) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Provide a block which will verify any configuration needed for this +test suite to operate properly.

+ + +
+
+
+ +

Yield Returns:

+
    + +
  • + + + (Array<Hash>) + + + + — +

    An array of message hashes containing the +keys :type and :message. Type options are info, warning, and +error.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+
+
# File 'lib/inferno/entities/test_suite.rb', line 99
+
+def check_configuration(&block)
+  @check_configuration_block = lambda do
+    block.call&.each do |configuration_message|
+      case configuration_message[:type]
+      when 'warning'
+        Application[:logger].warn(configuration_message[:message])
+      when 'error'
+        Application[:logger].error(configuration_message[:message])
+      end
+    end
+  end
+end
+
+
+ +
+

+ + .groupvoid + + + + + +

+
+

This method returns an undefined value.

Add a child group

+ + +
+
+
+ + +
+ + + + +
+
+
+
+49
+50
+51
+52
+
+
# File 'lib/inferno/entities/test_suite.rb', line 49
+
+def group(...)
+  ()
+  define_child(...)
+end
+
+
+ +
+

+ + .groups(options = nil) ⇒ Array<Inferno::Entities::TestGroup> + + + + + +

+
+

Get this suite’s child groups, filtered by suite options, if provided.

+ + +
+
+
+

Parameters:

+ + +

Returns:

+ + +
+ + + + +
+
+
+
+41
+42
+43
+
+
# File 'lib/inferno/entities/test_suite.rb', line 41
+
+def groups(options = nil)
+  children(options).select { |child| child < Inferno::Entities::TestGroup }
+end
+
+
+ +
+
+
+

Set/get a list of links which are displayed in the footer of the UI.

+ + +
+
+
+ +
+

Examples:

+ + +
links [
+  {
+    label: 'Report Issue',
+    url: 'https://github.com/onc-healthit/onc-certification-g10-test-kit/issues/'
+  },
+  {
+    label: 'Open Source',
+    url: 'https://github.com/onc-healthit/onc-certification-g10-test-kit/'
+  }
+]
+ +
+

Parameters:

+
    + +
  • + + links + + + (Array<Hash>) + + + (defaults to: nil) + + + — +

    A list of Hashes for the links to be +displayed. Each hash needs a label: and url: entry.

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array<Hash>, nil) + + + +
  • + +
+ +
+ + + + +
+
+
+
+178
+179
+180
+181
+182
+
+
# File 'lib/inferno/entities/test_suite.rb', line 178
+
+def links(links = nil)
+  return @links if links.nil?
+
+  @links = links
+end
+
+
+ +
+

+ + .suite_option(identifier, **option_params) ⇒ void + + + + + +

+
+

This method returns an undefined value.

Define an option for this suite. Options are used to define suite-wide +configuration which is selected by a user at the start of a test +session. These options can be used to change what tests/groups are run +or behavior within particular tests.

+ + +
+
+
+ +
+

Examples:

+ + +
suite_option :ig_version,
+            list_options: [
+              {
+                label: 'IG v1',
+                value: 'ig_v1'
+              },
+              {
+                label: 'IG v2',
+                value: 'ig_v2'
+              }
+            ]
+
+group from: :ig_v1_group,
+      required_suite_options: { ig_version: 'ig_v1' }
+
+group from: :ig_v2_group do
+  required_suite_options ig_version: 'ig_v2'
+end
+ +
+

Parameters:

+
    + +
  • + + identifier + + + (Symbol, String) + + + + — +

    The identifier which will be used +to refer to this option

    +
    + +
  • + +
  • + + option_params + + + (Hash) + + + + — +

    a customizable set of options

    +
    + +
  • + +
+ + + + + + +

Options Hash (**option_params):

+
    + +
  • + :title + (String) + + + + + —

    Title which will be displayed in +the UI

    +
    + +
  • + +
  • + :list_options + (Array<Hash>) + + + + + —

    The list of possible +values for this option. Each hash needs to have a label: and a +value: entry which are Strings.

    +
    + +
  • + +
+ + + +
+ + + + +
+
+
+
+150
+151
+152
+
+
# File 'lib/inferno/entities/test_suite.rb', line 150
+
+def suite_option(identifier, **option_params)
+  suite_options << DSL::SuiteOption.new(option_params.merge(id: identifier))
+end
+
+
+ +
+

+ + .suite_optionsArray<Inferno::DSL::SuiteOption> + + + + + +

+
+

Returns The options defined for +this suite.

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+156
+157
+158
+
+
# File 'lib/inferno/entities/test_suite.rb', line 156
+
+def suite_options
+  @suite_options ||= []
+end
+
+
+ +
+

+ + .suite_summary(suite_summary = nil) ⇒ String? + + + + + +

+
+

Set/get a description which for this test suite which will be +displayed in the UI.

+ + +
+
+
+

Parameters:

+
    + +
  • + + suite_summary + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + +
  • + +
+ +
+ + + + +
+
+
+
+190
+191
+192
+193
+194
+
+
# File 'lib/inferno/entities/test_suite.rb', line 190
+
+def suite_summary(suite_summary = nil)
+  return @suite_summary if suite_summary.nil?
+
+  @suite_summary = format_markdown(suite_summary)
+end
+
+
+ +
+

+ + .version(version = nil) ⇒ String? + + + + + +

+
+

Set/get the version of this test suite.

+ + +
+
+
+

Parameters:

+
    + +
  • + + version + + + (String) + + + (defaults to: nil) + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String, nil) + + + +
  • + +
+ +
+ + + + +
+
+
+
+74
+75
+76
+77
+78
+
+
# File 'lib/inferno/entities/test_suite.rb', line 74
+
+def version(version = nil)
+  return @version if version.nil?
+
+  @version = version
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions.html b/docs/docs/Inferno/Exceptions.html new file mode 100644 index 0000000000..13a2f21e14 --- /dev/null +++ b/docs/docs/Inferno/Exceptions.html @@ -0,0 +1,115 @@ + + + + + + + Module: Inferno::Exceptions + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Exceptions + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: AssertionException, BadSessionDataType, CancelException, ErrorInValidatorException, NotUserRunnableException, OmitException, ParentNotLoadedException, PassException, RequiredInputsNotFound, SkipException, TestResultException, UnknownAttributeException, UnknownSessionDataType, ValidatorNotFoundException, WaitException + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/AssertionException.html b/docs/docs/Inferno/Exceptions/AssertionException.html new file mode 100644 index 0000000000..71fc53b4d0 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/AssertionException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::AssertionException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::AssertionException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/exceptions.rb', line 7
+
+def result
+  'fail'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/BadSessionDataType.html b/docs/docs/Inferno/Exceptions/BadSessionDataType.html new file mode 100644 index 0000000000..7595057a59 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/BadSessionDataType.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::BadSessionDataType + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::BadSessionDataType + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(name, expected_class_names, actual_class) ⇒ BadSessionDataType + + + + + +

+
+

Returns a new instance of BadSessionDataType.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+93
+94
+95
+
+
# File 'lib/inferno/exceptions.rb', line 93
+
+def initialize(name, expected_class_names, actual_class)
+  super("Expected '#{name}' to be a #{expected_class_names}, but found a #{actual_class.name}.")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/CancelException.html b/docs/docs/Inferno/Exceptions/CancelException.html new file mode 100644 index 0000000000..30cfe50919 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/CancelException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::CancelException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::CancelException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+37
+38
+39
+
+
# File 'lib/inferno/exceptions.rb', line 37
+
+def result
+  'cancel'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/ErrorInValidatorException.html b/docs/docs/Inferno/Exceptions/ErrorInValidatorException.html new file mode 100644 index 0000000000..91e3d52ccf --- /dev/null +++ b/docs/docs/Inferno/Exceptions/ErrorInValidatorException.html @@ -0,0 +1,218 @@ + + + + + + + Exception: Inferno::Exceptions::ErrorInValidatorException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::ErrorInValidatorException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ +

Overview

+
+

ErrorInValidatorException is used when an exception occurred in +calling the validator service, for example a connection timeout +or an unexpected response format. +Note: This class extends TestResultException instead of RuntimeError +to bypass printing the stack trace in the UI, since +the stack trace of this exception is not likely be useful. +Instead the message should point to where in the validator an error occurred.

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+50
+51
+52
+
+
# File 'lib/inferno/exceptions.rb', line 50
+
+def result
+  'error'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/NotUserRunnableException.html b/docs/docs/Inferno/Exceptions/NotUserRunnableException.html new file mode 100644 index 0000000000..ab615cb832 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/NotUserRunnableException.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::NotUserRunnableException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::NotUserRunnableException + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initializeNotUserRunnableException + + + + + +

+
+

Returns a new instance of NotUserRunnableException.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+74
+75
+76
+
+
# File 'lib/inferno/exceptions.rb', line 74
+
+def initialize
+  super('The chosen runnable must be run as part of a group')
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/OmitException.html b/docs/docs/Inferno/Exceptions/OmitException.html new file mode 100644 index 0000000000..abca264ded --- /dev/null +++ b/docs/docs/Inferno/Exceptions/OmitException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::OmitException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::OmitException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/inferno/exceptions.rb', line 19
+
+def result
+  'omit'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/ParentNotLoadedException.html b/docs/docs/Inferno/Exceptions/ParentNotLoadedException.html new file mode 100644 index 0000000000..65be233ac9 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/ParentNotLoadedException.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::ParentNotLoadedException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::ParentNotLoadedException + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(klass, id) ⇒ ParentNotLoadedException + + + + + +

+
+

Returns a new instance of ParentNotLoadedException.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+56
+57
+58
+
+
# File 'lib/inferno/exceptions.rb', line 56
+
+def initialize(klass, id)
+  super("No #{klass.name.demodulize} found with id '#{id}'")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/PassException.html b/docs/docs/Inferno/Exceptions/PassException.html new file mode 100644 index 0000000000..f526f811a6 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/PassException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::PassException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::PassException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+25
+26
+27
+
+
# File 'lib/inferno/exceptions.rb', line 25
+
+def result
+  'pass'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/RequiredInputsNotFound.html b/docs/docs/Inferno/Exceptions/RequiredInputsNotFound.html new file mode 100644 index 0000000000..fb794db010 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/RequiredInputsNotFound.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::RequiredInputsNotFound + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::RequiredInputsNotFound + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(missing_inputs) ⇒ RequiredInputsNotFound + + + + + +

+
+

Returns a new instance of RequiredInputsNotFound.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+68
+69
+70
+
+
# File 'lib/inferno/exceptions.rb', line 68
+
+def initialize(missing_inputs)
+  super("Missing the following required inputs: #{missing_inputs.join(', ')}")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/SkipException.html b/docs/docs/Inferno/Exceptions/SkipException.html new file mode 100644 index 0000000000..b47655fb54 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/SkipException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::SkipException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::SkipException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/inferno/exceptions.rb', line 13
+
+def result
+  'skip'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/TestResultException.html b/docs/docs/Inferno/Exceptions/TestResultException.html new file mode 100644 index 0000000000..0e29c01ff2 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/TestResultException.html @@ -0,0 +1,128 @@ + + + + + + + Exception: Inferno::Exceptions::TestResultException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::TestResultException + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/UnknownAttributeException.html b/docs/docs/Inferno/Exceptions/UnknownAttributeException.html new file mode 100644 index 0000000000..2166d2a8f6 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/UnknownAttributeException.html @@ -0,0 +1,206 @@ + + + + + + + Exception: Inferno::Exceptions::UnknownAttributeException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::UnknownAttributeException + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(attributes, klass) ⇒ UnknownAttributeException + + + + + +

+
+

Returns a new instance of UnknownAttributeException.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+80
+81
+82
+83
+
+
# File 'lib/inferno/exceptions.rb', line 80
+
+def initialize(attributes, klass)
+  attributes_string = attributes.map { |attribute| "'#{attribute}'" }.join(', ')
+  super("Unknown attributes for #{klass.name}: #{attributes_string}")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/UnknownSessionDataType.html b/docs/docs/Inferno/Exceptions/UnknownSessionDataType.html new file mode 100644 index 0000000000..dce8400656 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/UnknownSessionDataType.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::UnknownSessionDataType + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::UnknownSessionDataType + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(output) ⇒ UnknownSessionDataType + + + + + +

+
+

Returns a new instance of UnknownSessionDataType.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+87
+88
+89
+
+
# File 'lib/inferno/exceptions.rb', line 87
+
+def initialize(output)
+  super("Unknown type '#{output[:type]}' for '#{output[:name]}'.")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/ValidatorNotFoundException.html b/docs/docs/Inferno/Exceptions/ValidatorNotFoundException.html new file mode 100644 index 0000000000..04dd2b8496 --- /dev/null +++ b/docs/docs/Inferno/Exceptions/ValidatorNotFoundException.html @@ -0,0 +1,204 @@ + + + + + + + Exception: Inferno::Exceptions::ValidatorNotFoundException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::ValidatorNotFoundException + + + +

+
+ +
+
Inherits:
+
+ RuntimeError + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(validator_name) ⇒ ValidatorNotFoundException + + + + + +

+
+

Returns a new instance of ValidatorNotFoundException.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+62
+63
+64
+
+
# File 'lib/inferno/exceptions.rb', line 62
+
+def initialize(validator_name)
+  super("No '#{validator_name}' validator found")
+end
+
+
+ +
+ + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Exceptions/WaitException.html b/docs/docs/Inferno/Exceptions/WaitException.html new file mode 100644 index 0000000000..8e68af97ad --- /dev/null +++ b/docs/docs/Inferno/Exceptions/WaitException.html @@ -0,0 +1,202 @@ + + + + + + + Exception: Inferno::Exceptions::WaitException + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Exception: Inferno::Exceptions::WaitException + + + +

+
+ +
+
Inherits:
+
+ TestResultException + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/exceptions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +
+

Instance Method Details

+ + +
+

+ + #resultObject + + + + + +

+ + + + +
+
+
+
+31
+32
+33
+
+
# File 'lib/inferno/exceptions.rb', line 31
+
+def result
+  'wait'
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Jobs.html b/docs/docs/Inferno/Jobs.html new file mode 100644 index 0000000000..c5b096dfac --- /dev/null +++ b/docs/docs/Inferno/Jobs.html @@ -0,0 +1,195 @@ + + + + + + + Module: Inferno::Jobs + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Jobs + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/jobs.rb,
+ lib/inferno/jobs/resume_test_run.rb,
lib/inferno/jobs/execute_test_run.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: ExecuteTestRun, ResumeTestRun + + +

+ + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .perform(job_klass, *params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+8
+9
+10
+11
+12
+13
+14
+
+
# File 'lib/inferno/jobs.rb', line 8
+
+def self.perform(job_klass, *params)
+  if Application['async_jobs']
+    job_klass.perform_async(*params)
+  else
+    job_klass.new.perform(*params)
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Jobs/ExecuteTestRun.html b/docs/docs/Inferno/Jobs/ExecuteTestRun.html new file mode 100644 index 0000000000..40180d8add --- /dev/null +++ b/docs/docs/Inferno/Jobs/ExecuteTestRun.html @@ -0,0 +1,203 @@ + + + + + + + Class: Inferno::Jobs::ExecuteTestRun + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Jobs::ExecuteTestRun + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
Sidekiq::Worker
+
+ + + + + + +
+
Defined in:
+
lib/inferno/jobs/execute_test_run.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #perform(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/jobs/execute_test_run.rb', line 6
+
+def perform(test_run_id)
+  test_run = Inferno::Repositories::TestRuns.new.find(test_run_id)
+  test_session = Inferno::Repositories::TestSessions.new.find(test_run.test_session_id)
+
+  TestRunner.new(test_session:, test_run:).start
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Jobs/ResumeTestRun.html b/docs/docs/Inferno/Jobs/ResumeTestRun.html new file mode 100644 index 0000000000..11eac3284d --- /dev/null +++ b/docs/docs/Inferno/Jobs/ResumeTestRun.html @@ -0,0 +1,203 @@ + + + + + + + Class: Inferno::Jobs::ResumeTestRun + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Jobs::ResumeTestRun + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
Sidekiq::Worker
+
+ + + + + + +
+
Defined in:
+
lib/inferno/jobs/resume_test_run.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #perform(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/jobs/resume_test_run.rb', line 6
+
+def perform(test_run_id)
+  test_run = Inferno::Repositories::TestRuns.new.find(test_run_id)
+  test_session = Inferno::Repositories::TestSessions.new.find(test_run.test_session_id)
+
+  TestRunner.new(test_session:, test_run:, resume: true).start
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories.html b/docs/docs/Inferno/Repositories.html new file mode 100644 index 0000000000..54561e8444 --- /dev/null +++ b/docs/docs/Inferno/Repositories.html @@ -0,0 +1,140 @@ + + + + + + + Module: Inferno::Repositories + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Repositories + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories.rb,
+ lib/inferno/repositories/tests.rb,
lib/inferno/repositories/headers.rb,
lib/inferno/repositories/presets.rb,
lib/inferno/repositories/results.rb,
lib/inferno/repositories/messages.rb,
lib/inferno/repositories/requests.rb,
lib/inferno/repositories/test_runs.rb,
lib/inferno/repositories/repository.rb,
lib/inferno/repositories/test_groups.rb,
lib/inferno/repositories/test_suites.rb,
lib/inferno/repositories/session_data.rb,
lib/inferno/repositories/test_sessions.rb,
lib/inferno/repositories/in_memory_repository.rb,
lib/inferno/repositories/validate_runnable_reference.rb
+
+
+ +
+ +

Overview

+
+

Repositories provide an abstraction layer for dealing with entity +persistence. All code for interacting with the database lives in +repositories. The rest of the codebase interacts with the database through a +public api provided by various repositories.

+ +

Naming Convention: A repository should be named the plural version of +the entity name. For example:

+ +
    +
  • TestSessions is the repsitory for the TestSession entity
  • +
  • TestGroups is the repository for the TestGroup entity
  • +
+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + Modules: ValidateRunnableReference + + + + Classes: Headers, InMemoryRepository, Messages, Presets, Repository, Requests, Results, SessionData, TestGroups, TestRuns, TestSessions, TestSuites, Tests + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Headers.html b/docs/docs/Inferno/Repositories/Headers.html new file mode 100644 index 0000000000..3911a5313b --- /dev/null +++ b/docs/docs/Inferno/Repositories/Headers.html @@ -0,0 +1,145 @@ + + + + + + + Class: Inferno::Repositories::Headers + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Headers + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/headers.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Repository

+

#add_non_db_entities, #build_entity, #create, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Headers/Model.html b/docs/docs/Inferno/Repositories/Headers/Model.html new file mode 100644 index 0000000000..8169dd9c52 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Headers/Model.html @@ -0,0 +1,248 @@ + + + + + + + Class: Inferno::Repositories::Headers::Model + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Headers::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/headers.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+7
+8
+9
+10
+
+
# File 'lib/inferno/repositories/headers.rb', line 7
+
+def before_create
+  self.id = SecureRandom.uuid
+  super
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+12
+13
+14
+15
+
+
# File 'lib/inferno/repositories/headers.rb', line 12
+
+def validate
+  super
+  errors.add(:request_id, 'must be present') if request_id.blank?
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/InMemoryRepository.html b/docs/docs/Inferno/Repositories/InMemoryRepository.html new file mode 100644 index 0000000000..5e662eb1fb --- /dev/null +++ b/docs/docs/Inferno/Repositories/InMemoryRepository.html @@ -0,0 +1,457 @@ + + + + + + + Class: Inferno::Repositories::InMemoryRepository + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::InMemoryRepository + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + +
+
Extended by:
+
Forwardable
+
+ + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/in_memory_repository.rb
+
+ +
+ +
+

Direct Known Subclasses

+

Presets, TestGroups, TestSuites, Tests

+
+ + + + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Class Method Details

+ + +
+

+ + .allObject + + + + + +

+ + + + +
+
+
+
+24
+25
+26
+
+
# File 'lib/inferno/repositories/in_memory_repository.rb', line 24
+
+def all
+  @all ||= []
+end
+
+
+ +
+

+ + .index_by_idObject + + + + + +

+ + + + +
+
+
+
+34
+35
+36
+37
+38
+
+
# File 'lib/inferno/repositories/in_memory_repository.rb', line 34
+
+def index_by_id
+  @all_by_id = {}
+  all.each { |klass| @all_by_id[klass.id] = klass }
+  @all_by_id
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #exists?(id) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/inferno/repositories/in_memory_repository.rb', line 19
+
+def exists?(id)
+  all_by_id.include? id
+end
+
+
+ +
+

+ + #find(id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+15
+16
+17
+
+
# File 'lib/inferno/repositories/in_memory_repository.rb', line 15
+
+def find(id)
+  all_by_id[id.to_s]
+end
+
+
+ +
+

+ + #insert(entity) ⇒ Object + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+13
+
+
# File 'lib/inferno/repositories/in_memory_repository.rb', line 10
+
+def insert(entity)
+  all << entity
+  entity
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Messages.html b/docs/docs/Inferno/Repositories/Messages.html new file mode 100644 index 0000000000..7735d7c076 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Messages.html @@ -0,0 +1,227 @@ + + + + + + + Class: Inferno::Repositories::Messages + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Messages + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/messages.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, #build_entity, #create, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #messages_for_result(result_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+4
+5
+6
+7
+8
+9
+10
+11
+12
+
+
# File 'lib/inferno/repositories/messages.rb', line 4
+
+def messages_for_result(result_id)
+  self.class::Model
+    .order(:index)
+    .where(result_id:)
+    .to_a
+    .map!(&:to_json_data)
+    .each(&:deep_symbolize_keys!)
+    .map! { |result| build_entity(result) }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Messages/Model.html b/docs/docs/Inferno/Repositories/Messages/Model.html new file mode 100644 index 0000000000..9bd8ee41b1 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Messages/Model.html @@ -0,0 +1,254 @@ + + + + + + + Class: Inferno::Repositories::Messages::Model + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Messages::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/messages.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+17
+18
+19
+20
+
+
# File 'lib/inferno/repositories/messages.rb', line 17
+
+def before_create
+  self.id = SecureRandom.uuid
+  super
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+22
+23
+24
+25
+26
+27
+28
+
+
# File 'lib/inferno/repositories/messages.rb', line 22
+
+def validate
+  super
+  types = Entities::Message::TYPES
+  errors.add(:message, 'must be present') if message.blank?
+  errors.add(:type, 'must be present') if type.blank?
+  errors.add(:type, "'#{type}' is invalid. Must be one of: #{types.join(', ')}") unless types.include?(type)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Presets.html b/docs/docs/Inferno/Repositories/Presets.html new file mode 100644 index 0000000000..b188b33409 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Presets.html @@ -0,0 +1,292 @@ + + + + + + + Class: Inferno::Repositories::Presets + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Presets + + + +

+
+ +
+
Inherits:
+
+ InMemoryRepository + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/presets.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the Preset entity.

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from InMemoryRepository

+

all, #exists?, #find, index_by_id, #insert

+ + + +
+

Instance Method Details

+ + +
+

+ + #insert_from_file(path) ⇒ Object + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+
+
# File 'lib/inferno/repositories/presets.rb', line 10
+
+def insert_from_file(path)
+  case path
+  when /\.json$/
+    preset_hash = JSON.parse(File.read(path))
+  when /\.erb$/
+    templated = ERB.new(File.read(path)).result
+    preset_hash = JSON.parse(templated)
+  end
+
+  preset_hash.deep_symbolize_keys!
+  preset_hash[:id] ||= SecureRandom.uuid
+  preset = Entities::Preset.new(preset_hash)
+
+  insert(preset)
+end
+
+
+ +
+

+ + #presets_for_suite(suite_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+26
+27
+28
+
+
# File 'lib/inferno/repositories/presets.rb', line 26
+
+def presets_for_suite(suite_id)
+  all.select { |preset| preset.test_suite_id.to_s == suite_id.to_s }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Repository.html b/docs/docs/Inferno/Repositories/Repository.html new file mode 100644 index 0000000000..3f6b38f962 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Repository.html @@ -0,0 +1,1115 @@ + + + + + + + Class: Inferno::Repositories::Repository + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Repository + Abstract + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + +
+
Extended by:
+
Forwardable
+
+ + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/repository.rb
+
+ +
+ +

Overview

+
+
+ This class is abstract. +
+
+
+

Base class for repositories. Subclass and override methods as +needed.

+ + +
+
+
+ + +
+

Direct Known Subclasses

+

Headers, Messages, Requests, Results, SessionData, TestRuns, TestSessions

+
+ + + + + + + + +

+ Class Method Summary + collapse +

+ +
    + +
  • + + + .db ⇒ Object + + + + + + + + + + + + + +

    Return the db connection for this repository.

    +
    + +
  • + + +
  • + + + .table_name ⇒ String + + + + + + + + + + + + + +

    Return the name of the database table for this repository.

    +
    + +
  • + + +
+ +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Class Method Details

+ + +
+

+ + .dbObject + + + + + +

+
+

Return the db connection for this repository.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+13
+14
+15
+
+
# File 'lib/inferno/repositories/repository.rb', line 13
+
+def self.db
+  Application['db.connection'][table_name]
+end
+
+
+ +
+

+ + .table_nameString + + + + + +

+
+

Return the name of the database table for this repository. Override if +the table name is not the snake case version of the name of the +repository class.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+22
+23
+24
+
+
# File 'lib/inferno/repositories/repository.rb', line 22
+
+def self.table_name
+  name.demodulize.underscore.to_sym
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #add_non_db_entities(hash) ⇒ Object + + + + + +

+ + + + +
+
+
+
+57
+58
+59
+60
+61
+62
+63
+64
+65
+
+
# File 'lib/inferno/repositories/repository.rb', line 57
+
+def add_non_db_entities(hash)
+  if hash.include? :test_id
+    hash[:test] = Tests.new.find(hash[:test_id])
+  elsif hash.include? :test_group_id
+    hash[:test_group] = TestGroups.new.find(hash[:test_group_id])
+  elsif hash.include? :test_suite_id
+    hash[:test_suite] = TestSuites.new.find(hash[:test_suite_id])
+  end
+end
+
+
+ +
+

+ + #build_entity(params) ⇒ Object + + + + + +

+
+

Creates an instance of the entity associated with this repository. +Override if any special logic is required to create the entity.

+ + +
+
+
+

Parameters:

+
    + +
  • + + params + + + (Hash) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Object) + + + + — +

    an instance of #entity_class

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+101
+102
+103
+104
+
+
# File 'lib/inferno/repositories/repository.rb', line 101
+
+def build_entity(params)
+  add_non_db_entities(params)
+  entity_class.new(params)
+end
+
+
+ +
+

+ + #create(params) ⇒ Inferno::Entities + + + + + +

+
+

Create a new record in the database.

+ + +
+
+
+ +
+

Examples:

+ + +
repo = Inferno::Repositories::SomeEntities.new
+begin
+  result = repo.create(key1: 'value1', key2: 'value2')
+rescue Sequel::ValidationFailed => e
+  # handle error
+end
+ +
+

Parameters:

+
    + +
  • + + params + + + (Hash) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Inferno::Entities) + + + + — +

    an instance of the entity for this repo

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+78
+79
+80
+81
+
+
# File 'lib/inferno/repositories/repository.rb', line 78
+
+def create(params)
+  result = self.class::Model.create(db_params(params))
+  build_entity(result.to_hash.merge(handle_non_db_params(params)))
+end
+
+
+ +
+

+ + #db_params(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+106
+107
+108
+
+
# File 'lib/inferno/repositories/repository.rb', line 106
+
+def db_params(params)
+  params.slice(*self.class::Model.columns)
+end
+
+
+ +
+

+ + #entity_classClass + + + + + +

+
+

Return the class of the entity which will be instantiated by a +repository. Override if the entity class is not in the +Inferno::Entities namespace.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Class) + + + +
  • + +
+ +
+ + + + +
+
+
+
+40
+41
+42
+
+
# File 'lib/inferno/repositories/repository.rb', line 40
+
+def entity_class
+  Entities.const_get(entity_class_name)
+end
+
+
+ +
+

+ + #entity_class_nameClass + + + + + +

+
+

Return the name of the entity class which will be instantiated by a +repository. Override if the entity class name is not the singular +version of the repository name.

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Class) + + + +
  • + +
+ +
+ + + + +
+
+
+
+31
+32
+33
+
+
# File 'lib/inferno/repositories/repository.rb', line 31
+
+def entity_class_name
+  self.class.name.demodulize.singularize
+end
+
+
+ +
+

+ + #find(id) ⇒ Inferno::Entities + + + + + +

+
+

Find a database record by id, and instantiate an entity from that +record.

+ + +
+
+
+

Parameters:

+
    + +
  • + + id + + + (String) + + + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Inferno::Entities) + + + + — +

    an instance of the class returned by +#entity_class

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+50
+51
+52
+53
+54
+55
+
+
# File 'lib/inferno/repositories/repository.rb', line 50
+
+def find(id)
+  result = self.class::Model.find(id:)
+  return result if result.nil?
+
+  build_entity(result.to_hash)
+end
+
+
+ +
+

+ + #handle_non_db_params(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+114
+115
+116
+
+
# File 'lib/inferno/repositories/repository.rb', line 114
+
+def handle_non_db_params(params)
+  non_db_params(params)
+end
+
+
+ +
+

+ + #non_db_params(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+110
+111
+112
+
+
# File 'lib/inferno/repositories/repository.rb', line 110
+
+def non_db_params(params)
+  params.reject { |key, _value| self.class::Model.columns.include? key }
+end
+
+
+ +
+

+ + #update(entity_id, params = {}) ⇒ Object + + + + + +

+
+

Update a record in the database.

+ + +
+
+
+ +
+

Examples:

+ + +
repo = Inferno::Repositories::SomeEntities.new
+result = repo.update(id, key1: 'value1', key2: 'value2')
+ +
+

Parameters:

+
    + +
  • + + entity_id + + + (String) + + + +
  • + +
  • + + params + + + (Hash) + + + (defaults to: {}) + + +
  • + +
+ + +
+ + + + +
+
+
+
+90
+91
+92
+93
+94
+
+
# File 'lib/inferno/repositories/repository.rb', line 90
+
+def update(entity_id, params = {})
+  self.class::Model
+    .find(id: entity_id)
+    .update(params.merge(updated_at: Time.now))
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Requests.html b/docs/docs/Inferno/Repositories/Requests.html new file mode 100644 index 0000000000..0ea5242dd7 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Requests.html @@ -0,0 +1,570 @@ + + + + + + + Class: Inferno::Repositories::Requests + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Requests + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/requests.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, #build_entity, db, #db_params, #entity_class, #entity_class_name, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #create(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+
+
# File 'lib/inferno/repositories/requests.rb', line 6
+
+def create(params)
+  request = self.class::Model.create(db_params(params))
+
+  request_headers = (params[:request_headers] || []).map do |header|
+    request.add_header(header.merge(request_id: request.index, type: 'request'))
+  end
+  response_headers = (params[:response_headers] || []).map do |header|
+    request.add_header(header.merge(request_id: request.index, type: 'response'))
+  end
+
+  headers = (request_headers + response_headers).map { |header| headers_repo.build_entity(header.to_hash) }
+
+  build_entity(
+    request.to_hash
+      .merge(headers:)
+      .merge(non_db_params(params))
+  )
+end
+
+
+ +
+

+ + #find(id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
+
# File 'lib/inferno/repositories/requests.rb', line 25
+
+def find(id)
+  result =
+    self.class::Model
+      .where(id:)
+      .select(*entity_class::SUMMARY_FIELDS)
+      .to_a
+  return nil if result.blank?
+
+  build_entity(result.first.to_hash)
+end
+
+
+ +
+

+ + #find_full_request(id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+36
+37
+38
+39
+40
+41
+42
+43
+44
+
+
# File 'lib/inferno/repositories/requests.rb', line 36
+
+def find_full_request(id)
+  result =
+    self.class::Model
+      .find(id:)
+      .to_json_data(json_serializer_options)
+      .deep_symbolize_keys!
+
+  build_entity(result)
+end
+
+
+ +
+

+ + #find_named_request(test_session_id, name) ⇒ Object + + + + + +

+ + + + +
+
+
+
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+
+
# File 'lib/inferno/repositories/requests.rb', line 46
+
+def find_named_request(test_session_id, name)
+  results =
+    self.class::Model
+      .where(test_session_id:, name: name.to_s)
+      .map { |model| model.to_json_data(json_serializer_options) }
+  return nil if results.blank?
+
+  result = results.reduce { |max, current| current['index'] > max['index'] ? current : max }
+  result.deep_symbolize_keys!
+
+  build_entity(result)
+end
+
+
+ +
+

+ + #json_serializer_optionsObject + + + + + +

+ + + + +
+
+
+
+69
+70
+71
+72
+73
+
+
# File 'lib/inferno/repositories/requests.rb', line 69
+
+def json_serializer_options
+  {
+    include: :headers
+  }
+end
+
+
+ +
+

+ + #requests_for_result(result_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+59
+60
+61
+62
+63
+64
+65
+66
+67
+
+
# File 'lib/inferno/repositories/requests.rb', line 59
+
+def requests_for_result(result_id)
+  self.class::Model
+    .order(:index)
+    .where(result_id:)
+    .select(*entity_class::SUMMARY_FIELDS)
+    .to_a
+    .map(&:to_hash)
+    .map! { |result| build_entity(result) }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Requests/Model.html b/docs/docs/Inferno/Repositories/Requests/Model.html new file mode 100644 index 0000000000..816e1d7e3e --- /dev/null +++ b/docs/docs/Inferno/Repositories/Requests/Model.html @@ -0,0 +1,199 @@ + + + + + + + Class: Inferno::Repositories::Requests::Model + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Requests::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/requests.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+80
+81
+82
+83
+84
+85
+86
+
+
# File 'lib/inferno/repositories/requests.rb', line 80
+
+def before_create
+  self.id = SecureRandom.uuid
+  time = Time.now
+  self.created_at ||= time
+  self.updated_at ||= time
+  super
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Results.html b/docs/docs/Inferno/Repositories/Results.html new file mode 100644 index 0000000000..6689732082 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Results.html @@ -0,0 +1,872 @@ + + + + + + + Class: Inferno::Repositories::Results + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Results + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/results.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #build_entity(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+
+
# File 'lib/inferno/repositories/results.rb', line 55
+
+def build_entity(params)
+  runnable =
+    if params[:test_id]
+      { test: tests_repo.find(params[:test_id]) }
+    elsif params[:test_group_id]
+      { test_group: groups_repo.find(params[:test_group_id]) }
+    elsif params[:test_suite_id]
+      { test_suite: suites_repo.find(params[:test_suite_id]) }
+    else
+      {}
+    end
+  entity_class.new(params.merge(runnable))
+end
+
+
+ +
+

+ + #cancel_waiting_result(result_id, message = nil) ⇒ Object + + + + + +

+ + + + +
+
+
+
+143
+144
+145
+
+
# File 'lib/inferno/repositories/results.rb', line 143
+
+def cancel_waiting_result(result_id, message = nil)
+  update(result_id, result: 'cancel', result_message: message)
+end
+
+
+ +
+

+ + #create(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
+
# File 'lib/inferno/repositories/results.rb', line 14
+
+def create(params)
+  messages = params.delete(:messages) || []
+  requests = params.delete(:requests) || []
+  super(params).tap do |result|
+    result_model = self.class::Model.find(id: result.id)
+    messages.each { |message| messages_repo.create(message.merge(result_id: result.id)) }
+    requests.each do |request|
+      request_id =
+        if request.id.present?
+          request.id
+        else
+          requests_repo.create(request.to_hash.merge(result_id: result.id)).id
+        end
+      request_model = requests_repo.class::Model.find(id: request_id)
+      result_model.add_request(request_model)
+    end
+  end
+end
+
+
+ +
+

+ + #current_results_for_test_session(test_session_id) ⇒ Object + + + + + +

+
+

Get all of the current results for a test session

+ + +
+
+
+ + +
+ + + + +
+
+
+
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+
+
# File 'lib/inferno/repositories/results.rb', line 110
+
+def current_results_for_test_session(test_session_id)
+  self.class::Model
+    .current_results_for_test_session(test_session_id)
+    .eager(:messages)
+    .eager(requests: proc { |requests| requests.select(*Entities::Request::SUMMARY_FIELDS) })
+    .all
+    .map! do |result_hash|
+      build_entity(
+        result_hash
+          .to_json_data(json_serializer_options)
+          .deep_symbolize_keys!
+      )
+    end
+end
+
+
+ +
+

+ + #current_results_for_test_session_and_runnables(test_session_id, runnables) ⇒ Object + + + + + +

+
+

Get the current results for a list of runnables

+ + +
+
+
+ + +
+ + + + +
+
+
+
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+
+
# File 'lib/inferno/repositories/results.rb', line 126
+
+def current_results_for_test_session_and_runnables(test_session_id, runnables)
+  self.class::Model
+    .current_results_for_test_session_and_runnables(test_session_id, runnables)
+    .all
+    .map! do |result_hash|
+      build_entity(
+        result_hash
+          .to_json_data(json_serializer_options)
+          .deep_symbolize_keys!
+      )
+    end
+end
+
+
+ +
+

+ + #find_waiting_result(test_run_id:) ⇒ Object + + + + + +

+ + + + +
+
+
+
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+
+
# File 'lib/inferno/repositories/results.rb', line 94
+
+def find_waiting_result(test_run_id:)
+  result_hash =
+    Model
+      .where(test_run_id:, result: 'wait')
+      .where { test_id !~ nil }
+      .limit(1)
+      .to_a
+      .first
+      &.to_hash
+
+  return nil if result_hash.nil?
+
+  build_entity(result_hash)
+end
+
+
+ +
+

+ + #json_serializer_optionsObject + + + + + +

+ + + + +
+
+
+
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+
+
# File 'lib/inferno/repositories/results.rb', line 147
+
+def json_serializer_options
+  {
+    include: {
+      messages: {},
+      requests: {
+        only: Entities::Request::SUMMARY_FIELDS
+      }
+    }
+  }
+end
+
+
+ +
+

+ + #pass_waiting_result(result_id, message = nil) ⇒ Object + + + + + +

+ + + + +
+
+
+
+139
+140
+141
+
+
# File 'lib/inferno/repositories/results.rb', line 139
+
+def pass_waiting_result(result_id, message = nil)
+  update(result_id, result: 'pass', result_message: message)
+end
+
+
+ +
+

+ + #result_for_test_run(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+
+
# File 'lib/inferno/repositories/results.rb', line 69
+
+def result_for_test_run(params)
+  result_hash =
+    self.class::Model
+      .find(params)
+      &.to_hash
+
+  return nil if result_hash.nil?
+
+  build_entity(result_hash)
+end
+
+
+ +
+

+ + #test_run_results_after(test_run_id:, after:) ⇒ Object + + + + + +

+ + + + +
+
+
+
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+
+
# File 'lib/inferno/repositories/results.rb', line 80
+
+def test_run_results_after(test_run_id:, after:)
+  Model
+    .where(test_run_id:)
+    .where { updated_at >= after }
+    .to_a
+    .map! do |result_hash|
+    build_entity(
+      result_hash
+        .to_json_data(json_serializer_options)
+        .deep_symbolize_keys!
+    )
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Results/Model.html b/docs/docs/Inferno/Repositories/Results/Model.html new file mode 100644 index 0000000000..c59cf8ee88 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Results/Model.html @@ -0,0 +1,510 @@ + + + + + + + Class: Inferno::Repositories::Results::Model + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Results::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
ValidateRunnableReference
+
+ + + + + + +
+
Defined in:
+
lib/inferno/repositories/results.rb
+
+ +
+ + + + +

Constant Summary

+ +

Constants included + from ValidateRunnableReference

+

ValidateRunnableReference::REFERENCE_KEYS

+ + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from ValidateRunnableReference

+

#check_runnable_reference, #runnable_reference_exists?

+ + +
+

Class Method Details

+ + +
+

+ + .current_results_for_test_session(test_session_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+204
+205
+206
+
+
# File 'lib/inferno/repositories/results.rb', line 204
+
+def self.current_results_for_test_session(test_session_id)
+  fetch(current_results_sql, test_session_id:)
+end
+
+
+ +
+

+ + .current_results_for_test_session_and_runnables(test_session_id, runnables) ⇒ Object + + + + + +

+ + + + +
+
+
+
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+
+
# File 'lib/inferno/repositories/results.rb', line 208
+
+def self.current_results_for_test_session_and_runnables(test_session_id, runnables)
+  test_ids = runnables.select { |runnable| runnable < Entities::Test }.map!(&:id)
+  test_group_ids = runnables.select { |runnable| runnable < Entities::TestGroup }.map!(&:id)
+  test_suite_ids = runnables.select { |runnable| runnable < Entities::TestSuite }.map!(&:id)
+
+  fetch(
+    current_results_sql(with_runnables_filter: true),
+    test_session_id:,
+    test_ids:,
+    test_group_ids:,
+    test_suite_ids:
+  )
+end
+
+
+ +
+

+ + .current_results_sql(with_runnables_filter: false) ⇒ Object + + + + + +

+ + + + +
+
+
+
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+
+
# File 'lib/inferno/repositories/results.rb', line 161
+
+def self.current_results_sql(with_runnables_filter: false)
+  query = <<~SQL.gsub(/\s+/, ' ').freeze
+    SELECT * FROM results a
+    WHERE test_session_id = :test_session_id
+  SQL
+  runnables_filter = <<~SQL.gsub(/\s+/, ' ').freeze
+    AND (test_id IN :test_ids OR test_group_id IN :test_group_ids OR test_suite_id IN :test_suite_ids)
+  SQL
+  subquery = <<~SQL.gsub(/\s+/, ' ').freeze
+    AND a.id IN  (
+      SELECT id
+      FROM results b
+      WHERE (b.test_session_id = a.test_session_id AND b.test_id = a.test_id) OR
+            (b.test_session_id = a.test_session_id AND b.test_group_id = a.test_group_id) OR
+            (b.test_session_id = a.test_session_id AND b.test_suite_id = a.test_suite_id)
+      ORDER BY updated_at DESC
+      LIMIT 1
+    )
+  SQL
+  return "#{query} #{runnables_filter} #{subquery}" if with_runnables_filter
+
+  "#{query} #{subquery}"
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+191
+192
+193
+194
+195
+196
+197
+
+
# File 'lib/inferno/repositories/results.rb', line 191
+
+def before_create
+  self.id = SecureRandom.uuid
+  time = Time.now
+  self.created_at ||= time
+  self.updated_at ||= time
+  super
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+199
+200
+201
+202
+
+
# File 'lib/inferno/repositories/results.rb', line 199
+
+def validate
+  super
+  errors.add(:result, "'#{result}' is not valid") unless Entities::Result::RESULT_OPTIONS.include?(result)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/SessionData.html b/docs/docs/Inferno/Repositories/SessionData.html new file mode 100644 index 0000000000..79ddbffeff --- /dev/null +++ b/docs/docs/Inferno/Repositories/SessionData.html @@ -0,0 +1,677 @@ + + + + + + + Class: Inferno::Repositories::SessionData + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::SessionData + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/session_data.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, #build_entity, #create, db, #db_params, #entity_class, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #entity_class_nameObject + + + + + +

+ + + + +
+
+
+
+53
+54
+55
+
+
# File 'lib/inferno/repositories/session_data.rb', line 53
+
+def entity_class_name
+  'SessionData'
+end
+
+
+ +
+

+ + #get_all_from_session(test_session_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+
+
# File 'lib/inferno/repositories/session_data.rb', line 40
+
+def get_all_from_session(test_session_id)
+  self.class::Model
+    .where(test_session_id:)
+    .all
+    .map! do |session_data_hash|
+      build_entity(
+        session_data_hash
+          .to_json_data
+          .deep_symbolize_keys!
+      )
+    end
+end
+
+
+ +
+

+ + #load(test_session_id:, name:, type: 'text') ⇒ Object + + + + + +

+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+
+
# File 'lib/inferno/repositories/session_data.rb', line 24
+
+def load(test_session_id:, name:, type: 'text')
+  raw_value =
+    self.class::Model
+      .find(test_session_id:, name: name.to_s.downcase)
+      &.value
+
+  case type.to_s
+  when 'oauth_credentials'
+    DSL::OAuthCredentials.new(JSON.parse(raw_value || '{}'))
+  when 'checkbox'
+    JSON.parse(raw_value || '[]')
+  else
+    raw_value
+  end
+end
+
+
+ +
+

+ + #save(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+
+
# File 'lib/inferno/repositories/session_data.rb', line 6
+
+def save(params)
+  name = params[:name].to_s.downcase
+  test_session_id = params[:test_session_id]
+
+  value = value_to_persist(params)
+
+  db
+    .insert_conflict(
+      target: :id,
+      update: { value: }
+    ).insert(
+      id: "#{test_session_id}_#{name}",
+      name:,
+      value:,
+      test_session_id:
+    )
+end
+
+
+ +
+

+ + #serialize_checkbox_input(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+
+
# File 'lib/inferno/repositories/session_data.rb', line 72
+
+def serialize_checkbox_input(params)
+  if params[:value].is_a?(String)
+    params[:value]
+  elsif params[:value].nil?
+    '[]'
+  elsif params[:value].is_a?(Array)
+    params[:value].to_json
+  else
+    raise Exceptions::BadSessionDataType.new(
+      params[:name],
+      'JSON String or Array',
+      params[:value].class
+    )
+  end
+end
+
+
+ +
+

+ + #serialize_oauth_credentials_input(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+
+
# File 'lib/inferno/repositories/session_data.rb', line 88
+
+def serialize_oauth_credentials_input(params)
+  credentials =
+    if params[:value].is_a? String
+      DSL::OAuthCredentials.new(JSON.parse(params[:value]))
+    elsif !params[:value].is_a? DSL::OAuthCredentials
+      raise Exceptions::BadSessionDataType.new(
+        params[:name],
+        DSL::OAuthCredentials.name,
+        params[:value].class
+      )
+    else
+      params[:value]
+    end
+
+  credentials.name = params[:name]
+  credentials.to_s
+end
+
+
+ +
+

+ + #value_to_persist(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+
+
# File 'lib/inferno/repositories/session_data.rb', line 57
+
+def value_to_persist(params)
+  return nil if params[:value].blank?
+
+  case params[:type]&.to_s
+  when 'text', 'textarea', 'radio'
+    params[:value].to_s
+  when 'checkbox'
+    serialize_checkbox_input(params)
+  when 'oauth_credentials'
+    serialize_oauth_credentials_input(params)
+  else
+    raise Exceptions::UnknownSessionDataType, params
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/SessionData/Model.html b/docs/docs/Inferno/Repositories/SessionData/Model.html new file mode 100644 index 0000000000..adfbe14a99 --- /dev/null +++ b/docs/docs/Inferno/Repositories/SessionData/Model.html @@ -0,0 +1,121 @@ + + + + + + + Class: Inferno::Repositories::SessionData::Model + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::SessionData::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/session_data.rb
+
+ +
+ + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestGroups.html b/docs/docs/Inferno/Repositories/TestGroups.html new file mode 100644 index 0000000000..913e2b824a --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestGroups.html @@ -0,0 +1,145 @@ + + + + + + + Class: Inferno::Repositories::TestGroups + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestGroups + + + +

+
+ +
+
Inherits:
+
+ InMemoryRepository + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_groups.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the TestGroup entity.

+ + +
+
+
+ + +
+ + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from InMemoryRepository

+

all, #exists?, #find, index_by_id, #insert

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestRuns.html b/docs/docs/Inferno/Repositories/TestRuns.html new file mode 100644 index 0000000000..127654717d --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestRuns.html @@ -0,0 +1,927 @@ + + + + + + + Class: Inferno::Repositories::TestRuns + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestRuns + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_runs.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, #create, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #active_test_run_for_session?(test_session_id) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+127
+128
+129
+130
+131
+132
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 127
+
+def active_test_run_for_session?(test_session_id)
+  self.class::Model
+    .where(test_session_id:)
+    .exclude(status: 'done')
+    .count.positive?
+end
+
+
+ +
+

+ + #build_entity(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+16
+17
+18
+19
+20
+21
+22
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 16
+
+def build_entity(params)
+  super.tap do |test_run|
+    test_run&.results&.map! do |result|
+      result.is_a?(Entities::Result) ? result : Entities::Result.new(result)
+    end
+  end
+end
+
+
+ +
+

+ + #find_latest_waiting_by_identifier(identifier) ⇒ Object + + + + + +

+ + + + +
+
+
+
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 35
+
+def find_latest_waiting_by_identifier(identifier)
+  test_run_hash =
+    self.class::Model
+      .where(status: 'waiting')
+      .where(identifier:)
+      .where { wait_timeout >= Time.now }
+      .order(Sequel.desc(:updated_at))
+      .limit(1)
+      .to_a
+      &.first
+      &.to_hash
+
+  return nil if test_run_hash.nil?
+
+  build_entity(test_run_hash)
+end
+
+
+ +
+

+ + #json_serializer_optionsObject + + + + + +

+ + + + +
+
+
+
+8
+9
+10
+11
+12
+13
+14
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 8
+
+def json_serializer_options
+  {
+    include: {
+      results: results_repo.json_serializer_options
+    }
+  }
+end
+
+
+ +
+

+ + #last_test_run(test_session_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 52
+
+def last_test_run(test_session_id)
+  test_run_hash =
+    self.class::Model
+      .where(test_session_id:)
+      .order(Sequel.desc(:updated_at))
+      .limit(1)
+      .to_a
+      .map { |record| record.to_json_data(json_serializer_options).deep_symbolize_keys! }
+      &.first
+      &.to_hash
+
+  return nil if test_run_hash.nil?
+
+  build_entity(test_run_hash)
+end
+
+
+ +
+

+ + #mark_as_cancelling(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+98
+99
+100
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 98
+
+def mark_as_cancelling(test_run_id)
+  update(test_run_id, status: 'cancelling')
+end
+
+
+ +
+

+ + #mark_as_done(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+76
+77
+78
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 76
+
+def mark_as_done(test_run_id)
+  update(test_run_id, status: 'done')
+end
+
+
+ +
+

+ + #mark_as_no_longer_waiting(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+89
+90
+91
+92
+93
+94
+95
+96
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 89
+
+def mark_as_no_longer_waiting(test_run_id)
+  update(
+    test_run_id,
+    status: 'queued',
+    identifier: nil,
+    wait_timeout: nil
+  )
+end
+
+
+ +
+

+ + #mark_as_running(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+72
+73
+74
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 72
+
+def mark_as_running(test_run_id)
+  update(test_run_id, status: 'running')
+end
+
+
+ +
+

+ + #mark_as_waiting(test_run_id, identifier, timeout) ⇒ Object + + + + + +

+ + + + +
+
+
+
+80
+81
+82
+83
+84
+85
+86
+87
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 80
+
+def mark_as_waiting(test_run_id, identifier, timeout)
+  update(
+    test_run_id,
+    status: 'waiting',
+    identifier:,
+    wait_timeout: Time.now + timeout.seconds
+  )
+end
+
+
+ +
+

+ + #results_for_test_run(test_run_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 24
+
+def results_for_test_run(test_run_id)
+  test_run_hash =
+    self.class::Model
+      .find(id: test_run_id)
+      .to_json_data(json_serializer_options)
+      .deep_symbolize_keys!
+
+  test_run_hash[:results]
+    .map! { |result| results_repo.build_entity(result) }
+end
+
+
+ +
+

+ + #status_for_test_run(id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+68
+69
+70
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 68
+
+def status_for_test_run(id)
+  self.class::Model.where(id:).get(:status)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestRuns/Model.html b/docs/docs/Inferno/Repositories/TestRuns/Model.html new file mode 100644 index 0000000000..d15c148670 --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestRuns/Model.html @@ -0,0 +1,280 @@ + + + + + + + Class: Inferno::Repositories::TestRuns::Model + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestRuns::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
ValidateRunnableReference
+
+ + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_runs.rb
+
+ +
+ + + + +

Constant Summary

+ +

Constants included + from ValidateRunnableReference

+

ValidateRunnableReference::REFERENCE_KEYS

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods included from ValidateRunnableReference

+

#check_runnable_reference, #runnable_reference_exists?

+ + +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+118
+119
+120
+121
+122
+123
+124
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 118
+
+def before_create
+  self.id = SecureRandom.uuid
+  time = Time.now
+  self.created_at ||= time
+  self.updated_at ||= time
+  super
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+111
+112
+113
+114
+115
+116
+
+
# File 'lib/inferno/repositories/test_runs.rb', line 111
+
+def validate
+  super
+  if status.present? && !Entities::TestRun::STATUS_OPTIONS.include?(status) # rubocop:disable Style/GuardClause
+    errors.add(:status, "'#{status}' is not valid")
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestSessions.html b/docs/docs/Inferno/Repositories/TestSessions.html new file mode 100644 index 0000000000..b88e2e3bbc --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestSessions.html @@ -0,0 +1,499 @@ + + + + + + + Class: Inferno::Repositories::TestSessions + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestSessions + + + +

+
+ +
+
Inherits:
+
+ Repository + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_sessions.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the TestSession entity.

+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + + + Classes: Model + + +

+ + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Repository

+

#add_non_db_entities, db, #db_params, #entity_class, #entity_class_name, #find, #handle_non_db_params, #non_db_params, table_name, #update

+ + + +
+

Instance Method Details

+ + +
+

+ + #apply_preset(test_session, preset_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+47
+48
+49
+50
+51
+52
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 47
+
+def apply_preset(test_session, preset_id)
+  preset = presets_repo.find(preset_id)
+  Utils::PresetProcessor.new(preset, test_session).processed_inputs.each do |input|
+    session_data_repo.save(input.merge(test_session_id: test_session.id))
+  end
+end
+
+
+ +
+

+ + #build_entity(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 54
+
+def build_entity(params)
+  suite_options = JSON.parse(params[:suite_options] || '[]').map do |suite_option_hash|
+    suite_option_hash.deep_symbolize_keys!
+    suite_option_hash[:id] = suite_option_hash[:id].to_sym
+    DSL::SuiteOption.new(suite_option_hash)
+  end
+
+  final_params = params.merge(suite_options:)
+  add_non_db_entities(final_params)
+  entity_class.new(final_params)
+end
+
+
+ +
+

+ + #create(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 24
+
+def create(params)
+  raw_suite_options = params[:suite_options]
+  suite_options =
+    if raw_suite_options.blank?
+      '[]'
+    else
+      JSON.generate(raw_suite_options.map(&:to_hash))
+    end
+
+  super(params.merge(suite_options:))
+end
+
+
+ +
+

+ + #json_serializer_optionsObject + + + + + +

+ + + + +
+
+
+
+15
+16
+17
+18
+19
+20
+21
+22
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 15
+
+def json_serializer_options
+  {
+    include: {
+      results: results_repo.json_serializer_options,
+      test_runs: {}
+    }
+  }
+end
+
+
+ +
+

+ + #results_for_test_session(test_session_id) ⇒ Object + + + + + +

+ + + + +
+
+
+
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 36
+
+def results_for_test_session(test_session_id)
+  test_session_hash =
+    self.class::Model
+      .find(id: test_session_id)
+      .to_json_data(json_serializer_options)
+      .deep_symbolize_keys!
+
+  test_session_hash[:results]
+    .map! { |result| results_repo.build_entity(result) }
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestSessions/Model.html b/docs/docs/Inferno/Repositories/TestSessions/Model.html new file mode 100644 index 0000000000..3b6ed8bcdb --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestSessions/Model.html @@ -0,0 +1,260 @@ + + + + + + + Class: Inferno::Repositories::TestSessions::Model + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestSessions::Model + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_sessions.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #before_createObject + + + + + +

+ + + + +
+
+
+
+75
+76
+77
+78
+79
+80
+81
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 75
+
+def before_create
+  self.id = Base62.encode(SecureRandom.random_number(2**64))
+  time = Time.now
+  self.created_at ||= time
+  self.updated_at ||= time
+  super
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+83
+84
+85
+86
+87
+88
+89
+
+
# File 'lib/inferno/repositories/test_sessions.rb', line 83
+
+def validate
+  super
+  errors.add(:test_suite_id, 'cannot be empty') if test_suite_id.blank?
+  unless test_suites_repo.exists? test_suite_id # rubocop:disable Style/GuardClause
+    errors.add(:test_suite_id, "'#{test_suite_id}' is not valid")
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/TestSuites.html b/docs/docs/Inferno/Repositories/TestSuites.html new file mode 100644 index 0000000000..cbe0e66287 --- /dev/null +++ b/docs/docs/Inferno/Repositories/TestSuites.html @@ -0,0 +1,145 @@ + + + + + + + Class: Inferno::Repositories::TestSuites + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::TestSuites + + + +

+
+ +
+
Inherits:
+
+ InMemoryRepository + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/test_suites.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the TestSuite entity.

+ + +
+
+
+ + +
+ + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from InMemoryRepository

+

all, #exists?, #find, index_by_id, #insert

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/Tests.html b/docs/docs/Inferno/Repositories/Tests.html new file mode 100644 index 0000000000..fa829bc9b0 --- /dev/null +++ b/docs/docs/Inferno/Repositories/Tests.html @@ -0,0 +1,145 @@ + + + + + + + Class: Inferno::Repositories::Tests + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Repositories::Tests + + + +

+
+ +
+
Inherits:
+
+ InMemoryRepository + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/repositories/tests.rb
+
+ +
+ +

Overview

+
+

Repository that deals with persistence for the Test entity.

+ + +
+
+
+ + +
+ + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from InMemoryRepository

+

all, #exists?, #find, index_by_id, #insert

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Repositories/ValidateRunnableReference.html b/docs/docs/Inferno/Repositories/ValidateRunnableReference.html new file mode 100644 index 0000000000..ea194d9f69 --- /dev/null +++ b/docs/docs/Inferno/Repositories/ValidateRunnableReference.html @@ -0,0 +1,371 @@ + + + + + + + Module: Inferno::Repositories::ValidateRunnableReference + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Repositories::ValidateRunnableReference + + + +

+
+ + + + + + + + + +
+
Included in:
+
Results::Model, TestRuns::Model
+
+ + + +
+
Defined in:
+
lib/inferno/repositories/validate_runnable_reference.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
REFERENCE_KEYS = + +
+
[:test_id, :test_group_id, :test_suite_id].freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #check_runnable_referenceObject + + + + + +

+ + + + +
+
+
+
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+
+
# File 'lib/inferno/repositories/validate_runnable_reference.rb', line 12
+
+def check_runnable_reference
+  present_keys = REFERENCE_KEYS.select { |reference_key| send(reference_key) }
+
+  if present_keys.length == 1
+    runnable_type = present_keys.first
+    id = values[runnable_type]
+    reference_exists = runnable_reference_exists?(runnable_type, id)
+    return if reference_exists
+
+    { key: runnable_type, message: "of #{id} does not exist" }
+  else
+    { key: :base, message: "must contain exactly one of 'test_id', 'test_group_id', or 'test_suite_id'" }
+  end
+end
+
+
+ +
+

+ + #runnable_reference_exists?(type, id) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+
+
# File 'lib/inferno/repositories/validate_runnable_reference.rb', line 27
+
+def runnable_reference_exists?(type, id)
+  repo =
+    case type
+    when :test_id
+      Inferno::Repositories::Tests.new
+    when :test_group_id
+      Inferno::Repositories::TestGroups.new
+    when :test_suite_id
+      Inferno::Repositories::TestSuites.new
+    end
+
+  repo.exists? id
+end
+
+
+ +
+

+ + #validateObject + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+
+
# File 'lib/inferno/repositories/validate_runnable_reference.rb', line 6
+
+def validate
+  super
+  reference_error_message = check_runnable_reference
+  errors.add(reference_error_message[:key], reference_error_message[:message]) if reference_error_message
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/SpecSupport.html b/docs/docs/Inferno/SpecSupport.html new file mode 100644 index 0000000000..98cb03100b --- /dev/null +++ b/docs/docs/Inferno/SpecSupport.html @@ -0,0 +1,169 @@ + + + + + + + Module: Inferno::SpecSupport + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::SpecSupport + + + Private +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/spec_support.rb
+
+ +
+ +

Overview

+
+

+ This module is part of a private API. + You should avoid using this module if possible, as it may be removed or be changed in the future. +

+

This module provides constants so that unit tests in suite repositories can +load the factories defined in inferno.

+ + +
+
+
+ + +
+ +

+ Constant Summary + collapse +

+ +
+ +
FACTORY_BOT_SUPPORT_PATH = +
+
+

+ This constant is part of a private API. + You should avoid using this constant if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+
+
File.expand_path('../../spec/support/factory_bot', __dir__).freeze
+ +
FACTORY_PATH = +
+
+

+ This constant is part of a private API. + You should avoid using this constant if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+
+
File.expand_path('../../spec/factories', __dir__).freeze
+ +
+ + + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Utils.html b/docs/docs/Inferno/Utils.html new file mode 100644 index 0000000000..801cfe04ff --- /dev/null +++ b/docs/docs/Inferno/Utils.html @@ -0,0 +1,117 @@ + + + + + + + Module: Inferno::Utils + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Utils + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/utils/migration.rb,
+ lib/inferno/utils/static_assets.rb,
lib/inferno/utils/preset_processor.rb,
lib/inferno/utils/markdown_formatter.rb,
lib/inferno/utils/middleware/request_logger.rb,
lib/inferno/utils/preset_template_generator.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Migration, PresetProcessor, PresetTemplateGenerator + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Utils/Migration.html b/docs/docs/Inferno/Utils/Migration.html new file mode 100644 index 0000000000..3b49cc5078 --- /dev/null +++ b/docs/docs/Inferno/Utils/Migration.html @@ -0,0 +1,207 @@ + + + + + + + Class: Inferno::Utils::Migration + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Utils::Migration + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/utils/migration.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #runObject + + + + + +

+ + + + +
+
+
+
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+
+
# File 'lib/inferno/utils/migration.rb', line 4
+
+def run
+  db = Inferno::Application['db.connection']
+  migration_path = File.join(Inferno::Application.root, 'lib', 'inferno', 'db', 'migrations')
+  Sequel::Migrator.run(db, migration_path)
+
+  if ENV['APP_ENV'] == 'development' # rubocop:disable Style/GuardClause
+    schema_path = File.join(Inferno::Application.root, 'lib', 'inferno', 'db', 'schema.rb')
+    db.extension :schema_dumper
+    File.open(schema_path, 'w') { |f| f.print(db.dump_schema_migration) }
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Utils/PresetProcessor.html b/docs/docs/Inferno/Utils/PresetProcessor.html new file mode 100644 index 0000000000..6bea8ae236 --- /dev/null +++ b/docs/docs/Inferno/Utils/PresetProcessor.html @@ -0,0 +1,676 @@ + + + + + + + Class: Inferno::Utils::PresetProcessor + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Utils::PresetProcessor + + + Private +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/utils/preset_processor.rb
+
+ +
+ +

Overview

+
+

+ This class is part of a private API. + You should avoid using this class if possible, as it may be removed or be changed in the future. +

+

This class determines which values to use in a preset based on the suite +options chosen in a session.

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(preset, session) ⇒ PresetProcessor + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+

Returns a new instance of PresetProcessor.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+9
+10
+11
+12
+13
+14
+15
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 9
+
+def initialize(preset, session)
+  self.preset = preset
+  self.session = session
+  self.suite = session.test_suite
+  self.suite_inputs = suite.available_inputs.transform_values(&:to_hash)
+  self.suite_options = session.suite_options
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #presetObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 7
+
+def preset
+  @preset
+end
+
+
+ + + +
+

+ + #sessionObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 7
+
+def session
+  @session
+end
+
+
+ + + +
+

+ + #suiteObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 7
+
+def suite
+  @suite
+end
+
+
+ + + +
+

+ + #suite_inputsObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 7
+
+def suite_inputs
+  @suite_inputs
+end
+
+
+ + + +
+

+ + #suite_optionsObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+ + + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 7
+
+def suite_options
+  @suite_options
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #processed_inputsObject + + + + + +

+
+

+ This method is part of a private API. + You should avoid using this method if possible, as it may be removed or be changed in the future. +

+

Returns the list of inputs which need to be persisted, with options +applied.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+19
+20
+21
+22
+23
+
+
# File 'lib/inferno/utils/preset_processor.rb', line 19
+
+def processed_inputs
+  preset.inputs
+    .map { |input| input_for_options(input) }
+    .compact
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Utils/PresetTemplateGenerator.html b/docs/docs/Inferno/Utils/PresetTemplateGenerator.html new file mode 100644 index 0000000000..91f163a83d --- /dev/null +++ b/docs/docs/Inferno/Utils/PresetTemplateGenerator.html @@ -0,0 +1,525 @@ + + + + + + + Class: Inferno::Utils::PresetTemplateGenerator + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Utils::PresetTemplateGenerator + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/utils/preset_template_generator.rb
+
+ +
+ + + + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #runnable ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute runnable.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(runnable) ⇒ PresetTemplateGenerator + + + + + +

+
+

Returns a new instance of PresetTemplateGenerator.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 6
+
+def initialize(runnable)
+  self.runnable = runnable
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #runnableObject + + + + + +

+
+

Returns the value of attribute runnable.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+4
+5
+6
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 4
+
+def runnable
+  @runnable
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #available_inputsObject + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 10
+
+def available_inputs
+  @available_inputs ||= runnable.available_inputs.transform_values(&:to_hash)
+end
+
+
+ +
+

+ + #generateObject + + + + + +

+ + + + +
+
+
+
+34
+35
+36
+37
+38
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 34
+
+def generate
+  .merge(
+    inputs:
+  )
+end
+
+
+ +
+

+ + #inputsObject + + + + + +

+ + + + +
+
+
+
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 14
+
+def inputs
+  # The rubocop rule is disabled because `each_value` returns the hash,
+  # while `values.each` will return the array of values. We want the array
+  # of values here.
+  available_inputs.values.map do |original_input|
+    {}.tap do |input|
+      input[:name] = original_input.delete(:name)
+      input[:value] = (original_input.delete(:default) if original_input.key? :default)
+      original_input.each { |key, value| input["_#{key}".to_sym] = value }
+    end
+  end
+end
+
+
+ +
+

+ + #metadataObject + + + + + +

+ + + + +
+
+
+
+27
+28
+29
+30
+31
+32
+
+
# File 'lib/inferno/utils/preset_template_generator.rb', line 27
+
+def 
+  {
+    title: "Preset for #{runnable.title}",
+    id: nil
+  }.merge(runnable.reference_hash)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web.html b/docs/docs/Inferno/Web.html new file mode 100644 index 0000000000..4499e9809e --- /dev/null +++ b/docs/docs/Inferno/Web.html @@ -0,0 +1,228 @@ + + + + + + + Module: Inferno::Web + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/router.rb,
+ lib/inferno/apps/web/application.rb,
lib/inferno/apps/web/serializers/test.rb,
lib/inferno/apps/web/serializers/input.rb,
lib/inferno/apps/web/serializers/header.rb,
lib/inferno/apps/web/serializers/preset.rb,
lib/inferno/apps/web/serializers/result.rb,
lib/inferno/apps/web/serializers/message.rb,
lib/inferno/apps/web/serializers/request.rb,
lib/inferno/apps/web/serializers/test_run.rb,
lib/inferno/apps/web/controllers/controller.rb,
lib/inferno/apps/web/serializers/serializer.rb,
lib/inferno/apps/web/serializers/test_group.rb,
lib/inferno/apps/web/serializers/test_suite.rb,
lib/inferno/apps/web/serializers/session_data.rb,
lib/inferno/apps/web/serializers/suite_option.rb,
lib/inferno/apps/web/serializers/test_session.rb,
lib/inferno/apps/web/controllers/requests/show.rb,
lib/inferno/apps/web/controllers/test_runs/show.rb,
lib/inferno/apps/web/controllers/test_runs/create.rb,
lib/inferno/apps/web/controllers/test_suites/show.rb,
lib/inferno/apps/web/controllers/test_runs/destroy.rb,
lib/inferno/apps/web/controllers/test_suites/index.rb,
lib/inferno/apps/web/controllers/test_sessions/show.rb,
lib/inferno/apps/web/controllers/test_sessions/create.rb,
lib/inferno/apps/web/serializers/hash_value_extractor.rb,
lib/inferno/apps/web/controllers/test_runs/results/index.rb,
lib/inferno/apps/web/controllers/test_sessions/client_show.rb,
lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb,
lib/inferno/apps/web/controllers/test_sessions/results/index.rb,
lib/inferno/apps/web/controllers/test_suites/check_configuration.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Controllers, Serializers + + + + +

+ + +

+ Constant Summary + collapse +

+ +
+ +
Router = +
+
+

rubocop:disable Naming/ConstantName

+ + +
+
+
+ + +
+
+
if base_path.present?
+  Hanami::Router.new do
+    scope("#{base_path}/") do
+      get '/', to: ->(_env) { [200, { 'Content-Type' => 'text/html' }, [client_page]] }
+    end
+    scope(base_path, &route_block)
+  end
+else
+  Hanami::Router.new(&route_block)
+end
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .appObject + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/apps/web/application.rb', line 6
+
+def self.app
+  Rack::Builder.new do
+    use Hanami::Middleware::BodyParser, :json
+    run Inferno::Web::Router
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers.html b/docs/docs/Inferno/Web/Controllers.html new file mode 100644 index 0000000000..1a071a7b33 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers.html @@ -0,0 +1,119 @@ + + + + + + + Module: Inferno::Web::Controllers + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/controller.rb,
+ lib/inferno/apps/web/controllers/requests/show.rb,
lib/inferno/apps/web/controllers/test_runs/show.rb,
lib/inferno/apps/web/controllers/test_runs/create.rb,
lib/inferno/apps/web/controllers/test_suites/show.rb,
lib/inferno/apps/web/controllers/test_runs/destroy.rb,
lib/inferno/apps/web/controllers/test_suites/index.rb,
lib/inferno/apps/web/controllers/test_sessions/show.rb,
lib/inferno/apps/web/controllers/test_sessions/create.rb,
lib/inferno/apps/web/controllers/test_runs/results/index.rb,
lib/inferno/apps/web/controllers/test_sessions/client_show.rb,
lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb,
lib/inferno/apps/web/controllers/test_sessions/results/index.rb,
lib/inferno/apps/web/controllers/test_suites/check_configuration.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Requests, TestRuns, TestSessions, TestSuites + + + + Classes: Controller + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/Controller.html b/docs/docs/Inferno/Web/Controllers/Controller.html new file mode 100644 index 0000000000..fde8ce94e5 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/Controller.html @@ -0,0 +1,304 @@ + + + + + + + Class: Inferno::Web::Controllers::Controller + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::Controller + + + +

+
+ +
+
Inherits:
+
+ Hanami::Action + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/controller.rb
+
+ +
+ + + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + + +
+

Class Method Details

+ + +
+

+ + .callObject + + + + + +

+ + + + +
+
+
+
+5
+6
+7
+
+
# File 'lib/inferno/apps/web/controllers/controller.rb', line 5
+
+def self.call(...)
+  new.call(...)
+end
+
+
+ +
+

+ + .resource_classObject + + + + + +

+ + + + +
+
+
+
+26
+27
+28
+
+
# File 'lib/inferno/apps/web/controllers/controller.rb', line 26
+
+def self.resource_class
+  name.split('::')[-2].singularize
+end
+
+
+ +
+

+ + .resource_nameObject + + + + + +

+ + + + +
+
+
+
+22
+23
+24
+
+
# File 'lib/inferno/apps/web/controllers/controller.rb', line 22
+
+def self.resource_name
+  name.split('::')[-2].underscore
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/Requests.html b/docs/docs/Inferno/Web/Controllers/Requests.html new file mode 100644 index 0000000000..1ceab93c8c --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/Requests.html @@ -0,0 +1,115 @@ + + + + + + + Module: Inferno::Web::Controllers::Requests + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::Requests + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/requests/show.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Show + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/Requests/Show.html b/docs/docs/Inferno/Web/Controllers/Requests/Show.html new file mode 100644 index 0000000000..16334cc8a3 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/Requests/Show.html @@ -0,0 +1,213 @@ + + + + + + + Class: Inferno::Web::Controllers::Requests::Show + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::Requests::Show + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/requests/show.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/apps/web/controllers/requests/show.rb', line 6
+
+def handle(req, res)
+  request = repo.find_full_request(req.params[:id])
+  halt 404 if request.nil?
+
+  res.body = serialize(request, view: :full)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns.html b/docs/docs/Inferno/Web/Controllers/TestRuns.html new file mode 100644 index 0000000000..c427e98ef3 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns.html @@ -0,0 +1,119 @@ + + + + + + + Module: Inferno::Web::Controllers::TestRuns + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestRuns + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/show.rb,
+ lib/inferno/apps/web/controllers/test_runs/create.rb,
lib/inferno/apps/web/controllers/test_runs/destroy.rb,
lib/inferno/apps/web/controllers/test_runs/results/index.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Results + + + + Classes: Create, Destroy, Show + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns/Create.html b/docs/docs/Inferno/Web/Controllers/TestRuns/Create.html new file mode 100644 index 0000000000..4b908ee016 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns/Create.html @@ -0,0 +1,503 @@ + + + + + + + Class: Inferno::Web::Controllers::TestRuns::Create + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestRuns::Create + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/create.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
PARAMS = + +
+
[:test_session_id, :test_suite_id, :test_group_id, :test_id].freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #create_params(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+75
+76
+77
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/create.rb', line 75
+
+def create_params(params)
+  params.to_h.slice(*PARAMS)
+end
+
+
+ +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+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
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/create.rb', line 45
+
+def handle(req, res)
+  test_session = test_sessions_repo.find(req.params[:test_session_id])
+
+  # if testsession.nil?
+  if test_runs_repo.active_test_run_for_session?(test_session.id)
+    halt 409, { error: 'Cannot run new test while another test run is in progress' }.to_json
+  end
+
+  verify_runnable(
+    repo.build_entity(create_params(req.params)).runnable,
+    req.params[:inputs],
+    test_session.suite_options
+  )
+
+  test_run = repo.create(create_params(req.params).merge(status: 'queued'))
+
+  res.body = serialize(test_run, suite_options: test_session.suite_options)
+
+  persist_inputs(req.params, test_run)
+
+  Jobs.perform(Jobs::ExecuteTestRun, test_run.id)
+rescue Sequel::ValidationFailed, Sequel::ForeignKeyConstraintViolation,
+       Inferno::Exceptions::RequiredInputsNotFound,
+       Inferno::Exceptions::NotUserRunnableException => e
+  halt 422, { errors: e.message }.to_json
+rescue StandardError => e
+  Application['logger'].error(e.full_message)
+  halt 500, { errors: e.message }.to_json
+end
+
+
+ +
+

+ + #persist_inputs(params, test_run) ⇒ Object + + + + + +

+ + + + +
+
+
+
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/create.rb', line 21
+
+def persist_inputs(params, test_run)
+  available_inputs = test_run.runnable.available_inputs
+  params[:inputs]&.each do |input_params|
+    input =
+      available_inputs
+        .find { |_, runnable_input| runnable_input.name == input_params[:name] }
+        &.last
+
+    if input.nil?
+      Inferno::Application['logger'].warn(
+        "Unknown input `#{input_params[:name]}` for #{test_run.runnable.id}: #{test_run.runnable.title}"
+      )
+      next
+    end
+
+    session_data_repo.save(
+      test_session_id: test_run.test_session_id,
+      name: input.name,
+      value: input_params[:value],
+      type: input.type
+    )
+  end
+end
+
+
+ +
+

+ + #verify_runnable(runnable, inputs, selected_suite_options) ⇒ Object + + + + + +

+
+ + + +
+
+
+ +

Raises:

+ + +
+ + + + +
+
+
+
+14
+15
+16
+17
+18
+19
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/create.rb', line 14
+
+def verify_runnable(runnable, inputs, selected_suite_options)
+  missing_inputs = runnable&.missing_inputs(inputs, selected_suite_options)
+  user_runnable = runnable&.user_runnable?
+  raise Inferno::Exceptions::RequiredInputsNotFound, missing_inputs if missing_inputs&.any?
+  raise Inferno::Exceptions::NotUserRunnableException unless user_runnable
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns/Destroy.html b/docs/docs/Inferno/Web/Controllers/TestRuns/Destroy.html new file mode 100644 index 0000000000..5eeb51897c --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns/Destroy.html @@ -0,0 +1,245 @@ + + + + + + + Class: Inferno::Web::Controllers::TestRuns::Destroy + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestRuns::Destroy + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/destroy.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/destroy.rb', line 11
+
+def handle(req, res)
+  test_run = test_runs_repo.find(req.params[:id])
+
+  if test_run.nil? || ['done', 'cancelling'].include?(test_run.status)
+    # If it doesn't exist, already finished, or currently being cancelled
+    halt 204
+  end
+
+  test_run_is_waiting = (test_run.status == 'waiting')
+  test_runs_repo.mark_as_cancelling(req.params[:id])
+
+  if test_run_is_waiting
+    waiting_result = results_repo.find_waiting_result(test_run_id: test_run.id)
+    results_repo.cancel_waiting_result(waiting_result.id, 'Test cancelled by user')
+    Jobs.perform(Jobs::ResumeTestRun, test_run.id)
+  end
+
+  res.status = 204
+rescue StandardError => e
+  Application['logger'].error(e.full_message)
+  halt 500, { errors: e.message }.to_json
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns/Results.html b/docs/docs/Inferno/Web/Controllers/TestRuns/Results.html new file mode 100644 index 0000000000..4d4179c191 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns/Results.html @@ -0,0 +1,115 @@ + + + + + + + Module: Inferno::Web::Controllers::TestRuns::Results + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestRuns::Results + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/results/index.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Index + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns/Results/Index.html b/docs/docs/Inferno/Web/Controllers/TestRuns/Results/Index.html new file mode 100644 index 0000000000..b51aa65c96 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns/Results/Index.html @@ -0,0 +1,209 @@ + + + + + + + Class: Inferno::Web::Controllers::TestRuns::Results::Index + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestRuns::Results::Index + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/results/index.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+12
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/results/index.rb', line 9
+
+def handle(req, res)
+  results = test_runs_repo.results_for_test_run(req.params[:id])
+  res.body = serialize(results)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestRuns/Show.html b/docs/docs/Inferno/Web/Controllers/TestRuns/Show.html new file mode 100644 index 0000000000..6a4b7772d3 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestRuns/Show.html @@ -0,0 +1,235 @@ + + + + + + + Class: Inferno::Web::Controllers::TestRuns::Show + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestRuns::Show + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_runs/show.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
# File 'lib/inferno/apps/web/controllers/test_runs/show.rb', line 10
+
+def handle(req, res)
+  test_run = repo.find(req.params[:id])
+  halt 404 if test_run.nil?
+
+  if req.params[:include_results] == 'true'
+    results_repo = Inferno::Repositories::Results.new
+    test_run.results =
+      if req.params[:after].present?
+        results_repo.test_run_results_after(test_run_id: test_run.id, after: Time.parse(req.params[:after]))
+      else
+        repo.results_for_test_run(test_run.id)
+      end
+  end
+
+  test_session = test_sessions_repo.find(test_run.test_session_id)
+  res.body = serialize(test_run, suite_options: test_session.suite_options)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions.html b/docs/docs/Inferno/Web/Controllers/TestSessions.html new file mode 100644 index 0000000000..12057f16a9 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions.html @@ -0,0 +1,119 @@ + + + + + + + Module: Inferno::Web::Controllers::TestSessions + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestSessions + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/show.rb,
+ lib/inferno/apps/web/controllers/test_sessions/create.rb,
lib/inferno/apps/web/controllers/test_sessions/client_show.rb,
lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb,
lib/inferno/apps/web/controllers/test_sessions/results/index.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + Modules: Results, SessionData + + + + Classes: ClientShow, Create, LastTestRun, Show + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/ClientShow.html b/docs/docs/Inferno/Web/Controllers/TestSessions/ClientShow.html new file mode 100644 index 0000000000..436558ccc7 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/ClientShow.html @@ -0,0 +1,261 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::ClientShow + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::ClientShow + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/client_show.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
CLIENT_PAGE = + +
+
ERB.new(
+  File.read(
+    File.join(
+      Inferno::Application.root, 'lib', 'inferno', 'apps', 'web', 'index.html.erb'
+    )
+  )
+).result.freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/client_show.rb', line 17
+
+def handle(req, res)
+  test_session_id = req.params[:id]
+  test_suite_id = req.params[:test_suite_id]
+
+  test_session = repo.find(test_session_id)
+  halt 404 if test_session.nil?
+
+  if test_suite_id.blank? || test_suite_id != test_session.test_suite_id
+    test_suite_id = test_session.test_suite_id
+
+    res.redirect_to "#{Inferno::Application['base_url']}/#{test_suite_id}/#{test_session_id}"
+  end
+
+  test_suite = Inferno::Repositories::TestSuites.new.find(test_suite_id)
+
+  halt 404 if test_suite.nil?
+
+  res.body = CLIENT_PAGE
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/Create.html b/docs/docs/Inferno/Web/Controllers/TestSessions/Create.html new file mode 100644 index 0000000000..ded5d979f3 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/Create.html @@ -0,0 +1,300 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::Create + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::Create + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/create.rb
+
+ +
+ + + +

+ Constant Summary + collapse +

+ +
+ +
PARAMS = + +
+
[:test_suite_id, :suite_options].freeze
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #create_params(params) ⇒ Object + + + + + +

+ + + + +
+
+
+
+27
+28
+29
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/create.rb', line 27
+
+def create_params(params)
+  params.slice(*PARAMS)
+end
+
+
+ +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/create.rb', line 11
+
+def handle(req, res)
+  params = req.params.to_h
+  params.merge!(JSON.parse(req.body.string).symbolize_keys) unless req.body.string.blank?
+
+  session = repo.create(create_params(params))
+
+  repo.apply_preset(session, params[:preset_id]) if params[:preset_id].present?
+
+  res.body = serialize(session)
+rescue Sequel::ValidationFailed, Sequel::ForeignKeyConstraintViolation => e
+  halt 422, { errors: e.message }.to_json
+rescue StandardError => e
+  Application['logger'].error(e.full_message)
+  halt 500, { errors: e.message }.to_json
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/LastTestRun.html b/docs/docs/Inferno/Web/Controllers/TestSessions/LastTestRun.html new file mode 100644 index 0000000000..c0c3878a7c --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/LastTestRun.html @@ -0,0 +1,221 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::LastTestRun + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::LastTestRun + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb', line 8
+
+def handle(req, res)
+  test_run = test_runs_repo.last_test_run(req.params[:id])
+
+  res.body =
+    if test_run.nil?
+      nil
+    else
+      Inferno::Web::Serializers::TestRun.render(test_run)
+    end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/Results.html b/docs/docs/Inferno/Web/Controllers/TestSessions/Results.html new file mode 100644 index 0000000000..c2f4649974 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/Results.html @@ -0,0 +1,115 @@ + + + + + + + Module: Inferno::Web::Controllers::TestSessions::Results + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestSessions::Results + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/results/index.rb
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: Index + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/Results/Index.html b/docs/docs/Inferno/Web/Controllers/TestSessions/Results/Index.html new file mode 100644 index 0000000000..82db3ac71e --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/Results/Index.html @@ -0,0 +1,217 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::Results::Index + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::Results::Index + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/results/index.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+12
+13
+14
+15
+16
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/results/index.rb', line 9
+
+def handle(req, res)
+  res.body =
+    if req.params[:all] == 'true'
+      serialize(test_sessions_repo.results_for_test_session(req.params[:id]))
+    else
+      serialize(repo.current_results_for_test_session(req.params[:id]))
+    end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData.html b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData.html new file mode 100644 index 0000000000..cfd642521f --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData.html @@ -0,0 +1,117 @@ + + + + + + + Module: Inferno::Web::Controllers::TestSessions::SessionData + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestSessions::SessionData + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb,
+ lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: ApplyPreset, Index + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/ApplyPreset.html b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/ApplyPreset.html new file mode 100644 index 0000000000..b9b115e561 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/ApplyPreset.html @@ -0,0 +1,309 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::SessionData::ApplyPreset + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::SessionData::ApplyPreset + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb
+
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_name

+ + + +
+

Class Method Details

+ + +
+

+ + .resource_classObject + + + + + +

+ + + + +
+
+
+
+14
+15
+16
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb', line 14
+
+def self.resource_class
+  'SessionData'
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb', line 18
+
+def handle(req, res)
+  test_session_id = req.params[:id]
+  test_session = test_sessions_repo.find(test_session_id)
+
+  if test_session.nil?
+    Application[:logger].error("Unknown test session #{test_session_id}")
+    halt 404
+  end
+
+  preset_id = req.params[:preset_id]
+  preset = presets_repo.find(preset_id)
+
+  if preset.nil?
+    Application[:logger].error("Unknown preset #{preset_id}")
+    halt 404
+  end
+
+  test_sessions_repo.apply_preset(test_session, preset_id)
+  res.status = 200
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/Index.html b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/Index.html new file mode 100644 index 0000000000..cc7521e1e0 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/SessionData/Index.html @@ -0,0 +1,275 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::SessionData::Index + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::SessionData::Index + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb
+
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_name

+ + + +
+

Class Method Details

+ + +
+

+ + .resource_classObject + + + + + +

+ + + + +
+
+
+
+11
+12
+13
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb', line 11
+
+def self.resource_class
+  'SessionData'
+end
+
+
+ +
+ +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+15
+16
+17
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb', line 15
+
+def handle(req, res)
+  res.body = serialize(session_data_repo.get_all_from_session(req.params[:id]))
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSessions/Show.html b/docs/docs/Inferno/Web/Controllers/TestSessions/Show.html new file mode 100644 index 0000000000..864f81d543 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSessions/Show.html @@ -0,0 +1,213 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSessions::Show + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSessions::Show + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_sessions/show.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/apps/web/controllers/test_sessions/show.rb', line 6
+
+def handle(req, res)
+  test_session = repo.find(req.params[:id])
+  halt 404 if test_session.nil?
+
+  res.body = serialize(test_session)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSuites.html b/docs/docs/Inferno/Web/Controllers/TestSuites.html new file mode 100644 index 0000000000..11c0c8c699 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSuites.html @@ -0,0 +1,117 @@ + + + + + + + Module: Inferno::Web::Controllers::TestSuites + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Controllers::TestSuites + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_suites/show.rb,
+ lib/inferno/apps/web/controllers/test_suites/index.rb,
lib/inferno/apps/web/controllers/test_suites/check_configuration.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: CheckConfiguration, Index, Show + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSuites/CheckConfiguration.html b/docs/docs/Inferno/Web/Controllers/TestSuites/CheckConfiguration.html new file mode 100644 index 0000000000..38a764946f --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSuites/CheckConfiguration.html @@ -0,0 +1,215 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSuites::CheckConfiguration + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSuites::CheckConfiguration + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_suites/check_configuration.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+12
+
+
# File 'lib/inferno/apps/web/controllers/test_suites/check_configuration.rb', line 6
+
+def handle(req, res)
+  test_suite = repo.find(req.params[:id])
+  halt 404 if test_suite.nil?
+
+  res.body =
+    Inferno::Web::Serializers::Message.render(test_suite.configuration_messages(force_recheck: true))
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSuites/Index.html b/docs/docs/Inferno/Web/Controllers/TestSuites/Index.html new file mode 100644 index 0000000000..bc9029c9e0 --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSuites/Index.html @@ -0,0 +1,207 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSuites::Index + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSuites::Index + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_suites/index.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(_req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/inferno/apps/web/controllers/test_suites/index.rb', line 6
+
+def handle(_req, res)
+  res.body = serialize(repo.all, view: :summary)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Controllers/TestSuites/Show.html b/docs/docs/Inferno/Web/Controllers/TestSuites/Show.html new file mode 100644 index 0000000000..9c7a726d2e --- /dev/null +++ b/docs/docs/Inferno/Web/Controllers/TestSuites/Show.html @@ -0,0 +1,213 @@ + + + + + + + Class: Inferno::Web::Controllers::TestSuites::Show + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Controllers::TestSuites::Show + + + +

+
+ +
+
Inherits:
+
+ Controller + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/controllers/test_suites/show.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Controller

+

call, resource_class, resource_name

+ + + +
+

Instance Method Details

+ + +
+

+ + #handle(req, res) ⇒ Object + + + + + +

+ + + + +
+
+
+
+6
+7
+8
+9
+10
+11
+
+
# File 'lib/inferno/apps/web/controllers/test_suites/show.rb', line 6
+
+def handle(req, res)
+  test_suite = repo.find(req.params[:id])
+  halt 404 if test_suite.nil?
+
+  res.body = serialize(test_suite, view: :full)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers.html b/docs/docs/Inferno/Web/Serializers.html new file mode 100644 index 0000000000..87de908696 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers.html @@ -0,0 +1,117 @@ + + + + + + + Module: Inferno::Web::Serializers + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: Inferno::Web::Serializers + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test.rb,
+ lib/inferno/apps/web/serializers/input.rb,
lib/inferno/apps/web/serializers/header.rb,
lib/inferno/apps/web/serializers/preset.rb,
lib/inferno/apps/web/serializers/result.rb,
lib/inferno/apps/web/serializers/message.rb,
lib/inferno/apps/web/serializers/request.rb,
lib/inferno/apps/web/serializers/test_run.rb,
lib/inferno/apps/web/serializers/serializer.rb,
lib/inferno/apps/web/serializers/test_group.rb,
lib/inferno/apps/web/serializers/test_suite.rb,
lib/inferno/apps/web/serializers/session_data.rb,
lib/inferno/apps/web/serializers/suite_option.rb,
lib/inferno/apps/web/serializers/test_session.rb,
lib/inferno/apps/web/serializers/hash_value_extractor.rb
+
+
+ +
+ +

Defined Under Namespace

+

+ + + + + Classes: HashValueExtractor, Header, Input, Message, Preset, Request, Result, Serializer, SessionData, SuiteOption, Test, TestGroup, TestRun, TestSession, TestSuite + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/HashValueExtractor.html b/docs/docs/Inferno/Web/Serializers/HashValueExtractor.html new file mode 100644 index 0000000000..e612f8893b --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/HashValueExtractor.html @@ -0,0 +1,194 @@ + + + + + + + Class: Inferno::Web::Serializers::HashValueExtractor + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::HashValueExtractor + + + +

+
+ +
+
Inherits:
+
+ Blueprinter::Extractor + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/hash_value_extractor.rb
+
+ +
+ + + + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + + +
+

Instance Method Details

+ + +
+

+ + #extract(field_name, object, _local_options, _options) ⇒ Object + + + + + +

+ + + + +
+
+
+
+5
+6
+7
+
+
# File 'lib/inferno/apps/web/serializers/hash_value_extractor.rb', line 5
+
+def extract(field_name, object, _local_options, _options)
+  object.send(field_name).values
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Header.html b/docs/docs/Inferno/Web/Serializers/Header.html new file mode 100644 index 0000000000..13a50be858 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Header.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Header + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Header + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/header.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Input.html b/docs/docs/Inferno/Web/Serializers/Input.html new file mode 100644 index 0000000000..0358a031a8 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Input.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Input + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Input + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/input.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Message.html b/docs/docs/Inferno/Web/Serializers/Message.html new file mode 100644 index 0000000000..aefd9ae513 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Message.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Message + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Message + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/message.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Preset.html b/docs/docs/Inferno/Web/Serializers/Preset.html new file mode 100644 index 0000000000..3743dfd2ca --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Preset.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Preset + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Preset + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/preset.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Request.html b/docs/docs/Inferno/Web/Serializers/Request.html new file mode 100644 index 0000000000..3547e53700 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Request.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Request + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Request + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/request.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Result.html b/docs/docs/Inferno/Web/Serializers/Result.html new file mode 100644 index 0000000000..7f5f783938 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Result.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Result + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Result + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/result.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Serializer.html b/docs/docs/Inferno/Web/Serializers/Serializer.html new file mode 100644 index 0000000000..a3b450b6c7 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Serializer.html @@ -0,0 +1,231 @@ + + + + + + + Class: Inferno::Web::Serializers::Serializer + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Serializer + + + +

+
+ +
+
Inherits:
+
+ Blueprinter::Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/serializer.rb
+
+ +
+ + + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + + +
+

Class Method Details

+ + +
+

+ + .field_present?(field_name, result, options) ⇒ Boolean + + + + + +

+
+ + + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+5
+6
+7
+8
+9
+10
+11
+12
+
+
# File 'lib/inferno/apps/web/serializers/serializer.rb', line 5
+
+def self.field_present?(field_name, result, options)
+  name = options[:name] || field_name
+  if result.respond_to?(:[])
+    result[name].present?
+  else
+    result.send(name).present?
+  end
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/SessionData.html b/docs/docs/Inferno/Web/Serializers/SessionData.html new file mode 100644 index 0000000000..be19105a9c --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/SessionData.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::SessionData + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::SessionData + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/session_data.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/SuiteOption.html b/docs/docs/Inferno/Web/Serializers/SuiteOption.html new file mode 100644 index 0000000000..676a131198 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/SuiteOption.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::SuiteOption + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::SuiteOption + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/suite_option.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/Test.html b/docs/docs/Inferno/Web/Serializers/Test.html new file mode 100644 index 0000000000..c95ba1c34f --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/Test.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::Test + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::Test + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/TestGroup.html b/docs/docs/Inferno/Web/Serializers/TestGroup.html new file mode 100644 index 0000000000..2838e98830 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/TestGroup.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::TestGroup + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::TestGroup + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test_group.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/TestRun.html b/docs/docs/Inferno/Web/Serializers/TestRun.html new file mode 100644 index 0000000000..bb4ea9cf92 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/TestRun.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::TestRun + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::TestRun + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test_run.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/TestSession.html b/docs/docs/Inferno/Web/Serializers/TestSession.html new file mode 100644 index 0000000000..4c779c8bcc --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/TestSession.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::TestSession + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::TestSession + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test_session.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/Inferno/Web/Serializers/TestSuite.html b/docs/docs/Inferno/Web/Serializers/TestSuite.html new file mode 100644 index 0000000000..fdd218e5e2 --- /dev/null +++ b/docs/docs/Inferno/Web/Serializers/TestSuite.html @@ -0,0 +1,137 @@ + + + + + + + Class: Inferno::Web::Serializers::TestSuite + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: Inferno::Web::Serializers::TestSuite + + + +

+
+ +
+
Inherits:
+
+ Serializer + +
    +
  • Object
  • + + + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/inferno/apps/web/serializers/test_suite.rb
+
+ +
+ + + + + + + + + + + + + + + +

Method Summary

+ +

Methods inherited from Serializer

+

field_present?

+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/InfernoFHIRModelExtensions.html b/docs/docs/InfernoFHIRModelExtensions.html new file mode 100644 index 0000000000..79bdb88f8a --- /dev/null +++ b/docs/docs/InfernoFHIRModelExtensions.html @@ -0,0 +1,393 @@ + + + + + + + Module: InfernoFHIRModelExtensions + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: InfernoFHIRModelExtensions + + + +

+
+ + + + + + + + + +
+
Included in:
+
FHIR::Model
+
+ + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ +

Overview

+
+

Extension to FHIR::Model. Prepending this into FHIR::Model (done below) +allows us to call super() on initialize when we overriding it, +while also defining new methods and attributes

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #source_hash ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute source_hash.

    +
    + +
  • + + +
  • + + + #source_text ⇒ Object + + + + + + + + + + + + + + + + +

    Returns the value of attribute source_text.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Instance Attribute Details

+ + + +
+

+ + #source_hashObject + + + + + +

+
+

Returns the value of attribute source_hash.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 7
+
+def source_hash
+  @source_hash
+end
+
+
+ + + +
+

+ + #source_textObject + + + + + +

+
+

Returns the value of attribute source_text.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+7
+8
+9
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 7
+
+def source_text
+  @source_text
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #initialize(hash = {}) ⇒ Object + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+12
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 9
+
+def initialize(hash = {})
+  super(hash)
+  @source_hash = hash
+end
+
+
+ +
+

+ + #source_contentsObject + + + + + +

+ + + + +
+
+
+
+14
+15
+16
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 14
+
+def source_contents
+  @source_text || JSON.generate(@source_hash)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/InfernoJson.html b/docs/docs/InfernoJson.html new file mode 100644 index 0000000000..35d92e4fc7 --- /dev/null +++ b/docs/docs/InfernoJson.html @@ -0,0 +1,195 @@ + + + + + + + Module: InfernoJson + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: InfernoJson + + + +

+
+ + + + + + + + + +
+
Included in:
+
FHIR::Json
+
+ + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ +

Overview

+
+

Extension to FHIR::Json. Prepending this into FHIR::Json (done below) +allows us to call super() on from_json

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #from_json(json) ⇒ Object + + + + + +

+ + + + +
+
+
+
+28
+29
+30
+31
+32
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 28
+
+def from_json(json)
+  resource = super(json)
+  resource&.source_text = json
+  resource
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/InfernoXml.html b/docs/docs/InfernoXml.html new file mode 100644 index 0000000000..61b14daf26 --- /dev/null +++ b/docs/docs/InfernoXml.html @@ -0,0 +1,195 @@ + + + + + + + Module: InfernoXml + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: InfernoXml + + + +

+
+ + + + + + + + + +
+
Included in:
+
FHIR::Xml
+
+ + + +
+
Defined in:
+
lib/inferno/ext/fhir_models.rb
+
+ +
+ +

Overview

+
+

Extension to FHIR::Xml. Prepending this into FHIR::Xml (done below) +allows us to call super() on from_xml

+ + +
+
+
+ + +
+ + + + + + + +

+ Instance Method Summary + collapse +

+ + + + + + +
+

Instance Method Details

+ + +
+

+ + #from_xml(xml) ⇒ Object + + + + + +

+ + + + +
+
+
+
+38
+39
+40
+41
+42
+
+
# File 'lib/inferno/ext/fhir_models.rb', line 38
+
+def from_xml(xml)
+  resource = super(xml)
+  resource&.source_text = xml
+  resource
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/_index.html b/docs/docs/_index.html new file mode 100644 index 0000000000..8668c4cc25 --- /dev/null +++ b/docs/docs/_index.html @@ -0,0 +1,1238 @@ + + + + + + + Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Documentation by YARD 0.9.28

+
+

Alphabetic Index

+ +

File Listing

+ + +
+

Namespace Listing A-Z

+ + + + + + + + +
+ + + + + + + + +
    +
  • C
  • +
      + +
    • + CLI + + (Inferno) + +
    • + +
    • + CancelException + + (Inferno::Exceptions) + +
    • + +
    • + CheckConfiguration + + (Inferno::Web::Controllers::TestSuites) + +
    • + +
    • + ClassMethods + + (Inferno::DSL::FHIRClient) + +
    • + +
    • + ClassMethods + + (Inferno::DSL::HTTPClient) + +
    • + +
    • + ClassMethods + + (Inferno::DSL::FHIRValidation) + +
    • + +
    • + ClassMethods + + (Inferno::DSL::RequestStorage) + +
    • + +
    • + Client + + (FHIR) + +
    • + +
    • + ClientShow + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    • + Configurable + + (Inferno::DSL) + +
    • + +
    • + Configuration + + (Inferno::DSL::Configurable) + +
    • + +
    • + Console + + (Inferno::CLI) + +
    • + +
    • + Controller + + (Inferno::Web::Controllers) + +
    • + +
    • + Controllers + + (Inferno::Web) + +
    • + +
    • + Create + + (Inferno::Web::Controllers::TestRuns) + +
    • + +
    • + Create + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    +
+ + +
    +
  • D
  • +
      + +
    • + DSL + + (Inferno) + +
    • + +
    • + Destroy + + (Inferno::Web::Controllers::TestRuns) + +
    • + +
    +
+ + + + + + + + + + + +
+ + + + + +
    +
  • J
  • +
      + +
    • + Jobs + + (Inferno) + +
    • + +
    • + Json + + (FHIR) + +
    • + +
    +
+ + +
    +
  • L
  • +
      + +
    • + LastTestRun + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    +
+ + +
    +
  • M
  • +
      + +
    • + Main + + (Inferno::CLI) + +
    • + +
    • + Message + + (Inferno::Entities) + +
    • + +
    • + Message + + (Inferno::Web::Serializers) + +
    • + +
    • + Messages + + (Inferno::Repositories) + +
    • + +
    • + Migration + + (Inferno::Utils) + +
    • + +
    • + Migration + + (Inferno::CLI) + +
    • + +
    • + Model + + (FHIR) + +
    • + +
    • + Model + + (Inferno::Repositories::Headers) + +
    • + +
    • + Model + + (Inferno::Repositories::Results) + +
    • + +
    • + Model + + (Inferno::Repositories::Messages) + +
    • + +
    • + Model + + (Inferno::Repositories::Requests) + +
    • + +
    • + Model + + (Inferno::Repositories::TestRuns) + +
    • + +
    • + Model + + (Inferno::Repositories::SessionData) + +
    • + +
    • + Model + + (Inferno::Repositories::TestSessions) + +
    • + +
    +
+ + + + + + + + + + + +
    +
  • R
  • +
      + +
    • + Repositories + + (Inferno) + +
    • + +
    • + Repository + + (Inferno::Repositories) + +
    • + +
    • + Request + + (Inferno::Entities) + +
    • + +
    • + Request + + (Inferno::Web::Serializers) + +
    • + +
    • + RequestStorage + + (Inferno::DSL) + +
    • + +
    • + Requests + + (Inferno::Repositories) + +
    • + +
    • + Requests + + (Inferno::Web::Controllers) + +
    • + +
    • + RequiredInputsNotFound + + (Inferno::Exceptions) + +
    • + +
    • + Result + + (Inferno::Entities) + +
    • + +
    • + Result + + (Inferno::Web::Serializers) + +
    • + +
    • + Results + + (Inferno::Repositories) + +
    • + +
    • + Results + + (Inferno::DSL) + +
    • + +
    • + Results + + (Inferno::Web::Controllers::TestRuns) + +
    • + +
    • + Results + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    • + ResumeTestRun + + (Inferno::Jobs) + +
    • + +
    • + Runnable + + (Inferno::DSL) + +
    • + +
    +
+ + +
+ + +
    +
  • S
  • +
      + +
    • + Serializer + + (Inferno::Web::Serializers) + +
    • + +
    • + Serializers + + (Inferno::Web) + +
    • + +
    • + Services + + (Inferno::CLI) + +
    • + +
    • + SessionData + + (Inferno::Entities) + +
    • + +
    • + SessionData + + (Inferno::Repositories) + +
    • + +
    • + SessionData + + (Inferno::Web::Serializers) + +
    • + +
    • + SessionData + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    • + Show + + (Inferno::Web::Controllers::Requests) + +
    • + +
    • + Show + + (Inferno::Web::Controllers::TestRuns) + +
    • + +
    • + Show + + (Inferno::Web::Controllers::TestSuites) + +
    • + +
    • + Show + + (Inferno::Web::Controllers::TestSessions) + +
    • + +
    • + SkipException + + (Inferno::Exceptions) + +
    • + +
    • + SpecSupport + + (Inferno) + +
    • + +
    • + Suite + + (Inferno::CLI) + +
    • + +
    • + SuiteInputTemplate + + (Inferno::CLI) + +
    • + +
    • + SuiteOption + + (Inferno::DSL) + +
    • + +
    • + SuiteOption + + (Inferno::Web::Serializers) + +
    • + +
    • + Suites + + (Inferno::CLI) + +
    • + +
    +
+ + +
    +
  • T
  • +
      + +
    • + Test + + (Inferno::Entities) + +
    • + +
    • + Test + + (Inferno::Web::Serializers) + +
    • + +
    • + TestGroup + + (Inferno::Entities) + +
    • + +
    • + TestGroup + + (Inferno::Web::Serializers) + +
    • + +
    • + TestGroups + + (Inferno::Repositories) + +
    • + +
    • + TestResultException + + (Inferno::Exceptions) + +
    • + +
    • + TestRun + + (Inferno::Entities) + +
    • + +
    • + TestRun + + (Inferno::Web::Serializers) + +
    • + +
    • + TestRuns + + (Inferno::Repositories) + +
    • + +
    • + TestRuns + + (Inferno::Web::Controllers) + +
    • + +
    • + TestSession + + (Inferno::Entities) + +
    • + +
    • + TestSession + + (Inferno::Web::Serializers) + +
    • + +
    • + TestSessions + + (Inferno::Repositories) + +
    • + +
    • + TestSessions + + (Inferno::Web::Controllers) + +
    • + +
    • + TestSuite + + (Inferno::Entities) + +
    • + +
    • + TestSuite + + (Inferno::Web::Serializers) + +
    • + +
    • + TestSuites + + (Inferno::Repositories) + +
    • + +
    • + TestSuites + + (Inferno::Web::Controllers) + +
    • + +
    • + Tests + + (Inferno::Repositories) + +
    • + +
    +
+ + + + + + + + +
    +
  • W
  • +
      + +
    • + WaitException + + (Inferno::Exceptions) + +
    • + +
    • + Web + + (Inferno) + +
    • + +
    +
+ + +
    +
  • X
  • +
      + +
    • + Xml + + (FHIR) + +
    • + +
    +
+ +
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/docs/docs/class_list.html b/docs/docs/class_list.html new file mode 100644 index 0000000000..cd259d6f32 --- /dev/null +++ b/docs/docs/class_list.html @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + Class List + + + +
+
+

Class List

+ + + +
+ + +
+ + diff --git a/docs/docs/css/common.css b/docs/docs/css/common.css new file mode 100644 index 0000000000..cf25c45233 --- /dev/null +++ b/docs/docs/css/common.css @@ -0,0 +1 @@ +/* Override this file with custom rules */ \ No newline at end of file diff --git a/docs/docs/css/full_list.css b/docs/docs/css/full_list.css new file mode 100644 index 0000000000..fa35982429 --- /dev/null +++ b/docs/docs/css/full_list.css @@ -0,0 +1,58 @@ +body { + margin: 0; + font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; + font-size: 13px; + height: 101%; + overflow-x: hidden; + background: #fafafa; +} + +h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } +.clear { clear: both; } +.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } +#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } +#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } +#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } +#full_list ul { padding: 0; } +#full_list li { padding: 0; margin: 0; list-style: none; } +#full_list li .item { padding: 5px 5px 5px 12px; } +#noresults { padding: 7px 12px; background: #fff; } +#content.insearch #noresults { margin-left: 7px; } +li.collapsed ul { display: none; } +li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } +li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } +li { color: #888; cursor: pointer; } +li.deprecated { text-decoration: line-through; font-style: italic; } +li.odd { background: #f0f0f0; } +li.even { background: #fafafa; } +.item:hover { background: #ddd; } +li small:before { content: "("; } +li small:after { content: ")"; } +li small.search_info { display: none; } +a, a:visited { text-decoration: none; color: #05a; } +li.clicked > .item { background: #05a; color: #ccc; } +li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } +li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } +li.collapsed.clicked a.toggle { background-position: top right; } +#search input { border: 1px solid #bbb; border-radius: 3px; } +#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } +#full_list_nav a, #nav a:visited { color: #358; } +#full_list_nav a:hover { background: transparent; color: #5af; } +#full_list_nav span:after { content: ' | '; } +#full_list_nav span:last-child:after { content: ''; } + +#content h1 { margin-top: 0; } +li { white-space: nowrap; cursor: normal; } +li small { display: block; font-size: 0.8em; } +li small:before { content: ""; } +li small:after { content: ""; } +li small.search_info { display: none; } +#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } +#content.insearch #search { background-position: center right; } +#search input { width: 110px; } + +#full_list.insearch ul { display: block; } +#full_list.insearch .item { display: none; } +#full_list.insearch .found { display: block; padding-left: 11px !important; } +#full_list.insearch li a.toggle { display: none; } +#full_list.insearch li small.search_info { display: block; } diff --git a/docs/docs/css/style.css b/docs/docs/css/style.css new file mode 100644 index 0000000000..eb0dbc86f6 --- /dev/null +++ b/docs/docs/css/style.css @@ -0,0 +1,497 @@ +html { + width: 100%; + height: 100%; +} +body { + font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; + font-size: 13px; + width: 100%; + margin: 0; + padding: 0; + display: flex; + display: -webkit-flex; + display: -ms-flexbox; +} + +#nav { + position: relative; + width: 100%; + height: 100%; + border: 0; + border-right: 1px dotted #eee; + overflow: auto; +} +.nav_wrap { + margin: 0; + padding: 0; + width: 20%; + height: 100%; + position: relative; + display: flex; + display: -webkit-flex; + display: -ms-flexbox; + flex-shrink: 0; + -webkit-flex-shrink: 0; + -ms-flex: 1 0; +} +#resizer { + position: absolute; + right: -5px; + top: 0; + width: 10px; + height: 100%; + cursor: col-resize; + z-index: 9999; +} +#main { + flex: 5 1; + -webkit-flex: 5 1; + -ms-flex: 5 1; + outline: none; + position: relative; + background: #fff; + padding: 1.2em; + padding-top: 0.2em; + box-sizing: border-box; +} + +@media (max-width: 920px) { + .nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; } + #resizer { display: none; } + #nav { + z-index: 9999; + background: #fff; + display: none; + position: absolute; + top: 40px; + right: 12px; + width: 500px; + max-width: 80%; + height: 80%; + overflow-y: scroll; + border: 1px solid #999; + border-collapse: collapse; + box-shadow: -7px 5px 25px #aaa; + border-radius: 2px; + } +} + +@media (min-width: 920px) { + body { height: 100%; overflow: hidden; } + #main { height: 100%; overflow: auto; } + #search { display: none; } +} + +#main img { max-width: 100%; } +h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } +h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } +h1.title { margin-bottom: 10px; } +h1.alphaindex { margin-top: 0; font-size: 22px; } +h2 { + padding: 0; + padding-bottom: 3px; + border-bottom: 1px #aaa solid; + font-size: 1.4em; + margin: 1.8em 0 0.5em; + position: relative; +} +h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } +h2 small a { + display: block; + height: 20px; + border: 1px solid #aaa; + border-bottom: 0; + border-top-left-radius: 5px; + background: #f8f8f8; + position: relative; + padding: 2px 7px; +} +.clear { clear: both; } +.inline { display: inline; } +.inline p:first-child { display: inline; } +.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } +.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { + color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; + border-radius: 4px; +} +.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } +.docstring h1 { font-size: 1.2em; } +.docstring h2 { font-size: 1.1em; } +.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } +.summary_desc .object_link a, .docstring .object_link a { + font-family: monospace; font-size: 1.05em; + color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; + border-radius: 4px; +} +.rdoc-term { padding-right: 25px; font-weight: bold; } +.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } +.summary_desc pre.code .object_link a, .docstring pre.code .object_link a { + padding: 0px; background: inherit; color: inherit; border-radius: inherit; +} + +/* style for */ +#filecontents table, .docstring table { border-collapse: collapse; } +#filecontents table th, #filecontents table td, +.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } +#filecontents table tr:nth-child(odd), +.docstring table tr:nth-child(odd) { background: #eee; } +#filecontents table tr:nth-child(even), +.docstring table tr:nth-child(even) { background: #fff; } +#filecontents table th, .docstring table th { background: #fff; } + +/* style for
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/docs/docs/method_list.html b/docs/docs/method_list.html new file mode 100644 index 0000000000..0b82ae11bc --- /dev/null +++ b/docs/docs/method_list.html @@ -0,0 +1,3155 @@ + + + + + + + + + + + + + + + + + + Method List + + + +
+
+

Method List

+ + + +
+ +
    + + +
  • +
    + #== + Inferno::Entities::Input +
    +
  • + + +
  • +
    + #able_to_refresh? + FHIR::Client +
    +
  • + + +
  • +
    + #access_token + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #active_test_run_for_session? + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #add_message + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #add_non_db_entities + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + all + Inferno::Repositories::InMemoryRepository +
    +
  • + + +
  • +
    + app + Inferno::Web +
    +
  • + + +
  • +
    + #apply_preset + Inferno::Repositories::TestSessions +
    +
  • + + +
  • +
    + #assert + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_resource_type + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_response_content_type + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_response_status + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_valid_bundle_entries + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_valid_http_uri + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_valid_json + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #assert_valid_resource + Inferno::DSL::Assertions +
    +
  • + + +
  • +
    + #available_inputs + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + #bearer_token + Inferno::DSL::FHIRClientBuilder +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::Headers::Model +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::Results::Model +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::Messages::Model +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::Requests::Model +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::TestRuns::Model +
    +
  • + + +
  • +
    + #before_create + Inferno::Repositories::TestSessions::Model +
    +
  • + + +
  • +
    + block + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #build + Inferno::CLI::Services +
    +
  • + + +
  • +
    + #build_entity + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #build_entity + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #build_entity + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #build_entity + Inferno::Repositories::TestSessions +
    +
  • + + +
  • +
    + call + Inferno::Web::Controllers::Controller +
    +
  • + + +
  • +
    + #cancel_waiting_result + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + check_configuration + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #check_runnable_reference + Inferno::Repositories::ValidateRunnableReference +
    +
  • + + +
  • +
    + #client + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #client_id + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #client_secret + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #config + Inferno::DSL::Configurable +
    +
  • + + +
  • +
    + #configuration + Inferno::DSL::Configurable::Configuration +
    +
  • + + +
  • +
    + #console + Inferno::CLI::Main +
    +
  • + + +
  • +
    + #create + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #create + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #create + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #create + Inferno::Repositories::TestSessions +
    +
  • + + +
  • +
    + #create_params + Inferno::Web::Controllers::TestRuns::Create +
    +
  • + + +
  • +
    + #create_params + Inferno::Web::Controllers::TestSessions::Create +
    +
  • + + +
  • +
    + #created_at + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #created_at + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #created_at + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #created_at + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #created_at + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #current_results_for_test_session + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + current_results_for_test_session + Inferno::Repositories::Results::Model +
    +
  • + + +
  • +
    + #current_results_for_test_session_and_runnables + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + current_results_for_test_session_and_runnables + Inferno::Repositories::Results::Model +
    +
  • + + +
  • +
    + current_results_sql + Inferno::Repositories::Results::Model +
    +
  • + + +
  • +
    + db + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #db_params + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #delete + Inferno::DSL::HTTPClient +
    +
  • + + +
  • +
    + #describe + Inferno::CLI::Suite +
    +
  • + + +
  • +
    + #description + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #description + Inferno::DSL::SuiteOption +
    +
  • + + +
  • +
    + #direction + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #entity_class + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #entity_class_name + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #entity_class_name + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #exclude_message + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + #exists? + Inferno::Repositories::InMemoryRepository +
    +
  • + + +
  • +
    + #expires_in + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #extract + Inferno::Web::Serializers::HashValueExtractor +
    +
  • + + +
  • +
    + #fhir_client + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_client + Inferno::DSL::FHIRClient::ClassMethods +
    +
  • + + +
  • +
    + #fhir_create + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_delete + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_get_capability_statement + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_history + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_operation + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_patch + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_read + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_search + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_transaction + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_update + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + #fhir_vread + Inferno::DSL::FHIRClient +
    +
  • + + +
  • +
    + field_present? + Inferno::Web::Serializers::Serializer +
    +
  • + + +
  • +
    + #find + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #find + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #find + Inferno::Repositories::InMemoryRepository +
    +
  • + + +
  • +
    + #find_full_request + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #find_latest_waiting_by_identifier + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #find_named_request + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #find_validator + Inferno::DSL::FHIRValidation +
    +
  • + + +
  • +
    + #find_validator + Inferno::DSL::FHIRValidation::ClassMethods +
    +
  • + + +
  • +
    + #find_waiting_result + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #from_json + InfernoJson +
    +
  • + + +
  • +
    + #from_xml + InfernoXml +
    +
  • + + +
  • +
    + #generate + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + #get + Inferno::DSL::HTTPClient +
    +
  • + + +
  • +
    + #get_all_from_session + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + group + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + group + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + groups + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + groups + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::Requests::Show +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestRuns::Show +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestRuns::Create +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSuites::Show +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestRuns::Destroy +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSuites::Index +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::Show +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::Create +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestRuns::Results::Index +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::ClientShow +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::LastTestRun +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::Results::Index +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSuites::CheckConfiguration +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::SessionData::Index +
    +
  • + + +
  • +
    + #handle + Inferno::Web::Controllers::TestSessions::SessionData::ApplyPreset +
    +
  • + + +
  • +
    + #handle_non_db_params + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #headers + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #headers + Inferno::DSL::FHIRClientBuilder +
    +
  • + + +
  • +
    + #headers + Inferno::DSL::HTTPClientBuilder +
    +
  • + + +
  • +
    + #http_client + Inferno::DSL::HTTPClient +
    +
  • + + +
  • +
    + #http_client + Inferno::DSL::HTTPClient::ClassMethods +
    +
  • + + +
  • +
    + #id + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #id + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #id + Inferno::DSL::SuiteOption +
    +
  • + + +
  • +
    + #id + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #id + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #id + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #id + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #id + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #identifier + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #index + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #index + Inferno::Entities::Request +
    +
  • + + +
  • +
    + index_by_id + Inferno::Repositories::InMemoryRepository +
    +
  • + + +
  • +
    + #info + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::ParentNotLoadedException +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::ValidatorNotFoundException +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::RequiredInputsNotFound +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::NotUserRunnableException +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::UnknownAttributeException +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::UnknownSessionDataType +
    +
  • + + +
  • +
    + #initialize + Inferno::Exceptions::BadSessionDataType +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Input +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Entity +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Preset +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #initialize + InfernoFHIRModelExtensions +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #initialize + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #initialize + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #initialize + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + input + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #input + Inferno::DSL::InputOutputHandling +
    +
  • + + +
  • +
    + #input_instructions + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #input_json + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #input_order + Inferno::DSL::InputOutputHandling +
    +
  • + + +
  • +
    + #input_template + Inferno::CLI::Suite +
    +
  • + + +
  • +
    + #inputs + Inferno::DSL::Configurable::Configuration +
    +
  • + + +
  • +
    + #inputs + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #inputs + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + #insert + Inferno::Repositories::InMemoryRepository +
    +
  • + + +
  • +
    + #insert_from_file + Inferno::Repositories::Presets +
    +
  • + + +
  • +
    + #json_serializer_options + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #json_serializer_options + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #json_serializer_options + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #json_serializer_options + Inferno::Repositories::TestSessions +
    +
  • + + +
  • +
    + #last_test_run + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + links + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #list_options + Inferno::DSL::SuiteOption +
    +
  • + + +
  • +
    + #load + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #logs + Inferno::CLI::Services +
    +
  • + + +
  • +
    + #makes_request + Inferno::DSL::RequestStorage::ClassMethods +
    +
  • + + +
  • +
    + #mark_as_cancelling + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #mark_as_done + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #mark_as_no_longer_waiting + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #mark_as_running + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #mark_as_waiting + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #message + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #messages + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #messages_for_result + Inferno::Repositories::Messages +
    +
  • + + +
  • +
    + #metadata + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + #migrate + Inferno::CLI::Main +
    +
  • + + +
  • +
    + #name + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #name + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #name + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #name + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #need_to_refresh? + FHIR::Client +
    +
  • + + +
  • +
    + #non_db_params + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #oauth_credentials + FHIR::Client +
    +
  • + + +
  • +
    + #oauth_credentials + Inferno::DSL::FHIRClientBuilder +
    +
  • + + +
  • +
    + #omit + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #omit_if + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #optional + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #optional? + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #optional? + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #options + Inferno::DSL::Configurable::Configuration +
    +
  • + + +
  • +
    + #output + Inferno::Entities::Test +
    +
  • + + +
  • +
    + output + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #output + Inferno::DSL::InputOutputHandling +
    +
  • + + +
  • +
    + #output_json + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #outputs + Inferno::DSL::Configurable::Configuration +
    +
  • + + +
  • +
    + #parent + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #pass + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #pass_if + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #pass_waiting_result + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + perform + Inferno::Jobs +
    +
  • + + +
  • +
    + #perform + Inferno::Jobs::ResumeTestRun +
    +
  • + + +
  • +
    + #perform + Inferno::Jobs::ExecuteTestRun +
    +
  • + + +
  • +
    + #perform_additional_validation + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + #persist_inputs + Inferno::Web::Controllers::TestRuns::Create +
    +
  • + + +
  • +
    + #post + Inferno::DSL::HTTPClient +
    +
  • + + +
  • +
    + #preset + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #presets_for_suite + Inferno::Repositories::Presets +
    +
  • + + +
  • +
    + #processed_inputs + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #pull + Inferno::CLI::Services +
    +
  • + + +
  • +
    + #query_parameters + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #receives_request + Inferno::DSL::RequestStorage::ClassMethods +
    +
  • + + +
  • +
    + #refresh_token + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #request + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #request + Inferno::DSL::RequestStorage +
    +
  • + + +
  • +
    + #request? + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #request_body + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #request_header + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #request_headers + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #request_id + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #requests + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #requests + Inferno::DSL::Configurable::Configuration +
    +
  • + + +
  • +
    + #requests + Inferno::DSL::RequestStorage +
    +
  • + + +
  • +
    + #requests_for_result + Inferno::Repositories::Requests +
    +
  • + + +
  • +
    + #required + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #required? + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #required? + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #required_suite_options + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #requirements + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + #resource + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #resource + Inferno::DSL::RequestStorage +
    +
  • + + +
  • +
    + resource_class + Inferno::Web::Controllers::Controller +
    +
  • + + +
  • +
    + resource_class + Inferno::Web::Controllers::TestSessions::SessionData::Index +
    +
  • + + +
  • +
    + resource_class + Inferno::Web::Controllers::TestSessions::SessionData::ApplyPreset +
    +
  • + + +
  • +
    + #resource_is_valid? + Inferno::DSL::FHIRValidation +
    +
  • + + +
  • +
    + #resource_is_valid? + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + resource_name + Inferno::Web::Controllers::Controller +
    +
  • + + +
  • +
    + #response + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #response + Inferno::DSL::RequestStorage +
    +
  • + + +
  • +
    + #response? + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #response_body + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #response_header + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #response_headers + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::AssertionException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::SkipException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::OmitException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::PassException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::WaitException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::CancelException +
    +
  • + + +
  • +
    + #result + Inferno::Exceptions::ErrorInValidatorException +
    +
  • + + +
  • +
    + #result + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #result + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #result_for_test_run + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #result_id + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #result_id + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #result_message + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #result_message + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #results + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #results + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #results_for_test_run + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #results_for_test_session + Inferno::Repositories::TestSessions +
    +
  • + + +
  • +
    + #resume_test_route + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #route + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + routes + Inferno +
    +
  • + + +
  • +
    + #run + Inferno::CLI::Suites +
    +
  • + + +
  • +
    + #run + Inferno::Utils::Migration +
    +
  • + + +
  • +
    + #run + Inferno::CLI::Console +
    +
  • + + +
  • +
    + #run + Inferno::CLI::Migration +
    +
  • + + +
  • +
    + #run + Inferno::CLI::SuiteInputTemplate +
    +
  • + + +
  • +
    + run_as_group + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + run_as_group? + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + #runnable + Inferno::Entities::HasRunnable +
    +
  • + + +
  • +
    + #runnable + Inferno::DSL::FHIRClientBuilder +
    +
  • + + +
  • +
    + #runnable + Inferno::DSL::HTTPClientBuilder +
    +
  • + + +
  • +
    + #runnable + Inferno::Utils::PresetTemplateGenerator +
    +
  • + + +
  • +
    + #runnable_reference_exists? + Inferno::Repositories::ValidateRunnableReference +
    +
  • + + +
  • +
    + #save + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #scratch + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #serialize_checkbox_input + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #serialize_oauth_credentials_input + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #session + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #short_description + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + short_id + Inferno::Entities::Test +
    +
  • + + +
  • +
    + short_id + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + #short_title + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #skip + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #skip_if + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #source_contents + InfernoFHIRModelExtensions +
    +
  • + + +
  • +
    + #source_hash + InfernoFHIRModelExtensions +
    +
  • + + +
  • +
    + #source_text + InfernoFHIRModelExtensions +
    +
  • + + +
  • +
    + #start + Inferno::CLI::Main +
    +
  • + + +
  • +
    + #start + Inferno::CLI::Services +
    +
  • + + +
  • +
    + #status + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #status + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #status_for_test_run + Inferno::Repositories::TestRuns +
    +
  • + + +
  • +
    + #stop + Inferno::CLI::Services +
    +
  • + + +
  • +
    + #stream + Inferno::DSL::HTTPClient +
    +
  • + + +
  • +
    + #suite + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #suite_inputs + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + suite_option + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #suite_option_requirements + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #suite_options + Inferno::Entities::Test +
    +
  • + + +
  • +
    + suite_options + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #suite_options + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #suite_options + Inferno::Utils::PresetProcessor +
    +
  • + + +
  • +
    + #suite_options_hash + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + suite_summary + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #suites + Inferno::CLI::Main +
    +
  • + + +
  • +
    + table_name + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #test + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + test + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + #test_count + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_group + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_group + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_group_id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_group_id + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_id + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_run_id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_run_results_after + Inferno::Repositories::Results +
    +
  • + + +
  • +
    + #test_runs + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #test_session + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_session_id + Inferno::Entities::Test +
    +
  • + + +
  • +
    + #test_session_id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_session_id + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #test_session_id + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_session_id + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #test_suite + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_suite + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_suite + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #test_suite_id + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #test_suite_id + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #test_suite_id + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + tests + Inferno::Entities::TestGroup +
    +
  • + + +
  • +
    + #title + Inferno::DSL::Runnable +
    +
  • + + +
  • +
    + #title + Inferno::DSL::SuiteOption +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::Input +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::Entity +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #to_hash + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #token_retrieval_time + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #token_url + Inferno::DSL::OAuthCredentials +
    +
  • + + +
  • +
    + #type + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #type + Inferno::Entities::Message +
    +
  • + + +
  • +
    + #update + Inferno::Repositories::Repository +
    +
  • + + +
  • +
    + #updated_at + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #updated_at + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #updated_at + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #updated_at + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #updated_at + Inferno::Entities::TestSession +
    +
  • + + +
  • +
    + #url + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #url + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + #url + Inferno::DSL::FHIRClientBuilder +
    +
  • + + +
  • +
    + #url + Inferno::DSL::HTTPClientBuilder +
    +
  • + + +
  • +
    + #uses_request + Inferno::DSL::RequestStorage::ClassMethods +
    +
  • + + +
  • +
    + #validate + Inferno::DSL::FHIRValidation::Validator +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::Headers::Model +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::Results::Model +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::Messages::Model +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::TestRuns::Model +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::TestSessions::Model +
    +
  • + + +
  • +
    + #validate + Inferno::Repositories::ValidateRunnableReference +
    +
  • + + +
  • +
    + #validator + Inferno::DSL::FHIRValidation::ClassMethods +
    +
  • + + +
  • +
    + #value + Inferno::Entities::Header +
    +
  • + + +
  • +
    + #value + Inferno::DSL::SuiteOption +
    +
  • + + +
  • +
    + #value + Inferno::Entities::SessionData +
    +
  • + + +
  • +
    + #value_to_persist + Inferno::Repositories::SessionData +
    +
  • + + +
  • +
    + #verb + Inferno::Entities::Request +
    +
  • + + +
  • +
    + #verify_runnable + Inferno::Web::Controllers::TestRuns::Create +
    +
  • + + +
  • +
    + version + Inferno::Entities::TestSuite +
    +
  • + + +
  • +
    + #wait + Inferno::DSL::Results +
    +
  • + + +
  • +
    + #wait_timeout + Inferno::Entities::TestRun +
    +
  • + + +
  • +
    + #waiting? + Inferno::Entities::Result +
    +
  • + + +
  • +
    + #warning + Inferno::Entities::Test +
    +
  • + + + +
+
+ + diff --git a/docs/docs/top-level-namespace.html b/docs/docs/top-level-namespace.html new file mode 100644 index 0000000000..ef4d7ffdef --- /dev/null +++ b/docs/docs/top-level-namespace.html @@ -0,0 +1,110 @@ + + + + + + + Top Level Namespace + + — Documentation by YARD 0.9.28 + + + + + + + + + + + + + + + + + + + +
+ + +

Top Level Namespace + + + +

+
+ + + + + + + + + + + +
+ +

Defined Under Namespace

+

+ + + Modules: FHIR, Inferno, InfernoFHIRModelExtensions, InfernoJson, InfernoXml + + + + +

+ + + + + + + + + +
+ + + +
+ + \ No newline at end of file