Class OpenMetadataConformanceWorkbenchWorkPad

java.lang.Object
org.odpi.openmetadata.conformance.beans.OpenMetadataConformanceWorkbenchWorkPad
Direct Known Subclasses:
PerformanceWorkPad, PlatformConformanceWorkPad, RepositoryConformanceWorkPad

public abstract class OpenMetadataConformanceWorkbenchWorkPad extends Object
OpenMetadataConformanceWorkbenchWorkPad provides the super type for the work pad used by each of the conformance workbenches.
  • Field Details

    • workbenchId

      protected String workbenchId
    • workbenchName

      protected String workbenchName
    • workbenchVersionNumber

      protected String workbenchVersionNumber
    • workbenchDocURL

      protected String workbenchDocURL
    • localServerUserId

      protected String localServerUserId
    • localServerPassword

      protected String localServerPassword
    • tutName

      protected String tutName
    • tutType

      protected String tutType
    • maxPageSize

      protected int maxPageSize
    • workbenchComplete

      protected boolean workbenchComplete
    • testEvidenceList

      protected List<OpenMetadataConformanceTestEvidence> testEvidenceList
    • testCaseMap

      protected Map<String,OpenMetadataTestCase> testCaseMap
    • lastActive

      protected Date lastActive
  • Constructor Details

    • OpenMetadataConformanceWorkbenchWorkPad

      public OpenMetadataConformanceWorkbenchWorkPad(String workbenchId, String workbenchName, String workbenchVersionNumber, String workbenchDocURL, String localServerUserId, String localServerPassword, String tutType, int maxPageSize)
      Constructor takes properties that are common to all work pads.
      Parameters:
      workbenchId - unique identifier of the workbench.
      workbenchName - display name for the workbench.
      workbenchVersionNumber - version number of the workbench.
      workbenchDocURL - link to documentation for the workbench.
      localServerUserId - local server's userId
      localServerPassword - local server's password
      tutType - type of technology to test
      maxPageSize - maximum number of results to return on any one call.
  • Method Details

    • getWorkbenchId

      public String getWorkbenchId()
      Return the unique identifier of the workbench.
      Returns:
      string id
    • getWorkbenchName

      public String getWorkbenchName()
      Return the name of this workbench.
      Returns:
      name
    • getWorkbenchVersionNumber

      public String getWorkbenchVersionNumber()
      Return the version number that determines the conformance level.
      Returns:
      string version number
    • getWorkbenchDocURL

      public String getWorkbenchDocURL()
      Return the URL to the documentation for this workbench.
      Returns:
      url
    • getLocalServerUserId

      public String getLocalServerUserId()
      Return the userId for this server.
      Returns:
      userId
    • getWorkbenchStatus

      public OpenMetadataConformanceWorkbenchStatus getWorkbenchStatus()
      Return the completion state of the workbench.
      Returns:
      boolean - whether workbench is complete
    • setWorkbenchComplete

      public void setWorkbenchComplete()
      Set the completion state of the workbench to true. This signifies that the synchronous portion of the tests have completed. The workbench may still be processing asynchronous events which trigger further tests.
    • getLocalServerPassword

      public String getLocalServerPassword()
      Return the password for this server.
      Returns:
      password
    • getMaxPageSize

      public int getMaxPageSize()
      Return the maximum number of records that should be returned on a REST call.
      Returns:
      int
    • getProfileNames

      public abstract List<String> getProfileNames()
      Accumulate the set of profile names registered with this work pad.
      Returns:
      the profile names
    • getProfileResults

      public abstract OpenMetadataConformanceProfileResults getProfileResults(String profileName)
      Accumulate the evidences for a given profile.
      Parameters:
      profileName - for which to obtain the detailed results
      Returns:
      the test evidence organized by profile and requirement within profile
    • getProfileResults

      public abstract List<OpenMetadataConformanceProfileResults> getProfileResults()
      Accumulate the evidences for each profile
      Returns:
      the test evidence organized by profile and requirement within profile
    • getProfileSummaries

      public abstract List<OpenMetadataConformanceProfileSummary> getProfileSummaries()
      Accumulate the summarized evidences for each profile
      Returns:
      the summarized test evidence organized by profile and requirement within profile
    • processEvidence

      protected OpenMetadataConformanceStatus processEvidence(List<OpenMetadataConformanceTestEvidence> testEvidenceList, List<OpenMetadataConformanceTestEvidence> positiveTestEvidence, List<OpenMetadataConformanceTestEvidence> negativeTestEvidence)
      From the test evidence list, set up the positive and negative evidence lists and return the conformance status based on the evidence.
      Parameters:
      testEvidenceList - list of evidence
      positiveTestEvidence - extracted positive evidence
      negativeTestEvidence - extracted negative evidence
      Returns:
      conformance status
    • addSuccessfulCondition

      public void addSuccessfulCondition(Integer profileId, Integer requirementId, String testCaseId, String testCaseName, String testCaseDocumentationURL, String assertionId, String methodName, Long elapsedTime)
      Log that a test case has reported that a condition has been met for a specific requirement.
      Parameters:
      profileId - profile for the requirement
      requirementId - identifier of the requirement
      testCaseId - identifier of the reporting test case
      testCaseName - name of the reporting test case
      testCaseDocumentationURL - link to the test case documentation.
      assertionId - details of the assertion
      methodName - the method that the condition tests
      elapsedTime - of the test executing (in milliseconds)
    • addUnsuccessfulCondition

      public void addUnsuccessfulCondition(Integer profileId, Integer requirementId, String testCaseId, String testCaseName, String testCaseDocumentationURL, String assertionId, String methodName, Long elapsedTime)
      Log that a test case has reported that a condition has not been met for a specific requirement.
      Parameters:
      profileId - profile for the requirement
      requirementId - identifier of the requirement
      testCaseId - identifier of the reporting test case
      testCaseName - name of the reporting test case
      testCaseDocumentationURL - link to the test case documentation.
      assertionId - details of the assertion
      methodName - the method that the condition tests
      elapsedTime - of the test executing (in milliseconds)
    • addNotSupportedCondition

      public void addNotSupportedCondition(Integer profileId, Integer requirementId, String testCaseId, String testCaseName, String testCaseDocumentationURL, String assertionId)
      Log that a test case has reported the correct response to a non-supported function.
      Parameters:
      profileId - profile for the requirement
      requirementId - identifier of the requirement
      testCaseId - identifier of the reporting test case
      testCaseName - name of the reporting test case
      testCaseDocumentationURL - link to the test case documentation.
      assertionId - details of the assertion
    • addDiscoveredProperty

      public void addDiscoveredProperty(Integer profileId, Integer requirementId, String testCaseId, String testCaseName, String testCaseDocumentationURL, String propertyName, Object propertyValue)
      Log a property discovered by a test case.
      Parameters:
      profileId - profile for the requirement
      requirementId - identifier of the requirement
      testCaseId - identifier of the reporting test case
      testCaseName - name of the reporting test case
      testCaseDocumentationURL - link to the test case documentation.
      propertyName - name of the property
      propertyValue - value of the property
    • registerActivity

      public void registerActivity()
      Register any activity to help with working out when the workbench has quiesced. Any kind of activity is significant, especially if beyond the end of the synchronous tests.
    • toString

      public String toString()
      toString() JSON-style
      Overrides:
      toString in class Object
      Returns:
      string description