[WIP] Add test coverage
Why is this change needed?
To add test coverages for;
- spp_custom_field
- spp_attendance
- spp_cycle_attendance_compliance
How was the change implemented?
New unit tests
Unit tests executed by the author
How to test manually
Related links
#779
Codecov Report
:x: Patch coverage is 96.34703% with 16 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 76.85%. Comparing base (60c70be) to head (abb57fd).
:warning: Report is 116 commits behind head on 17.0.
Additional details and impacted files
@@ Coverage Diff @@
## 17.0 #782 +/- ##
==========================================
+ Coverage 75.02% 76.85% +1.82%
==========================================
Files 727 775 +48
Lines 19228 20656 +1428
Branches 2400 2521 +121
==========================================
+ Hits 14426 15875 +1449
+ Misses 4293 4211 -82
- Partials 509 570 +61
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@gonzalesedwin1123 can you please take a look at the latest changes from @shashikala1998 ? Thanks!
Yes @kneckinator . I will check this today.
Yes @kneckinator . I will check this today.
Great @gonzalesedwin1123 . Did you find anything or can this be merged?
Yes @kneckinator . I will check this today.
Great @gonzalesedwin1123 . Did you find anything or can this be merged?
@kneckinator I just requested for changes from @shashikala1998 regarding the sonarqubecloud report.
Quality Gate failed
Failed conditions
24 Security Hotspots
7.2% Duplication on New Code (required ≤ 3%)
@shashikala1998 can you fix these. I think this is important.
@shashikala1998 please check the sonarqubecloud report and make the necessary fixes. Thanks.
@shashikala1998 there are two main topics:
- The duplicated lines in the tests; for instance, create a parametrised function to generate a attendance record in
spp_cycle_attendance_compliance/tests/test_cycle_attendance.py - Use
httpsin theevent_data_sourcein the tests, to avoid false positives from the scan performed by SonarCloud
You should also change test.com to use either example.com, or any domain in the TLD .example. RFC 2606 has reserved this TLD for testing, so you can for instance use https://test.example instead of http://test.com
Quality Gate passed
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
2.8% Duplication on New Code
@gonzalesedwin1123 @kneckinator sonarqubecloud reports issues are fixed and Quality gate passed
@gonzalesedwin1123 @kneckinator sonarqubecloud reports issues are fixed and Quality gate passed
Thanks @shashikala1998 . Can you please take a final look @gonzalesedwin1123 ?
@kneckinator I think this PR is OK. Do you have other concerns? Otherwise, I can merge this to 17.0 but this will not be included in the Ticao release.