skyview.test
Class BasicTester
java.lang.Object
skyview.test.BasicTester
public class BasicTester
- extends java.lang.Object
This class does basic testing of the features of
the SkyView JAR. It primarily does end-to-end
tests of SkyView requests and does a regression of the
results against previous values. The results of the
previous tests are loaded using a Settings file,
comparison.settings.
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.
- 1-99
- Checking individual surveys.
- 101-199
- Samplers
- 201-299
- Projections
- 301-399
- Coordinate Systems
- 401-499
- Rotation and Translation
- 501-599
- Pixel scale
- 601-699
- Image sizes in pixels
- 701-799
- Settings control
- 801-899
- Different ways of specifying positions
- 901-999
- Quicklook image formats
- 1001-1099
- Gridding
- 1101-1199
- Contouring
- 1201-1299
- Smoothing
- 1301-1399
- Catalogs
- 1401-1499
- Look up tables
- 1501-1599
- RGB images
- 1600-1601
- Image intensity scaling (log, linear, sqrt)
- 1701-1799
- Plot parameters
Additional tests can be added to any of these, and new categories
of tests can be added. Most of the tests <900 test the data
in the resulting FITS image. Most of the higher tests test the data
in the quicklook image.
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicTester
public BasicTester()
testSurveys
public void testSurveys()
throws java.lang.Exception
- Throws:
java.lang.Exception
jpegSum
public int jpegSum(java.lang.String jpegName,
int nx,
int ny)
throws java.lang.Exception
- Throws:
java.lang.Exception
testSamplers
public void testSamplers()
throws java.lang.Exception
- Throws:
java.lang.Exception
testProjections
public void testProjections()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCoordinates
public void testCoordinates()
throws java.lang.Exception
- Throws:
java.lang.Exception
testRotation
public void testRotation()
throws java.lang.Exception
- Throws:
java.lang.Exception
testScale
public void testScale()
throws java.lang.Exception
- Throws:
java.lang.Exception
testPixel
public void testPixel()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSettings
public void testSettings()
testPosit
public void testPosit()
throws java.lang.Exception
- Throws:
java.lang.Exception
testQLFormats
public void testQLFormats()
throws java.lang.Exception
- Throws:
java.lang.Exception
testGrid
public void testGrid()
throws java.lang.Exception
- Throws:
java.lang.Exception
testContour
public void testContour()
throws java.lang.Exception
- Throws:
java.lang.Exception
testSmoothing
public void testSmoothing()
throws java.lang.Exception
- Throws:
java.lang.Exception
testCatalogs
public void testCatalogs()
throws java.lang.Exception
- Throws:
java.lang.Exception
testLUT
public void testLUT()
throws java.lang.Exception
- Throws:
java.lang.Exception
testRGB
public void testRGB()
throws java.lang.Exception
- Throws:
java.lang.Exception
testScaling
public void testScaling()
throws java.lang.Exception
- Throws:
java.lang.Exception
testPlot
public void testPlot()
throws java.lang.Exception
- Throws:
java.lang.Exception