Creating Mocks For Unit Testing in Go
Unit testing is an important part of any project, and Go built its framework with a testing package; making unit testing part of the language. This testing framework is good for most scenarios, but you ...
Develop Quality Code
As software continues to dominate every facet of our lives, developers are faced with an ever-increasing pressure to produce bug free code. The responsibility of clean quality software falls upon everyone that is involved in ...
Unit Testing Camel Routes with Spock
Introduction Apache Camel’s variety of components and message routing logic capabilities makes testing a requirement to ensure your routes are performing as expected. Since Camel routes are built within a context, it usually follows that ...
The Benefits of Using assertThat over other Assert Methods in Unit Tests
Introduction When Junit 4 was released a number of things changed, most notably the use of the test annotation so that there is no longer a need to extend TestCase and name methods starting with ...
Creating a Hierarchical Test Data Builder using Generics
At my current client, we had a situation where we needed to write JUnit tests for REST services which used a complex object hierarchy. Creating these objects manually proved to be very tedious, so having ...
Unit Testing Controllers in Grails 1.3.7
One benefit of Grails is its robust and versatile controller logic. It can render responses in a multitude of formats, validate input, and handle a lot of processing behind the scenes. This is all great and ...
How to Mock Final Classes in Unit Tests
Mocking has become a key component to writing effective unit-tests. It is a very useful strategy to write focused tests. Mocking frameworks make it easy to write test, but they have their limitations. Both Mockito ...
Dec 30, 2010
Ant,
BLOB,
BLOB DATA,
groovy,
groovy_ant,
groovy-ant,
HSQL,
HSQLDB,
Java,
JUnit,
Testing,
unit testing
Loading test BLOB data into HSQLDB with a Groovy Ant Task
At my current client we use an in-memory HSQLDB for unit testing. An in-memory DB provides us a mechanism to test DAO’s and services against a known dataset. Overall this has worked out very well ...
How To Write JUnit Tests
Recently I've been asked "how do you get started writing unit tests?" I had to give great thought to the question. A lot of us have been writing unit tests for a long time, most using JUnit or a similar suite, so to many of us it's kind of second nature. After pondering and chatting more, here's what I came up with....
Updated JavaScript Unit Testing Presentation
I gave another presentation today on JavaScript Unit testing tools. This time I’ve advocated the use of HtmlUnit and Screw.Unit in combination. Screw.Unit is a JavaScript testing framework that’s great for unit tests, and HtmlUnit ...