public class NewTester
extends java.lang.Object
Using the standard Ant script all testing is done in a temp subdirectory. The comparison.settings and inputtest1.fits file are copied from the source/skyview/test directory into this directory. The actual tests are run using JUnit. JUnit invokes all methods with the Test annotation. If an assertion in any method fails it continues with the next test.
This program does not do many unit tests of individual functions, nor does it test for bugs that may come from particular combinations of features selected by the user. Additional tests can easily be added as appropriate however.
The Ant build script that compiles that
Java code will run this script with
ant -f build/skyview.xml test
. To run only some tests the user
can set the environment variables MIN_TEST and MAX_TEST and only the tests
that are between these values will be run. Tests are organized in groups with
each test numbered. The following ranges define the category associated with
each test.
Changes to SkyView code will inevitably create changes in the reference values even when there is no error, e.g., just the text in a graphic overlay. Tests will fail when the comparison.settings file has a value for the sum of the appropriate file, and the generated file does not match. To update these, simply delete the corresponding entry in comparison.settings. If a regression test is run and there is no entry in the comparison.settings file, a line is written to the upd.settings file. After the test is run, this file can be concatenated to the comparison.settings (in the source area) for future regression testing.
Constructor and Description |
---|
NewTester() |
Modifier and Type | Method and Description |
---|---|
double |
fitsSum(java.lang.String file) |
static void |
initialize() |
int |
jpegSum(java.lang.String jpegName) |
static void |
main(java.lang.String[] args) |
void |
testCatalogs() |
void |
testContour() |
void |
testCoordinates() |
void |
testGrid() |
void |
testLUT() |
void |
testPixel() |
void |
testPlot() |
void |
testPosit() |
void |
testProjections() |
void |
testQLFormats() |
void |
testRGB() |
void |
testRotation() |
void |
testSamplers() |
void |
testScale() |
void |
testScaling() |
void |
testSettings() |
void |
testSmoothing() |
void |
testSurveys() |
public static void main(java.lang.String[] args)
public static void initialize()
public void testSurveys() throws java.lang.Exception
java.lang.Exception
public int jpegSum(java.lang.String jpegName) throws java.lang.Exception
java.lang.Exception
public double fitsSum(java.lang.String file)
public void testSamplers() throws java.lang.Exception
java.lang.Exception
public void testProjections() throws java.lang.Exception
java.lang.Exception
public void testCoordinates() throws java.lang.Exception
java.lang.Exception
public void testRotation() throws java.lang.Exception
java.lang.Exception
public void testScale() throws java.lang.Exception
java.lang.Exception
public void testPixel() throws java.lang.Exception
java.lang.Exception
public void testSettings()
public void testPosit() throws java.lang.Exception
java.lang.Exception
public void testQLFormats() throws java.lang.Exception
java.lang.Exception
public void testGrid() throws java.lang.Exception
java.lang.Exception
public void testContour() throws java.lang.Exception
java.lang.Exception
public void testSmoothing() throws java.lang.Exception
java.lang.Exception
public void testCatalogs() throws java.lang.Exception
java.lang.Exception
public void testLUT() throws java.lang.Exception
java.lang.Exception
public void testRGB() throws java.lang.Exception
java.lang.Exception
public void testScaling() throws java.lang.Exception
java.lang.Exception
public void testPlot() throws java.lang.Exception
java.lang.Exception