Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find an introduction to using DUnit with Delphi 2007 or newer?

I'm new to using and writing unit tests, but I've become convinced that they can help me write better code and ultimately save me time. I understand that DUnit is well integrated into Delphi 2006 and newer.

Does anyone know of any good resources for writing unit tests with DUnit and possibly an introduction to unit testing in general?

I found a resource from Charlie Calvert which I have been reading, but I'm a moving pictures kinda guy, and I'd also like to see any videos related to DUnit testing as well (if they exist). Any help is appreciated.

like image 705
Mick Avatar asked Nov 05 '22 06:11

Mick


1 Answers

Quick introduction on Channel E:

http://channel-e.embarcadero.com/index.php?option=com_jvideodirect&x=1&v=gUNNLQi761kLo

EDIT
Above link is no longer current. http://forms.embarcadero.com/DelphiUnitTesting2-12 is a webinar on unit testing. Description:

RAD in Action: Unit Testing in Delphi Featuring Nick Hodges

Watch Now

Join Embarcadero and Delphi programming expert and author, Nick Hodges, for an in-depth look at unit testing in Delphi.

Without unit tests your code is fragile, hard to change, and unreliable. Unit testing is the only way that you can be sure that your code does what it is supposed to do.

In this webinar, Nick discusses the basics of Unit Testing as well as providing a demo that illustrates the points at hand using the new DUnitX framework. This will lead to a discussion of stubs and mocks, and the use of the DelphiMocks.

Topics covered include:

  • What is Unit Testing?
  • Why you should be doing Unit Testing
  • Proper unit testing techniques including covering the "middle of the plate", the "outside corners" as well as checking exceptions
  • A specific use case or unit testing using a real world example

Be warned - the video is over 2 hours long. You can access it directly here: https://www.youtube.com/watch?v=SJsgLDjn5b4.

like image 90
Jens Mühlenhoff Avatar answered Nov 10 '22 17:11

Jens Mühlenhoff