qicosmos / rest_rpc

modern C++(C++11), simple, easy to use rpc framework
MIT License
1.66k stars 365 forks source link

add test case for coverage #130

Closed zhengjian526 closed 5 months ago

zhengjian526 commented 5 months ago

119

  1. add coverage filter for file "string_view.hpp" and "nonstd_any.hpp";
  2. add test case for client async callback and publish and subscribe by token;
  3. add server error callback
github-actions[bot] commented 5 months ago

Code Coverage Report for detail, goto summary download Artifacts

Filename                    Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
client_util.hpp                     3                 1    66.67%          19                 8    57.89%           2                 1    50.00%
codec.h                             4                 0   100.00%          24                 2    91.67%           0                 0         -
connection.h                       39                 6    84.62%         375                91    75.73%          72                36    50.00%
io_service_pool.h                   5                 0   100.00%          32                 1    96.88%          12                 1    91.67%
md5.hpp                            19                 2    89.47%         127                 8    93.70%          24                 0   100.00%
nonstd_any.hpp                     20                 5    75.00%          49                12    75.51%           8                 4    50.00%
router.h                           19                 2    89.47%         144                35    75.69%           4                 3    25.00%
rpc_client.hpp                     73                12    83.56%         663               143    78.43%         132                58    56.06%
rpc_server.h                       26                 3    88.46%         191                20    89.53%          40                 9    77.50%
string_view.hpp                    23                10    56.52%          72                35    51.39%          22                14    36.36%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                             231                41    82.25%        1696               355    79.07%         316               126    60.13%
codecov-commenter commented 5 months ago

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (07d5735) 53.32% compared to head (ab27c06) 54.30%.

Files Patch % Lines
tests/test_rest_rpc.cpp 83.92% 18 Missing :warning:
include/rest_rpc/rpc_server.h 84.61% 2 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #130 +/- ## ========================================== + Coverage 53.32% 54.30% +0.97% ========================================== Files 170 170 Lines 7908 8038 +130 ========================================== + Hits 4217 4365 +148 + Misses 3691 3673 -18 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.