-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop integration tests (and migration framework) #1253
Comments
One further nice consequence is: We can drop the migration framework. |
The plan sounds good but I have one fear. We used unit tests to check individually very small pieces, using very simple inputs. However, I believe that the integration tests use larger data sets. I think it is safe to keep tests that are bigger than the unit tests. Maybe we could have unit tests doing equivalent things to the ones that are done currently in the integration tests? Including reading data from input files, etc. |
I agree on this argument in principle, @sonney2k also made it. However, this is not what we do. Have a look into the integration tests, most of them do just call 1 function or 2 and then dump all objects to disc. In this state, all existing integration tests can easily replaced by unit. If we wanted this type of big-picture behaviour, we should But in fact, I dont even see the need for that since in Shogun, we do not have big parts of framework interacting with each other. Most things can be tested with units, can you think of an example? |
@karlnapf you know my opinion about this. Nevertheless, please make a table of pros/cons in the wiki with the facts. |
I can do that in here, everyone can edit this entry: Pro:
Cons:
|
I agree our examples are neither tests nor examples thus I agree we should drop them and write some real examples. |
This was finally done in #2938 |
All of our python examples are currently abused for testing. This works in the way that they return some results (numbers, SGObjects) of the underlying program.
Those results are stored to files. When running the testsuite, all examples are executed once again and it is checked whether the results match the files (planned: up to a certain accuracy).
These files have to be changed very often, basically whenever we touch any related code:
1.) When we change an algorithm or an example, these results might change -- even-though the algorithm still works in a correct way, for example if we optimised an algorithm.
2.) Even worse, if we change an SGObject that is stored as an integration test, for example add a member to the class, then the integration test fails.
There is another downside: Examples are abused as tests. Shogun mostly lacks documentation and examples. However, most python examples do not do a good job in illustrating things since they are just computing a kernel matrix and return it. No help at all. Users are confused by this since it is hard for them to find information they need.
In addition, tests should be done a low level, i.e. basic building blocks should be tested. Currently, if an integration tests fails, we don't know why it fails. This is different if 1/10 unit tests fails.
My proposal (in this order)
1.) Replace all modular examples that are effectively just a test (i.e. most kernels) by unit tests. Those have the advantage that no files are involved. Unit-tests are low-level so they are less likely to fail upon changes in Shogun.
2.) Only keep python examples that properly illustrate a certain use-case.
3.) Disable integration test framework
4.) Now its much easier to modify Shogun code. and we have one testing framework less to keep an eye on.
The text was updated successfully, but these errors were encountered: