Sujit Pal - 2004-09-09

SQLUnit 4.0 has been released. The code has been extensively refactored, making it easier to understand and maintain, as well as make changes and enhancements.

All mock tests, JUnit test, PostgreSQL and MySQL tests have been run succesfully. The documentation has been updated to reflect the new code structure and the new features. Loose ends that were left in release 3.9 have been taken care of, thank you all for your patience.

Let me know if you find bugs. The code base is now stable and incremental changes can be made easily and I dont have any major refactorings planned, so we will be able to make new releases more frequently going forward.

As always, thanks in advance for providing me with feedback to make SQLUnit better and more robust.

Release notes are appended below:

New Features in this release

1. SQLUnit guarantees result ordering (101908). Requested by Jorge Orgarza. Default ordering is by natural order of columns in the result, but can be over-ridden by the sort-by attribute in resultset.
2. Non-scalar set (1011910). Requested by James Henderson. The set tag has been changed to accept an embedded <sql>|<call> and <result> tags that allows the results returned from the SQL or stored procedure call to populate the variables in the result tag.
3. Custom Asserts. The default assert is "equal", but new assert strings can be passed to restrict or even invert the scope of the test.

Refactoring Information

1. *Util.java moved to utils subdirectory
2. beans moved to beans subdirectory.
3. SqlTypeUtils.java refactored to TypeUtils.java, DigestUtils.java,
4. XMLUtils.java provides overrides for Element.getAttributeValue() and
Element.getText() to look up SymbolTable first. This is a variation of Mario Laureti's idea of subclassing Element, but this approach is less invasive.

Changes in this release

1. The IJavaObject interface has been deprecated and removed. All it did was provide an artificial buffer since it extended java.io.Serializable. This is no longer required, so clients wishing to use the java-object-support feature should directly implement java.io.Serializable instead.
2. The OracleExtensionTypes class which provided constants for the Java types supported by Oracle was no longer required and has been removed. It has been supplanted with the custom types approach introduced in version 3.9.
3. The JDBC drivers for MySQL and PostgreSQL have been removed and will no longer be distributed with SQLUnit.

Bug fixes in this release

1 Bug in batchcall handler. This was reported by James Henderson when trying to run the MySQL tests. Also added correct type mapping overrides for MySQL for LONGVARBINARY, LONGVARCHAR and FLOAT.
2. Changes in BinaryType to automatically render with md5 unless the byte code passed in was for a serialized Java object and java-object-support was turned on, in that case return the string representation of the object.
3. DigestUtils must dump temp files and provide a means of tying it back with the [test,resultset,row,col] key.
4. Made the BinaryType and TextType read from an InputStream instead of a byte array or string. ByteArrayType will read from a byte array and convert to md5 as well.
5. JavaObjectType will always show the toString() representation regardless of whether java-object-support is set or not.

New tests

1. JUnit tests to account for BinaryType and JavaObjectType changes. Added test for TextType.
2. Tests: MockInitialContext for testing JNDI connections.

Todo (for next release)

Tests: Add tests for custom asserts
Tools: MockTool
Refactoring: clean up error messages
Refactoring: clean up logging

-sujit