Changes between Version 3 and Version 4 of Projects/GSoC/TestingReview/CMock

Jul 7, 2012, 12:03:27 AM (7 years ago)
Xiaochen Pan


  • Projects/GSoC/TestingReview/CMock

    v3 v4  
    4 Cmockery is a lightweight and highly portable unit testing framework with minimum conflicts with standard C library headers.
     4CMock is a highly automated testing framework based on Unity, a unit testing framework. It have also provided handy tools supporting mocking functionality.
    6 + It is well suited to work for RTEMS based testing thanks its effort to avoid relying on new features of compilers, and also its lightweight and minimum-conflict headers. It also works well for Host based tests too.
     6+ With the heavy usage of Ruby, which enables the high level of automation, comes with highly strict test-writing format and light tests writing effort compared to other testing frameworks supporting mocking functionality.
    8 - Unlike CMock, Cmockery has a relatively less stringent format requirements, while it requires the tester to write the test runner and mock functions by hand, while both of which can be automatically generated by scripts in Cmock. For mock function implementations, Cmock testers only need to define the expect input and output for certain functions in unit tests, where the mock functions are generated by ruby script according to the header files, which is convenient and easy to use. However, with Cmockery, testers need to write the mock functions by hand, which is troublesome for test automation and sometimes confusing.
     8+ It is well suited for both RTEMS based and Host based testing, where RTEMS-based testing is hard to guarantee for a large number of  tests frameworks.
    10 + Cmockery provides convenient interface to test for memory leaks, buffer underflow and buffer overflow, all of which would cause fatal errors for single processed RTEMS system.
     10+ It supports several compilation options, such as CMOCK_MEM_STATIC and CMOCK_MEM_SIZE, the combination of which limits the total amount of memory the testing program could use during run time. If the tests needs more memory than specified, it quit tests. Also, there are a lot of other compilation options that facilitate testing under embedded environments.
    12 + Cmockery provides a more detailed tests report than CMock by providing the reason for tests failures.
     12+ The tests results are reported with line number and function names indicated.
     14+ The scripts-rich feature have largely automated test running process.
     16+ CMock also supports setUp() and tearDown() functions runned before and after each test functions, which is similar to concepts in test fixtures.
     18+ Unlike other test framework evaluated, it is upgradable to Ceedling, which is a script driven framework based on CMock and Unity.