Archive for 'Testing' Category

Next Page »

Run test automatically

15 July 2008

The third commandment of unit testing is “Run Test Automatically”, Do not rely on individual developers to run test, the temptation to avoid test run is behind any corner. Use some Continuous Integration tool like CC.NET to make all tests run on every check-in, and set the CC to broke the build if some test [...]

Run test code often

11 July 2008

Some days ago I was thinking about the good practices of testing. Immediately after the first commandment “test code is First Class code” it comes the “Run test code really often”.
If you run the test code often, you immediately know when you have broke something. Think to the following scenario, you write 200 lines [...]

Test code is "First class code"

2 July 2008

In an hypothetical “ten Commandments” of the Unit Test probably the first is
Test code is First Class Code

I believe that one of the worst mistake a developer can do when writing Unit Tests is to consider unit test “second class code”, in the end the test code does not goes into production (pay attention [...]

The wonderful world of Unit Testing

1 July 2008

Last Friday our usergroup organized a Workshop with the argument “unit Testing and asp.net MVC”. The event was good, I was one the speakers,  and did a presentation on “Introduction to Testing”. The audience was interested, most of the attendee remained until 20:00 PM, even if the official Close Time was 19:00. People did a [...]

A better nUnit assertion to verify content of a database Row

30 June 2008

Sometimes you need to check that the content of various fields in a database row match some constraints, in this situation a little helper could make it possible to write more elegant assertion

[Test]
public void TestInsertACustomerDataFluent()
{
NorthwindCustomerDao sut = new NorthwindCustomerDao();
sut.CreateACustomer("RICCI", "DotNetMarche", "contact", "Loc piano frassineta 31");
[...]


Next Page »