saker.java.testing Documentation TaskDoc JavaDoc Packages
public final class JavaTestInvocationResult implements Externalizable
Data class holding the result of a Java test invocation.

Clients should use the appropriate setter methods to initialize the results.

The test invocation results provides information about the enumerated file system directories. This is in order for the build task to be able to track the expected file contents of a directory. Note that the class doesn't include information about the accessed files. The file accesses by the test case are tracked by the testing instrumentation on-the-fly.

Constructors
public
public
JavaTestInvocationResult(boolean successful)
Creates a new instance and sets the result of the test.
Methods
public NavigableSet<String>
Gets the class dependent classes that the test case uses.
public Integer
Gets the exit code of the test case.
public String
Gets the test failure information.
public NavigableMap<String, ? extends NavigableSet<String>>
Gets the listed directories by the test case.
public boolean
Gets if the test execution was successful.
public void
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.
public void
Sets the class dependencies of the test case.
public void
Sets the test exit code.
public void
setFailureInformation(String failureInformation)
Sets the textual failure information of the test.
public void
Sets the listed directories by the test case.
public void
setSuccessful(boolean successful)
Sets the test result.
public void
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
public JavaTestInvocationResult(boolean successful)
Creates a new instance and sets the result of the test.
successfultrue if the testing was successful.
Gets the class dependent classes that the test case uses.

The result contains the internal names of the classes.

The set of class internal names or null if not set.
Gets the exit code of the test case.

The exit code may be set to non-null to signal that the test exited with an exit code. This is usually done if the test runner calls System.exit(int), and the instrumentation catches this call rather than killing the JVM process.

If the test is set to failed, and the tester build task was configured to accept the test exit code, then the test fill be considered as successful.

The test exit code or null if not none.
Gets the test failure information.

The failure information contains arbitrary string contents about the test case that can be displayed to the user if the test failed. It's usually the standard out and error of the test case.

The information or null.
Gets the listed directories by the test case.

The returned map contains the directory paths as keys mapped to the enumerated file names by the test case.

The listed directories or null if not set.
public boolean isSuccessful()
Gets if the test execution was successful.

If the test case wasn't set as successful, it may be still considered as succeeded if the exit code is accepted by the test build task configuration.

true if the test was successful.
Overridden from: Externalizable
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.
inthe stream to read data from in order to restore the object
IOExceptionif I/O errors occur
ClassNotFoundExceptionIf the class for an object being restored cannot be found.
public void setDependentClasses(NavigableSet<String> dependentClasses)
Sets the class dependencies of the test case.
dependentClassesThe class dependencies. The elements should be the internal names of the classes.
public void setExitCode(Integer exitCode)
Sets the test exit code.
exitCodeThe exit code.
public void setFailureInformation(String failureInformation)
Sets the textual failure information of the test.
failureInformationThe failure information.
public void setListedDirectories(NavigableMap<String, ? extends NavigableSet<String>> listedDirectories)
Sets the listed directories by the test case.
listedDirectoriesThe listed directories.
public void setSuccessful(boolean successful)
Sets the test result.
successfultrue if the test was successful.
public void writeExternal(ObjectOutput out) throws IOException
Overridden from: Externalizable
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
outthe stream to write the object to
IOExceptionIncludes any I/O exceptions that may occur