package net.au.kevin.myself;

Sunday, November 04, 2007

Test First

Test First
Test first which means the test are created before starting coding can guide programmers to making the right code. First, with all those tests, the programmers can know what functions they need to make. They can also know whether their programme fulfils the requirements or not. They can code the programme to make it pass each test, and passing all the tests means completion of the software. It can also help to check if any changes, made after the programme is passed the tests, cause any problems or unforeseen results. The test first can be done by xUnit test case programme, and in the case of email visualisation, it is JUnit which is unit test case programme for Java.

What we've done.
JUnit and Eclipse were used to practice Test First practice. JUnit, one of xUnit, is a testing tool which is for free. xUnit is recommended tool by Jeffries, Anderson & Hendrickson who are the authors of the book, “Extreme Programming Installed”. With JUnit and Eclipse, it was easy to conduct unit test. Firstly, the test case code was written with JUnit, then, for example, around 10 errors were showed. Based on the error messages and test programme, the actual Java class for the application was coded. The pair programmers started to code to pass each test one by one. The programme could eventually pass every test. Once it is done and as other test cases are required, more test cases with JUnit were created. Now it is in progress.

The Problem we've faced.
There was initially problem with unit test. Since the project is visualisation and developing Graphical User Interface (GUI), it is hard to test. It might require more time on making test programme then the time spent on developing the application. The problem was solved by the clients as they assign more tasks, which can be tested such as data handling, to the team. Once the clients asked the team to make that, unit test was done through JUnit test and Eclipse, as mentioned.

No comments: