Unit Testing Servlets: A simple test for a complex servlet

Testing Java servlets reliably can often be difficult. Generally the main business logic is contained in a different class which can be tested in isolation, but in some cases it is necessary to have some logic in the servlet itself. It's also nice to have ...Read More

Taking C unit testing to the next level

In terms of formalised unit testing, we were fairly late to start generating repeatable test cases for our C products. Sure we wrote code to test our new features but they were just thrown away once the code was working. Even so, over the ...Read More

The beauty of small tests

When tests are small, a test failure means just one thing – somewhere in these ten lines of code which are being tested, there is an error.  Ok, sometimes this can mean that there is an error in the test script, or a ...Read More

Agile – Tests = Fragile

The nature of agile projects, with lots of small releases mean that there are a lot of test runs to execute if you want to have any confidence in the code and the product. Ignoring this testing just generates projects which will fail – ...Read More

Testing APIs for Backwards Compatibility

A couple of weeks ago, I wrote about Agile Framework Development and the various techniques that we have used here at Caplin to build our APIs in a way that is sympathetic to agile methodologies. One of the key problems with the ...Read More

Pitfalls of Exception expectations in JsUnit

At Caplin we use the JsUnit framework to test our JavaScript code. Over time we have made minor modifications to it, integrating Mock4JS and JSCoverage, as well as adding a few of our own extensions that are sympathetic to our ...Read More