Category: unit testing

Total 3 Posts

Beginning to Learn TestNG

I have recently started to learn TestNG. There are two reasons for this. The first was an intriguing discussion I had with a test engineer candidate about a Selenium based system he had built on top of TestNG. More recently, a colleague suggested we convert from JUnit to TestNG for our Selenium tests to better allow us to use Selenium Grid.

My initial impressions are positive. However, I am just beginning. This is my initial set of reference materials:


Accidental Correctness – Date Sorting…

I have written about accidental correctness before. I recently released a fix for an item that was "accidentally correct" for nearly a year.

Early last year, we released a new feature which used Lucene to index the entries. As part of the UI, the entries were displayed – newest entries first. Things worked great. Until the new year.

It turns out we were sorting not on the date but on the date string stored in Lucene. The string was in MM/DD/YYYY format. So, the entries that started with 12 were before 11, etc. All appeared correct. The newest entries were at the top. Then January came. All of a sudden, the newest entries were at the bottom of the list. Sigh.

Lesson re-learned: make sure your test dates span years.