All Questions

24
votes
6answers
4279 views

Measuring code coverage in Delphi

Is there any way to measure code coverage with DUnit? Or are there any free tools accomplishing that? What do you use for that? What code coverage do you usually go for? Jim McKeeth: Thanks for the d...
20
votes
4answers
1920 views

Can I write 'parameterized' tests in DUnit

I am using DUnit to test a Delphi library. I sometimes run into cases, where i write several very similar tests to check multiple inputs to a function. Is there a way to write (something resembling) ...
14
votes
7answers
3626 views

How can I test private methods with DUnit?

I have a class that I am unit testing into with DUnit. It has a number of methods some public methods and private methods. type TAuth = class(TDataModule) private procedure PrivateMethod; p...
19
votes
3answers
704 views

Increasing testability, when coding with Bold for Delphi framework

Background I work in a team of 7 developers and 2 testers that work on a logistics system. We use Delphi 2007 and modeldriven development with Bold for Delphi as framework. The system has been in prod...
16
votes
5answers
875 views

How to start unit-test old and new code?

I admit that I have almost none experience of unittesting. I did a try with DUnit a while ago but gave up because there was so many dependencies between classes in my application. It is a rather big (...
4
votes
3answers
1335 views

Unit-testing Delphi data modules

If all the business logic is present in a datamodule (TSQLDataSets and TDataSetProviders) how would you refactor the code to make the application more appropiate for unit testing?
12
votes
6answers
1262 views

How to access fields of a TTestCase in a TTestSetup class

I am creating unit tests with DUnit. I have a class that takes quite a long time to initialize. I derive a class TMyTestSetup from TTestSetup and override its Setup method. This SetUp method is only...
2
votes
2answers
1036 views

DUnit Testing in a Midas/DataSnap project

How does one setup DUnit Testing in a Midas/DataSnap project in Delphi 2006 Edit How does one set up a Dunit Test into a TRemoteDataModule The project wizard in Delphi 2006 does not work with T...
12
votes
1answers
1725 views

How can I enable the memory leak tracking with FastMM in DUnit?

In the GUI test runner, the menu items for memory leak checking are inactive (grayed out). Is there a special switch I have not found yet to activate them? Using DUnit 9.4 (from Delphi 2009 or from...
10
votes
3answers
2123 views

DUnit: How to run tests?

How do i run TestCase's from the IDE? i created a new project, with a single, simple, form: unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ...

Previous Next