wiki:Projects/GSoC/TestingReview/AceUnit

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

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

File:Aceunit devfs02.png?

This is the screenshot when all test cases have pass.


devfs02 fail test

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

File:Aceunit deviceio01.png?


fsrofs01 test

File:Aceunit fsrofs01.png?


psx01 test

File:Aceunit psx01.png?


psxtmbarrier01 test

File:Aceunit psxtmbarrier01.png?

Host based Test Result

This is the result when one of the test case fail:

Test Cases: 12 Errors: 1 make: * [test] Error 1

To check out which test case have failed, which is not shown in the result, we need to look up in the header file automatically generated with the java application.

When all test cases have passed, the result shows nothing.

In conclusion, the information is relatively easy to parse.

Last modified on Jul 8, 2012 at 9:04:03 PM Last modified on Jul 8, 2012, 9:04:03 PM