Class AbstractJsonProctorLoader

    • Constructor Detail

      • AbstractJsonProctorLoader

        public AbstractJsonProctorLoader​(@Nonnull
                                         java.lang.Class<?> cls,
                                         @Nonnull
                                         ProctorSpecification specification,
                                         @Nonnull
                                         javax.el.FunctionMapper functionMapper)
      • AbstractJsonProctorLoader

        public AbstractJsonProctorLoader​(@Nonnull
                                         java.lang.Class<?> cls,
                                         @Nonnull
                                         ProctorSpecification specification,
                                         @Nonnull
                                         javax.el.FunctionMapper functionMapper,
                                         @Nonnull
                                         IdentifierValidator identifierValidator)
    • Method Detail

      • loadJsonTestMatrix

        @CheckForNull
        protected TestMatrixArtifact loadJsonTestMatrix​(@Nonnull
                                                        java.io.Reader reader)
                                                 throws java.io.IOException,
                                                        TestMatrixOutdatedException
        Load a part of test matrix json file as TestMatrixArtifact. Parsed test matrix json has the following structure: { "audit": { ... // audit fields }, "tests": { "test1": { ... // test definition fields }, "test2": { ... }, ... } }. The value for "tests" includes all of proctor tests, so it is very huge. In order to avoid big memory footprints, this method only loads referenced tests, which are determined by requiredTests and dynamicFilters, by iterating over entries under the value for "tests".
        Parameters:
        reader -
        Returns:
        TestMatrixArtifact with referenced test definitions only
        Throws:
        java.io.IOException
        TestMatrixOutdatedException
      • extractReferencedTests

        protected java.util.Map<java.lang.String,​ConsumableTestDefinition> extractReferencedTests​(@Nonnull
                                                                                                        com.fasterxml.jackson.core.JsonParser jsonParser)
                                                                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • isTestReferenced

        protected boolean isTestReferenced​(java.lang.String testName,
                                           ConsumableTestDefinition testDefinition)