amazon-kinesis-video-streams-producer-c icon indicating copy to clipboard operation
amazon-kinesis-video-streams-producer-c copied to clipboard

Increase UT coverage

Open disa6302 opened this issue 10 months ago • 1 comments

Issue #, if available:

What was changed?

  • Removed samples and jsmn from coverage report
  • Added new unit tests for LWS, Curl, AwsV4Signer and IoT paths
  • Fixed typos in the code that were caught while adding new unit tests
  • Using lcov instead of gcov to allow for better filters in coverage reports (for our purpose, remove jsmn.h from report).

Why was it changed?

  • To ensure existing APIs were tested via unit tests
  • To report the appropriate coverage provided by the unit tests

How was it changed?

  • Increased test suite
  • Moved to lcov to allow for better filtering in the future.
  • Increased coverage from 64.24% to 90.81%

What testing was done for the changes?

  • Ran existing and new unit tests

Future changes:

  • Include LWS build on Mac (currently, there are some globals defined in PIC that causes our unit tests to fail when building LWS and CURL at the same time)
  • Include IoT tests in Windows (currently, there is an issue on windows where the SDK cannot open the cert file even if it exists, needs dedicated investigation).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

disa6302 avatar Apr 11 '24 19:04 disa6302

Codecov Report

Attention: Patch coverage is 80.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 90.80%. Comparing base (7f9ff95) to head (1f55db7). Report is 1 commits behind head on develop.

:exclamation: Current head 1f55db7 differs from pull request most recent head 346c5b7. Consider uploading reports for the commit 346c5b7 to get more accurate results

Files Patch % Lines
src/source/CallbacksProvider.c 0.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #446       +/-   ##
============================================
+ Coverage    63.93%   90.80%   +26.86%     
============================================
  Files           32       28        -4     
  Lines         5077     4894      -183     
============================================
+ Hits          3246     4444     +1198     
+ Misses        1831      450     -1381     

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

codecov-commenter avatar Apr 11 '24 20:04 codecov-commenter