1 / 9

Implement Unit Test Framework for Application running on a Pocket PC 2003 device

Implement Unit Test Framework for Application running on a Pocket PC 2003 device. Durga Kulkarni Cyberonics Inc August 28, 2009. Unit testing. What is a unit? Smallest testable part of an application Unit can be a group of files, a file, class or a function What is Unit testing?

Download Presentation

Implement Unit Test Framework for Application running on a Pocket PC 2003 device

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Implement Unit Test Framework for Application running on a Pocket PC 2003 device Durga Kulkarni Cyberonics Inc August 28, 2009

  2. Unit testing • What is a unit? • Smallest testable part of an application • Unit can be a group of files, a file, class or a function • What is Unit testing? • Software verification and validation method in which a programmer tests if individual units of source code are fit for use • Benefits of unit testing • Find out problems in early development stage • Use as regression testing • Simplifies integration of units

  3. Unit testing framework • Simplifies unit testing process • Facilitates ease of adding, running unit tests • Creates diagnostic information about tests by creating success/failure report • Provides coverage information to know which part of the code is not tested yet Examples: JUnit, CPPUnit, NUnit etc.

  4. Example of a unit test int arr[4] = {1,15,30,40}; int baseAddress = 1000; int calculateAddress(int arg) { return baseAddress+arr[arg]; } Unit test: void testCalculateAddress() { //success ASSERT_EQUAL(calculateAddress(2), 1030); //fail ASSERT_EQUAL(calculateAddress(4), 1040); //array out of bounds error. } ASSERT_EQUAL is the function provided by unit test framework which will compare 2 numbers.

  5. Need for unit testing framework @Cyberonics • Cyberonics designs and develops Class III medical devices for Epilepsy and Depression • As per the Medical Device Software standard (IEC 62304:2006) and Cyberonics internal software development procedure, software code must be unit tested • Currently unit testing is done via debug step through and framework is lacking • Not many commercial/open source unit tests frameworks for pocket PC platform available • Customized Framework will provide ease of designing, developing and executing unit tests for C++ application running on Pocket PC 2002/2003

  6. Requirements for unit test framework • Unit test framework • Should be easily integrated in Cyberonics code base • Language: C++ using eVC++ 4.0 IDE • Operating System: Pocket PC 2003 • Should facilitate ease of • Adding test cases • Selecting one or more tests cases to run • Should create diagnostic information such as • Test report with success/fail status, details of failures if any, timestamp for the tests, time taken for the tests etc • Coverage information (stretch goal)

  7. Deliverables • Project plan • Requirements specification • Software architecture and detailed design document • Source code • Build documents explaining building and releasing the Unit Test framework • Unit Test Framework Validation Protocol and Report • Known anomalies and future enhancement Report • User manual with the details of usage and capabilities of the Unit Test Framework with sample tests for Cyberonics Software application

  8. Benefits of the project • For Cyberonics • Opportunity to work with bright students • Get fresh innovative ideas to develop the unit test framework software • Finally, get a Customized unit test framework which can be used to design, develop and execute unit tests for Cyberonics C++ handheld applications • For students • Opportunity to architect a software to be used in the industry • Get the experience of the real life project by going through all the phases starting from planning to testing • Apply the testing knowledge learned in the course

More Related