= TestingReview/AceUnit = = General Comparison = AceUnit is a simple unit testing framework based on CUnit and EmbUnit. * It conforms to JUnit 4.x architecture format, where it supports the concept of test suites, test fixtures, test cases, setup and cleanup functions. * It supports automatic test discovery. It has stringent test writing format in order to use the prewritten java application as Generator for test generation automation, which is very convenient. * It is well suited to work for RTEMS based and Host based tests. * It provides a macro for it to run under embedded environments with memory minimized, but not 100% functional. = RTEMS-based Test Result = = sp01 test = [wiki:File:Aceunit_sp01.png File:Aceunit sp01.png] This test result is different from the test result of testsuite sp01 with other frameworks. The reason lies in the different way the test runner is constructed. In this framework, when the tests have all passed, the control goes to the exit(0) command of the main thread. The tasks created are considered to be functions. After main thread exits, the whole process ends. The control of main thread cannot be transferred to the functions. In CMock, the control can be transferred to the tasks created. The process can end only after tasks end. In Cmockery, two testsuites can be constructed, where the first testsuites tests the creation of tests and the second testsuites test the deletion of RTEMS task itself. Although each test case is also considered to be functions as in AceUnit, they only exit after the functions finish execution. So, the second testsuites will only execute after the 3 tasks have finished. For AceUnit, test cases in each test file is considered to be in the same fixture. They cannot be seperated as in Cmockery. So, the independence of test cases running cannot be guaranteed by AceUnit framework sometime. ---- = devfs02 test = [wiki:File:Aceunit_devfs02.png File:Aceunit devfs02.png] This is the screenshot when all test cases have pass. ---- = devfs02 fail test = [wiki:File:Aceunit_devfs02_error.png File:Aceunit devfs02 error.png] This is the screenshot when one of the test case fail. I only make this happen in order to show the output when some test have failed. The information included in the failure output includes the file name, line number, the message written in the test cases. It is a minor plus than frameworks with no concrete information written during test cases design. ---- = deviceio01 test = [wiki:File:Aceunit_deviceio01.png File:Aceunit deviceio01.png] ---- = =fsrofs01 test == [wiki:File:Aceunit_fsrofs01.png File:Aceunit fsrofs01.png] ---- = ==psx01 test=== [[File:Aceunit_psx01.png]] ---- ===psxtmbarrier01 test=== [[File:Aceunit_psxtmbarrier01.png]]