Login | Register
My pages Projects Community openCollabNet

Project home

If you were registered and logged in, you could join this project.

Summary Contract Based Built-in Test for Java
Category testing
License GNU Lesser Public License
Owner(s) deveaux

STclass is an acronym for Self-Testable class. STclass is a Unit Testing Framework for Java comparable to JUnit and its clones, but based on runtime evaluable contracts as defined by B. Meyer in the Design by Contract approach. With this framework, all the testing information and code is embeded in the class code itself: we can use the term of Contract Based Built-in Test (CBBT) Framework.

This project start with version number #4 ; it's not really a new project, the first releases have be produced in 1999. Versions 1 to 3 were research versions which was not intended to be diffused.

The communication website of the project is at http://www.stclass.org/ ; the Tigris support is used only for the source management, the distribution, the bug tracking and the mailing lists.


The goal of the STclass project is to diffuse a professional testing framework for the Java language. The Tigris site shoud support the maintenance and the evolution of the tool.

The Tigris project start with the version 4.0 that is operational. The main features are:

  • Runtime evaluable contracts definition and processing:
    • OCL like class invariants, pre and postconditions on methods;
    • contracts defined in javadoc comments (can be extracted by javadoc);
    • contracts inheritance from parent class and interfaces following the Meyer's rules;
  • Class level unit testing:
    • test are organized in TestUnits, TestCases and TestSuites;
    • Setup and Teardown actions can be associated to TestCase, a testUnit can participate to several TestCases;
    • tests are contract-based: TestUnits define only scenarii, oracles are evaluated by contracts;
    • tests are built-in: all the test definition is made in comments of the source code;
    • tests are inheritable from parent classes and interfaces;
  • A preprocessor generates from the source an instrumented code with a main function: running the test is only running the class itself. Options manage the test conditions; it is possible to launch TestUnits individualy in verification mode; with Ant or other scripts, package or system test can be performed.
  • Test result are saved in XML format, postprocessing tools produce nice HTML reports; using the JIP profiler, a statisitic and profiling analysis can be made during the test, its resuts are added to the HTML report.

The project is written entirely in Java (version >= 1.4.2) it uses ANTLR, XML-Dom and XSLT technologies.

Related resources

~~ To be continued ~~

  • Link to other stuff that you know about. It will help you research requirements and provide a useful resource to potential contributors.
  • Why reinvent the wheel? What is better about this wheel? Is there any existing project that you can partner with or reuse?
  • Where would you go to try to find potential contibutors?