Package skyview.test

Class NewTester

java.lang.Object
skyview.test.NewTester

public class NewTester
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.x
Checking individual surveys.
2.x
Samplers and Mosaickers
3.x
Projections
4.x
Coordinate Systems
5.x
Rotation and Translation
6.x
Pixel scale
7.x
Image sizes in pixels
8.x
Settings
9.x
Different ways of specifying positions
10.x
Quicklook image formats
11.x
Gridding
12.x
Contouring
13.x
Smoothing
14.x
Catalogs
15.x
Look up tables
16.x
RGB images
17.x
Image intensity scaling (log, linear, sqrt)
18.x
Plot parameters
Additional tests can be added to any of these, and new categories of tests can be added. Most of the tests < 10.x 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.

  • Constructor Details

  • Method Details

    • main

      public static void main​(java.lang.String[] args)
    • initialize

      public static void initialize()
    • testSurveys

      public void testSurveys() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • jpegSum

      public int jpegSum​(java.lang.String jpegName) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • fitsSum

      public double fitsSum​(java.lang.String file)
    • 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