Tests
How to
Testing is done using the unittest module. Use the below command to run all the tests:
make runtest
Testing strategies
Test the expected format of the output files.
Use of random input values and calculated output values to validate the test.
Sometimes special cases are run, and some input values which do not make a difference to the output are made random. Eg: In case of a equatorial orbit, the latitude of the location seen by a nadir-pointed sensor will always be 0 deg, irrespective of the chosen orbital altitude, raan, ta which can be used as random values.
In cases where the random input values do influence the output, the expected output is calculated (as much as possible) from methods, code other than used by the
OrbitPypackage. Sometimes the chosen validation methods are approximate in which case an approximately equal to assertion tests are used.
Using known inputs, and outputs from external sources (eg: literature, other orbital simulation softwares such as GMAT, STK).
Use results from a previous run (corresponding to an older version of the software) as truth data.
Run tests after making any revisions to the code. This helps to check that the revisions do not have unintended effects on the results.
Refer to the page Validation for description of the validation tests.