Class SigTestEE
- Direct Known Subclasses:
ConcurrencySignatureTestRunner
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
Called by the test framework to cleanup any outstanding state.protected String[]
getClasses
(String vehicleName) Returns an array of individual classes that must be tested by the signature test framework within the specified vehicle.protected String
Returns the path and name of the signature map file that this TCK uses when conducting signature tests.protected String
Returns the location of the package list file.protected abstract String[]
getPackages
(String vehicleName) Returns the list of packages that must be tested by the signature test framework.protected String
Returns the directory that contains the signature files.protected SignatureTestDriver
Returns aSignatureTestDriver
appropriate for the particular TCK (using API check or the Signature Test Framework).Returns the list of Optional Packages which are not accounted for.void
setup()
Called by the test framework to initialize this test.void
Called by the test framework to run this test.
-
Constructor Details
-
SigTestEE
public SigTestEE()
-
-
Method Details
-
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 desiredSignatureTestDriver
for their TCK. -
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
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
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
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
Returns the list of packages that must be tested by the signature test framework. TCK developers must implement this method in their signature test sub-class.- Parameters:
vehicleName
- The name of the vehicle the signature tests should be conducted in. Valid values for this property are ejb, servlet, ejb and appclient.- Returns:
- String[] A list of packages that the developer wishes to test using
the signature test framework. If the developer does not wish to test
any package signatures in the specified vehicle this method should
return null.
Note, The proper way to insure that this method is not called with a vehicle name that has no package signatures to verify is to modify the vehicle.properties in the $TS_HOME/src directory. This file provides a mapping that maps test directories to a list of vehicles where the tests in those directory should be run. As an extra precaution users are encouraged to return null from this method if the specified vehicle has no package signatures to be verified within it.
-
getClasses
Returns an array of individual classes that must be tested by the signature test framework within the specified vehicle. TCK developers may override this method when this functionality is needed. Most will only need package level granularity.
If the developer doesn't wish to test certain classes within a particular vehicle, the implementation of this method must return a zero-length array.
- Parameters:
vehicleName
- The name of the vehicle the signature tests should be conducted in. Valid values for this property are ejb, servlet, ejb and appclient.- Returns:
- an Array of Strings containing the individual classes the framework should test based on the specifed vehicle. The default implementation of this method returns a zero-length array no matter the vehicle specified.
-
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). -
signatureTest
Called by the test framework to run this test. This method utilizes the state information set in the setup method to run the signature tests. All signature test code resides in the utility class so it can be reused by the signature test framework base classes.- Throws:
SigTestEE.Fault
- When an error occurs executing the signature tests.
-
cleanup
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:
SigTestEE.Fault
- When an error occurs cleaning up the state of this test.
-