Closed rzbrk closed 3 years ago
Testing is still work in progress. I do development in the feature branch testing of my fork.
I just did a single test file with the following cases in one file:
I made the tests at first for checking the testcases and improve the manual tests on the astropi, so unlike in your tests in your fork there is no automated proof and it is all in a single test file.
I just had one issue with the testing.sh: It doesnt read the testing.conf
and also in line 24 for testcase in ${tc_folder%/}/*.*; do
, it fails to read this as phat and results in /*.*
instead of ./testcases/*.*
. So hard coding it to for testcase in ./testcases/*.*; do
worked.
Mmh, strange ...
This only happens on my system, if executing testing.sh
from outside the directory testing.sh
is in. Is this the case for you? I made a change to ensure the script is executed from the right directory, see #26.
Is now working in my test on the astro pi.
Currently, there is no straight forward way to test CalliopEO.py. Unfortunately, the script or functions are not object-oriented which makes the usage of tools like
unittest
a little tricky.I would recommend to establish a bash script for testing, which we could name
testing.sh
. This script itself can source a couple of files in a subdirectory. The very first file to source could be a config file (00_config.sh
) to set up any bash variable needed for testing. For every test case, we can establish a dedicated fileNN_testcase_name.sh
, whereNN
is a number defining the order in which the test cases are executed andtestcase_name
can be replaced by a short name for the test case.The test cases can be:
Each bash file for a test case should contain the following:
echo
commands.What are your thoughts?