ORUnit 1.0

A Unit Test Framework for CA-OpenROAD 3.5

Eric Jan Malotaux
23-02-2001

 Introduction
 Contents
 Where To Find
 Installation
 Getting started
 Status of this release
 To do

Introduction

This is the README file for ORUnit 1.0, a unit test Framework for CA-OpenROAD 3.5. ORUnit 1.0 is derived from JUnit, a unit test framework, written by Kent Beck and Erich Gamma. More information about JUnit can be found at the website specially devoted to it, http://www.junit.org/.
 

Where To Find

ORUnit is hosted at SourceForge, and may be downloaded here: orunit-1.0.zip

Contents

LICENSE.html
The IBM Public License Version 1.0, under which ORUnit is distributed.
README.html
this file
ORUnitFramework.exp
an OpenROAD export file containing the OpenROAD application implementing the ORUnit framework
ORUnitGUI.exp
an OpenROAD export file containing the OpenROAD application implementing the Gui for running tests
ORUnitUtil.exp
an OpenROAD export file containing an OpenROAD application with some utility classes for the framework
ORUnitSamples.exp
an OpenROAD export file containing an OpenROAD application with the unit tests for the ORUnit framework itself, and some sample tests.

Installation

To install ORUnit, follow the following steps:
  1. Unzip the ORUnit-1.0.zip file into an empty directory.
  2. Import the four OpenROAD applications into a database:
  3. w4gldev backupapp in <your-database> ORUnitFramework ORUnitFramework.exp
    w4gldev backupapp in <your-database> ORUnitUtil ORUnitUtil.exp
    w4gldev backupapp in <your-database> ORUnitGUI ORUnitGUI.exp
    w4gldev backupapp in <your-database> ORUnitSamples ORUnitSamples.exp
  4. Test the installation by running the sample tests:
  5. w4gldev rundbapp <your-database> ORUnitSamples -cli -/appflags AllTests
    If the progress-bar remains green to the very end the installation was successful.

Getting started

To start using ORUnit: For more information about writing unit tests, explore the material available on the JUnit website. Also, you can study the sample tests in ORUnitSamples. For more information of the features of ORUnit, download JUnit and read the documentation that comes with it. For really accurate information, read the source code of ORUnit. This applies specifically for the parameter-names of the various assert-methods in ORUnitFramework!Test.

Status of this release

ORUnit 1.0 is derived from JUnit 3.2 and runs on OpenROAD 3.5 on Microsoft Windows. It follows its example fairly closely. Not all features have been implemented, though, and some details had to be implemented differently because of some Java features that are not available in OpenROAD.

Differences include:

  1. Only a GUI interface is implemented, no text interface.
  2. Most methods in JUnit have no return values and rely on exceptions to end the method and indicate an error condition to its caller. OpenROAD has no exception, and therefore I have made many methods to return FALSE to indicate error conditions to its caller. Success is indicated by a return value of TRUE. This conventions also applies to testmethods that you write. For instance, when a failure occurs in one of your testmethods, the method is not automatically exited. You should code this yourself after checking the return value of the assert-method.
  3. There are some more variations of assert. This is because in OpenROAD, conditional expressions have no boolean datatype, so you can't pass a conditional expression as a parameter to let assert determine whether it evaluates to TRUE or FALSE. Also, in OpenROAD, parameters are named, so you must know the parameter names in order to use them. Look in the source code of ORUnitFramework!Test.
  4. The extension framework is not implemented.
  5. In the test browser, the tests in the table field do not indicate success or failure.
  6. In ORUnit, you don't have to write a suite-method in your testclass to have ORUnit collect all the "test"-methods into a TestSuite. The implementation in the superclass TestCase already does this for you.
I have been using ORUnit almost daily for a couple of months now, and have found it very usable and quite stable.

To do

  1. Implement a nowindows interface, suitable to run from a makefile or script.
  2. Write an OpenROAD 4.x version of the GUI.
  3. Implement the extension framework.
  4. Follow the ongoing development of JUnit. As of the time of writing, JUnit is at version 3.5.
  5. Write some documentation.
If you have comments, or want to help improve and further develop ORUnit, please let me know at Eric.Jan.Malotaux@erd.com.

Have fun!

SourceForge Logo