-
Notifications
You must be signed in to change notification settings - Fork 11
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
797 ICD tests in the backend unit tests #888
Conversation
…mark/797_ICD_tests
We can automatically generate these images. Please follow the implementation @confluence used. I also think we don't have to strictly keep the same test approach, that's not the point of this migration. If something can be tested simply as a unit test (e.g. Does Carta generate the correct file information?) then there's really no need to wrap it in then entire ICD. Just test the functionality. Some examples that would make trivial unit tests and not require any specific ICD stuff (although that will be useful for certain tests)
|
Agreed -- tests which confirm that each message has an expected and well-formed response should remain as ICD tests. Tests which check the correctness of the data should be removed from the ICD tests and rewritten as ordinary unit tests which bypass the messaging interface and call functions in the backend objects directly. Wherever possible we should use generated images. |
…mark/797_ICD_tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is all fine now. I'm not 100% sure if we should be making all private members of Session
protected, but I don't have a specific objection.
I am confused by this PR and the issue comments. This test framework is very high-level at the message received/response level, rather than as close as possible to the code which does the work. I thought the goal was not to duplicate the ICD tests? |
My understanding is that we decided that it was a good idea to have one specific unit test which tests the Session's message handling (which is what this PR currently contains) and to add most of the converted tests (the original purpose of this PR) in stages, in multiple PRs, rather than adding them in one large PR. But perhaps one group of tests should be selected to be added to this PR, so that we can further discuss the approach here. |
I agree that some tests can just be trivial unit tests. We don't need to duplicate the original ICD tests. We can simplify and migrate some ICD tests to the backend so that we can inspect in detail why some of the original ICD tests failed, like animation and moments generation. The main purpose of high-level tests is to check if the message received/response fits our expectations (in case if we want to do this kind of test for the new feature without the frontend). I think it can also be used to test the performance in the future. I will check if some of the test cases can be removed. Or just leave it as an example for the developer who wants to add more tests (@acdo2002 seems to have the interest to do it). |
I have test the ICD unit tests on the Ubuntu 20.04.
(2) Some problem with AnimatorNavigation:
|
Looks like you do not install the |
@markccchiang Yes, you are right, after I install fits2idia, the (2) problem disappears!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will merge in once the CI shows all tests passing
This PR is the trial for #797 to move some ICD tests back to the backend unit tests. I will add more testing cases according to the document).