The Open Component Test Framework (OpenCTF) is a test case generator framework for Delphi VCL applications, which creates DUnit tests at run time.

The new version 1.6.0 is a maintenance release and is now available on GitHub at https://github.com/michaelJustin/openctf

Example project

program FormTests;

uses
  OpenCTF, ctfStandardTests,
  GUITestRunner,
  TestForm in 'TestForm.pas' {Form1};

begin
  OpenCTF.RegisterFormClasses([TForm1]);

  RunRegisteredTests;
end.

When run, the FormTests example project dynamically creates tests for visual and non-visual components of the form and reports bad property values and other “errors”.

openctf-1.6.0

Note

  • to run the project, the path ‘..\..\source’ to the OpenCTF source directory must be added to the project search path
  • developed and tested with Delphi 2009, newer Delphi versions might need an older version of DUnit (9.3.0 or 9.4.0)

Discover more from Habarisoft Blog

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *