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)
Advertisement

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s