:: End of manually writing unit tests. Why not generate test cases automatically and smartly?

CUTE :: A Concolic Unit Testing Engine for C and Java

Open System Laboratory | Computer Science Department | University of Illinois at Urbana Champaign

Notice

We do not provide technical support for CUTE or jCUTE. The source code of CUTE and jCUTE is not available. If you need technical support and source code, check out CREST. CREST is an open-source concolic testing tool with modular support for strategies.

Overview

CUTE (a Concolic Unit Testing Engine for C and Java) is a tool to systematically and automatically test sequential C programs (including pointers) and concurrent Java programs. CUTE combines concrete and symbolic execution in a way that avoids redundant test cases as well as false warnings. The tool also introduces a novel race-flipping technique to efficiently test and model-check concurrent programs with data inputs.

The algorithm in CUTE uses a technique called concolic execution to explore all distinct execution paths of a program with data inputs. The idea of concolic testing is to use the symbolic execution to generate inputs that direct a program to alternate paths, and to use the concrete execution to guide the symbolic execution along a concrete path. Symbolic values (variables) are replaced by concrete values if the symbolic state is too complex to be handled by a constraint solver. For concurrent programs, our algorithm uses the concrete execution to compute the exact race conditions between concurrent events. These race conditions are systematically permuted in subsequent executions to effectively find concurrency related bugs.

In one of our experiments, CUTE was used to automatically test SGLIB, a popular C data structure library used in a commercial tool. CUTE took less than 2 seconds to find two previously unknown errors -- a segmentation fault and an infinite loop -- in SGLIB. We reported the SGLIB errors to the SGLIB developers who fixed one of them in the next release. We also discovered security attack in the TMN protocol in less than 15 seconds. We believe the tool is quite robust: we have tested CUTE by using CUTE itself. jCUTE found a subtle time-partitioning error in the Honeywell's DEOS real-time operating system developed for use in small business aircraft.


NOTE: CUTE can be used to explore all execution paths of a program. This path exploration feature of CUTE can be used for other purposes apart from testing.

Salient Features

  • CUTE and jCUTE support automatic testing of C and Java programs, respectively. There is no need to write test cases. CUTE and jCUTE generate test cases by dynamic analysis of source code.
  • Both CUTE and jCUTE can effectively test programs containing pointers and data-structures.
  • Both CUTE and jCUTE can enable developers and testers to perform unit testing.
  • Both CUTE and jCUTE seamlessly work with debuggers to aid users of CUTE and jCUTE in visualizing executions of the program on generated test inputs.
  • jCUTE can automatically generate optimal JUnit test cases for sequential Java programs.
  • Both CUTE and jCUTE allows random testing and smart fuzz testing in addition to concolic testing.
  • jCUTE can generate optimal number of test inputs for path coverage.
  • jCUTE can generate optimal number of test inputs for branch coverage.
  • jCUTE can generate optimal number of test inputs for erroneous execution.
  • For concurrent Java programs, jCUTE can generate optimal test inputs and schedules for path coverage, branch coverage, or error coverage.
  • For concurrent Java programs, jCUTE can catch actual data-races and deadlocks without any false warning.
  • CUTE and jCUTE are explicit path bounded model-checkers.
  • Both CUTE and jCUTE can record/replay an execution of the program.
  • CUTE and jCUTE log detailed branch coverage statistics.
Copyright © 2006 University of Illinois at Urbana Champaign. All rights Reserved