-
Notifications
You must be signed in to change notification settings - Fork 4
unitTest
EranOfek edited this page Nov 18, 2023
·
4 revisions
The unitTest objective is to test existing code in order to make sure it is correct and operational after changes to other pieces of code were done.
We usually keep a unitTest function for each class or subpackage. The unitTest of classes is always a static method of the class and it is kept in a separate file. For example, the unitTest of some packages and classes:
AstroCatalog.unitTest
celestial.coo.unitTest
When you write a unitTest:
- The unitTest function help should contain information about its nature - i.e., unitTest of celestial.coo
- Do not use message logging in unitTest
- The purpose of the unitTest function is to fail with some meaningful error if the unitTest failed and to return true if it was successful.
- The outcome of the unitTest should be deterministic (e.g., independent of a random number generator).
- The unitTest should not take long to run.
- The unitTest should test common and basic operations.
- Always test the uniTest in a linux OS - This is our default OS.
To run all unitTest functions use:
R=tools.unitTester.testAll()
In the following table, we keep notes on the status of unitTest functions.
AstroPack/MAATv2 - MATLAB Astronomy & Astrophysics Toolbox
- AstroPack/MAATv2 content
- Install
- Coding conventions
- Getting Started
- List of all functions, classes, and methods
- startup file
- configuration files
- New functions and changes log
- Pipeline tasks
- Requested Functionality
- unitTest
- [Introduction to image processing]
- The imUtil package
- The imProc package
- [The lcUtil package]
- [Spectra processing]
- AstroSpec class
- [imProc.spec]
- [pipelines]
- Generate a calibrated source catalog from an image
- Forced photometry
- [Astrometry-related topics]
- Registration and coaddition
- [Image subtraction and transient detection]
- Asteroids ephemeris and matching to sources
- Quering an AstroDb database
- [The celestial package - coordinates and epehemerides]
- [celestial.coo]
- celestial.time
- celestial.map
- celestial.Kepler
- celestial.SolarSys
- celestial.INPOP
- [celestial.ephem]
- celestial.OrbitalEl
- celestial.conjunctions
- [celestial.Targets]
- [celestial.scheduling]
- celestial.earth
- [celestial.htm]
- [celestial.pm]
- [celestial.meterors]
- [celestial.rigidBody]
- celestial.search
- [celestial.stars]
- celestial.proj
- celestial.grid
- [The astro package]
- [Cosmology]
- [Spectra]
- [Gravitational Lensing]
- [binary]
- extinction
- [occultation]
- stars
- [supernova]
- constant - physical constants
- convert - physical units conversions
- [timeSeries - Time series analysis tools]
- [arma]
- [bin]
- [detrend]
- [fit]
- [fold]
- [interp]
- [period]
- [rand]
- [stat]
- [time]
- [xcorr]
- [timeDelay]
- [Virtual observatory and catalogs]
- [Plotting tools]
- [General tools]
- tools package
- www package
- [io package]
- [Database]
- [Low-level classes]
- [Base and Component]
- [Msg loggers and syslog]
- [Developers]