Mantis Bug Tracker

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000156FirmwareTestingpublic2011-06-15 17:342012-10-24 15:58
ReporterFred 
Assigned ToFred 
PrioritynormalSeverityminorReproducibilityN/A
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFutureFixed in Version 
Summary0000156: Add unit tests for unit testable functions
DescriptionCopy/paste:

    // each case:
                // checks length, fails if wrong
                // parses data into args
                // calls function on data/args
                // assembles response OR sets error
                // breaks


// testable:
                // lookupPagedMainTableCellValue - pass this RPAGE so that it remains unchanged
                // validateMainTable
                // validateTwoDTable
                // set table values - leave this till last, currently unused by mtx, likely to be removed anyway
                // generateDerivedVars - convert to pointers, remove headers, privatise a lot of data!
                // calculateFuelAndIgnition - ditto
                // scheduling algorithm - ditto
                // safeAdd
                // safeTrim
                // safeScale
                // sleep (milliseconds)
                // sleepMicro (microseconds)
                // checksum
                // stringCopy
                // compare
                // utils that can't be checked: sampleLoopADC sampleBlockADC sampleEachADC - can check for how long each takes! adjustPWM (test only anyway), resetToNonRunningState and setupPagedRAM (would interfere with functioning of device)
                // init code may be able to be partially checked
                // most other code at this stage is ISR code, flash writing code, or could interfere with the running of the engine
                // more testable code will appear with time, such as the HAL layer, and most accessory functions.

Refactor whatever we can to be testable and add tests.
TagsNo tags attached.
FirmwareVersion
Issue TypeTask
Risk of Breakagelow
Attached Files

- Relationships

-  Notes
User avatar (0000208)
Fred (administrator)
2011-06-28 19:06

risk = low assumes functions already testable. Those things migrating to a testable form could break in the process.
User avatar (0002363)
Fred (administrator)
2012-10-24 15:48

For testing times, I'll use floating point tests, and provide a tolerance. They don't have to be perfect.
User avatar (0002365)
Fred (administrator)
2012-10-24 15:58

Need to ensure the functionality for each wrapper is in the same page as the target functionality, too.

Function's doxygen should be marked with @Tested or @NOT_TESTED so as to be collated during the doxy build.


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker