Class SigTest

java.lang.Object
ee.jakarta.tck.ws.rs.signaturetest.SigTest

public abstract class SigTest extends Object
This class should be extended by TCK developers that wish to create a set of signature tests that run outside of any Java EE container. Developers must implement the getPackages method to specify which packages are to be tested by the signature test framework.
  • Field Details

  • Constructor Details

    • SigTest

      public SigTest()
  • Method Details

    • getSigTestDriver

      protected SignatureTestDriver getSigTestDriver()

      Returns a SignatureTestDriver appropriate for the particular TCK (using API check or the Signature Test Framework).

      The default implementation of this method will return a SignatureTestDriver that will use API Check. TCK developers can override this to return the desired SignatureTestDriver for their TCK.

    • getPackageFile

      protected String getPackageFile()
      Returns the location of the package list file. This file denotes the valid sub-packages of any package being verified in the signature tests. Sub-classes are free to override this method if they use a different path or filename for their package list file. Most users should be able to use this default implementation.
      Returns:
      String The path and name of the package list file.
    • getMapFile

      protected String getMapFile()
      Returns the path and name of the signature map file that this TCK uses when conducting signature tests. The signature map file tells the signature test framework which API versions of tested packages to use. To keep this code platform independent, be sure to use the File.separator string (or the File.separatorChar) to denote path separators. Sub-classes are free to override this method if they use a different path or filename for their signature map file. Most users should be able to use this default implementation.
      Returns:
      String The path and name of the signature map file.
    • getRepositoryDir

      protected String getRepositoryDir()
      Returns the directory that contains the signature files. Sub-classes are free to override this method if they use a different signature repository directory. Most users should be able to use this default implementation.
      Returns:
      String The signature repository directory.
    • getUnlistedOptionalPackages

      protected ArrayList<String> getUnlistedOptionalPackages()
      Returns the list of Optional Packages which are not accounted for. By 'unlisted optional' we mean the packages which are Optional to the technology under test that the user did NOT specifically list for testing. For example, with Java EE 7 implementation, a user could additionally opt to test a JSR-88 technology along with the Java EE technology. But if the user chooses NOT to list this optional technology for testing (via ts.jte javaee.level prop) then this method will return the packages for JSR-88 technology with this method call.

      This is useful for checking for a scenarios when a user may have forgotten to identify a whole or partial technology implementation and in such cases, Java EE platform still requires testing it.

      Any partial or complete impl of an unlistedOptionalPackage sends up a red flag indicating that the user must also pass tests for this optional technology area.

      Sub-classes are free to override this method if they use a different signature repository directory. Most users should be able to use this default implementation - which means that there was NO optional technology packages that need to be tested.

      Returns:
      ArrayList
    • getPackages

      protected abstract String[] getPackages()
      Returns the list of packages that must be tested by the siganture test framework. TCK developers must implement this method in their signature test sub-class.
      Returns:
      String A list of packages that the developer wishes to test using the signature test framework.
    • getClasses

      protected String[] getClasses()
      Returns an array of individual classes that must be tested by the signature test framwork. TCK developers may override this method when this functionality is needed. Most will only need package level granularity.
      Returns:
      an Array of Strings containing the individual classes the framework should test. The default implementation of this method returns a zero-length array.
    • setup

      public void setup()
      Called by the test framework to initialize this test. The method simply retrieves some state information that is necessary to run the test when when the test framework invokes the run method (actually the test1 method).
      Parameters:
      args - List of arguments passed to this test.
      p - Properties specified by the test user and passed to this test via the test framework.
      Throws:
      SigTest.Fault - When an error occurs reading or saving the state information processed by this method.
    • cleanup

      public void cleanup() throws SigTest.Fault
      Called by the test framework to cleanup any outstanding state. This method simply passes the message through to the utility class so the implementation can be used by both framework base classes.
      Throws:
      SigTest.Fault - When an error occurs cleaning up the state of this test.