Hi,
I understand your concern. From my experience as PPMC of Apache ShardingSphere, 
both UT and e2e are necessary. 


UT focuses on a specific module, i.e., the part of the whole project, 
especially like SW core module, 
which is the most important and less changed. Those UTs guarantee each small 
part of the project would run well. 
Someday, if one contributor modifies them, the corresponding UTs will help 
check what he changed. 
In this condition, the contributor does not need to care about other modules or 
e2e, which simplifies his concern.


On the other hand, e2e will connect almost all of the modules together. 
We want to make sure the whole project can work well, which is not the 
responsibility of UTs.


In a word, UTs focus the local, and e2e keeps the watch on the whole project, 
IMO.


I’d like to listen to other voices from the community. :)


 Juan Pan (Trista)
                         
Senior DBA & PPMC of Apache ShardingSphere(Incubating)
E-mail: panj...@apache.org




On 03/30/2020 17:28,Sheng Wu<wush...@apache.org> wrote:
Hi Dev Team.

I am looking at the Coverage dashboard[1] this afternoon.
26%+- seems a static status of SkyWalking main repo. Seems not "good"(for
normal people). Especially the coverage is caused by storage/core/receiver,
less than 15% usually.
But at the same time, like my twitter description[2], we have 101(excluded
3 CI tasks) e2e and agent plugin tests. These are exact covering
the storage/core/receiver.

From my understanding, besides these 3 test requirements[3][4][5], the e2e
tests exactly are covering storage/core/receiver.
*Logically, we have a very high coverage rate, which matches my
feeling (maybe others too)*.

The thing bothering me is, how we should describe this to a new
contributor? Such as
1. What parts of contributions should require UT coverage?
2. What e2e should be added?
3. Where is the balance and tradeoff between (1) and (2)?

I was trying to add more tests for core module(class
MetricsStreamProcessor#add), and nearly success yesterday night, but when I
was reviewing my own test case, I was asking myself, what are the points of
those UTs? I was mocking nearly all dependencies, so the logic is in the
tested and untested at the same time. Then I decided to revert and delete
those tests.

WDYT? Open my mind to hear more ideas.

[1] https://codecov.io/gh/apache/skywalking
[2] https://twitter.com/wusheng1108/status/1243798832690782211
[3] https://github.com/apache/skywalking/issues/4455
[4] https://github.com/apache/skywalking/issues/4530
[5] https://github.com/apache/skywalking/issues/4576

Sheng Wu 吴晟
Twitter, wusheng1108

Reply via email to