Gradebook2 Audit: Unit tests - GradeCalculations
Description
Environment
Test Plan
Attachments
- 21 Oct 2010, 07:44 PM
- 21 Oct 2010, 07:44 PM
is related to
Activity
Thomas Amsler December 15, 2010 at 2:44 PM
NO QA needed for this one, since this JIRA documents JUnit work.
Jon Gorrono October 22, 2010 at 12:15 PM
I'm putting a fork in this... there's room for improvements but the 80% threshold us arguably crossed. Quality should be the QA focus.
Jon Gorrono October 21, 2010 at 7:46 PMEdited
The latest commit has instruction test converage at of 81% for both the old and the new GradeCalculations implementations (see attached screen grabs)
Note that in order to reproduce these numbers reliably moving between old and new impl's, the developer will need to do two things:
1) set the FULL_PRECISION private member of GradeCalculationsTest appropriately and,
2) make sure the 'deprecated' flag in the statistics data file (default: GradeData.dat) is set to a value equivalent to !FULL_PRECISION (absent == false)
.. this is because even of FULL_PRECISION = true, if the data file has 'deprecated: true' then the old Impl will be substituted for the new in the test of calculateStatistics(); this is done to assure that the test output matches the expected results in the file.
So by way of example, if FULL_PRECISION = false and the supplied hi-scale stats test file GradeData.dat.high-scale (contains no 'deprecated' flag) is copied over GradeData.dat and the unit test GradeCalculationsTest is run, then the code coverage will be substantially different since the bulk of the testing will be done against GradeCalculationsOOImpl and the calculateStatistics() test will be run against GradeCalculationsImpl.
Functional Description: Develop tests for grade calculation code verification.
Create unit tests for existing GradeCalculationsOOImpl class
possibly add coverage reporting