|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.viewers.Viewer sofya.viewers.TestSelectionViewer
public class TestSelectionViewer
The TestSelectionViewer is used to display the list of selected tests in a human readable format, or as a list for further processing.
Usage:
java sofya.viewers.TestSelectionViewer <test_file>
[-t t|l|s] [OutputFile]
-t t|l|s : Format of the output.
OutputFile : Redirect output of viewer
to OutputFile
Field Summary | |
---|---|
static int |
LIST
Constant flag for list format. |
static int |
STATISTICAL
Constant flag for statistical format. |
static int |
TABULAR
Constant flag for tabular format. |
Fields inherited from class sofya.viewers.Viewer |
---|
destStream, inputFile, LINE_SEP, outputFile, stdin |
Constructor Summary | |
---|---|
TestSelectionViewer(java.lang.String inputFile,
int format)
Standard constructor, creates a TestSelectionViewer to display the selected tests in the specified format. |
|
TestSelectionViewer(java.lang.String inputFile,
java.io.OutputStream stream,
int format)
Standard constructor, creates a TestSelectionViewer to display the selected tests in the specified format to the specified output stream. |
|
TestSelectionViewer(java.lang.String inputFile,
java.lang.String outputFile,
int format)
Standard constructor, creates a TestSelectionViewer to display the selected tests in the specified format to the specified output file. |
|
TestSelectionViewer(TestSelectionHandler tsHandler)
Standard constructor, creates a TestSelectionViewer to display the selected tests in the specified format. |
Method Summary | |
---|---|
int |
getOutputFormat()
Gets the output format currently set to be used. |
boolean |
isVerbose()
Gets whether headers are to be printed for methods that did not contribute any selected tests. |
static void |
main(java.lang.String[] argv)
Entry point for TestSelectionViewer. |
void |
print(java.io.PrintWriter stream)
Prints the test selection information to the specified stream. |
void |
setOutputFormat(int format)
Sets the output format to be used. |
void |
setVerbose(boolean enable)
Sets whether headers should be printed for methods that did not contribute any selected tests. |
Methods inherited from class sofya.viewers.Viewer |
---|
print, printMethodName, rightJust, setInputFile, setOutputFile, setOutputStream, sizeString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TABULAR
public static final int STATISTICAL
public static final int LIST
Constructor Detail |
---|
public TestSelectionViewer(java.lang.String inputFile, int format)
inputFile
- Name of the test selection file to be displayed.format
- Output format to be used. Should be one of the
following:
TestSelectionViewer.TABULAR
TestSelectionViewer.STATISTICAL
TestSelectionViewer.LIST
public TestSelectionViewer(java.lang.String inputFile, java.lang.String outputFile, int format) throws SameFileNameException, java.io.IOException
inputFile
- Name of the test selection file to be displayed.outputFile
- Name of the file to which the viewer output should
be written.format
- Output format to be used. Should be one of the
following:
TestSelectionViewer.TABULAR
TestSelectionViewer.STATISTICAL
TestSelectionViewer.LIST
SameFileNameException
java.io.IOException
public TestSelectionViewer(java.lang.String inputFile, java.io.OutputStream stream, int format)
inputFile
- Name of the test selection file to be displayed.stream
- Stream to which the viewer output should be written.format
- Output format to be used. Should be one of the
following:
TestSelectionViewer.TABULAR
TestSelectionViewer.STATISTICAL
TestSelectionViewer.LIST
public TestSelectionViewer(TestSelectionHandler tsHandler)
The TestSelectionHandler passed to this constructor must have useful test selection data available prior to calling a print method.
tsHandler
- TestSelectionHandler for the file of interest.Method Detail |
---|
public void setOutputFormat(int format)
format
- Output format to be used. Should be one of the
following:
TestSelectionViewer.TABULAR
TestSelectionViewer.STATISTICAL
TestSelectionViewer.LIST
java.lang.IllegalArgumentException
- If the specified output format is
not recognized.public int getOutputFormat()
setOutputFormat(int)
).public void setVerbose(boolean enable)
enable
- true
to enable printing of headers for
non-contributing methods, false
otherwise.public boolean isVerbose()
true
if printing of headers for non-contributing
methods is enabled, false
otherwise.public void print(java.io.PrintWriter stream) throws java.io.IOException
print
in class Viewer
stream
- Stream to which the test selection information should be
written.
java.io.IOException
- If there is an error writing to the stream, or
creating the output file, if applicable.public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |