CUnit & Coverage - PowerPoint PPT Presentation

shaina
cunit coverage n.
Skip this Video
Loading SlideShow in 5 Seconds..
CUnit & Coverage PowerPoint Presentation
Download Presentation
CUnit & Coverage

play fullscreen
1 / 11
Download Presentation
CUnit & Coverage
159 Views
Download Presentation

CUnit & Coverage

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. CUnit & Coverage Larry Shi

  2. Agenda • Aim • CUnit • Screenshots(Automated) • Demo • TO-DO list

  3. Aim • Unit test • Test C code automatically • Find bugs in time to improve quality • Coverage • How often each line of code executes • What lines of code are actually executed • Suggestion • CUnit for unit test • GCOV, LCOV for coverage

  4. CUnit • CUnit is a lightweight system for writing, administering, and running unit tests in C.  • Several different interfaces are provided for running tests and reporting results

  5. Screenshots-Listing tests

  6. Screenshots-Tests result

  7. Screenshots-Coverage

  8. Screenshots-Coverage

  9. Demo ※ Please see it in the test machine • Several stepsbelow: • Write test cases • Compile with -ftest-coverage -fprofile-arcs • Run • Generated files: xx.gcda, xx.gcno for coverage • LCOV • Generated files: covinfo for coverage • genhtml (generate html format coverage report) • Confirm test report(xx.xml) • Confirm coverage report (./result)

  10. TO-DO list • Team discuss if CUnit & LCOVcan satisfy our requirement for C code quality • Framework design • Unit test framework via CUnit • One example about framework proposal • Support for automated test • Support for modular test • Integrate the framework with existed source code • Integrate the framework with other test frameworks • Test cases Suggest that developers handle it

  11. Thank you!!