calliope-edu / CalliopEO_AstroPi

MIT License
1 stars 2 forks source link

Add a menu to testing.sh to be able to define an ordered list of testcases to be executed #30

Closed rzbrk closed 3 years ago

rzbrk commented 3 years ago

When executed testing.sh shall create a list of available test cases from the directory testcases/ with trailing number, like:

 1    01_first_testcase
 2    02_second_testcase
 3    03_third_testcase

Then ask the user to specify the sequence of test cases by entering the numbers from the first column (use the bash function readarray).

Option: Expand user inputs like 8 3-6 1 to 8 3 4 5 6 1 or 1 4- to 1 4 5 6 7 8 or -3 to 1 2 3.

rzbrk commented 3 years ago

I know, we discussed this. But honestly, this is not easy to implement. Especially expanding ranges. I would give the implementation of the test cases priority over this feature.

With the tc_confirm setting in testing.conf the script will ask you before executing any test case. This way, you can manually skip individual test cases. The order of test cases is determined by the name of the test case file name.

Amerlander commented 3 years ago

I added a whiptail multiselect with all tests preselected. To run only a single test is not nice, becouse you will have to unselect each, but it provides a nice preview of what tests are available and what is selected.

image

Amerlander commented 3 years ago

also this does not enable to change the order of the tests.

rzbrk commented 3 years ago

Awesome! This looks great and is very handy!

For reordering the tests we would need to have an interactive gui, e.g. with arrow buttons to move a selected testcase up or down.

I think, we can live with the current state. I cannot think of a requirement to specify an alternative sequence of testcases. All testcases are defined in a way that they are completely independent from each other.

If - for what reason ever - a specific sequence is needed this person can call ./testing.sh multiple times and select individual tests. ;)

Great job, @Amerlander!