I agree with you, but some aspects need to be discussed. We should not put the 
test logic of zk and database in the e2e test. This is a bit cumbersome and 
does not meet the unit test specification. Regarding the unit test of the 
server module, I will come up with a plan and complete it later.


Best  wishes??
CalvinKirs


On 07/31/2020 21:07??Yichao Yang<[email protected]> wrote??
Hi all,


The purpose of this discussion is to discuss the UT specification of DS.


My thoughts are as follows:


1. About DS ut test (maybe include database)


Using framework: mockito, powermockito
Reason: The purpose of UT is to cover a function for simple test. We can not or 
do not need to just place all the test verification process on ut. Therefore, 
it is necessary to restore the essence of UT and simplify the difficulty of 
writing UT.
For example: If UT is used to test the whole process of an API, there will be a 
lot of conditions to be considered. It will be difficult to consider each 
condition. However, if we only direct each ut to the corresponding method and 
cover this method as completely as possible, the error rate of functional 
testing will be greatly reduced.


2. About ZK, front end test, (may be include database)


Module: put this part of the test in the E2E module


Reason: because these components are end-to-end originally, which is conducive 
to module division.



-------------------


????????????????????????


????????????????????????ds??ut??????????


??????????????
1.????ds ut????????????????????????
??????????Mockito??PowerMockito
??????????ut????????????ut????????????ut????????????????????ut????????????
??????ut????????????????????????????????????????????????????????????????????????????????????ut??????????ut????????????ut??????????????????????????????
??????????????ut????????????api??????????????????????????????????????????????????????????????????????????????????????????????ut??????????????????????????????????????????????????????????????????????????????????


2.????zk??????????????????????????????
????????????????????????e2e????
??????????????????????????????????????????????????


If you have any opinions or suggestions, welcome to put forward.


Best,
Yichao Yang

Reply via email to