Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi Equivalent To Visual Studio Coded UI Test?

As the title implies I am trying to figure out if there is a Delphi equivalent (whether built in or 3rd party component) of the coded UI test feature in Visual Studio 2010?

Thanks.

like image 302
Gary Becks Avatar asked Aug 12 '26 05:08

Gary Becks


1 Answers

Newer versions of Delphi include DUnit. DUnit includes special helper classes for automated UI testing. I read here that VS automatically creates the test code, this feature is not available in DUnit.

The code is in DUnit\src\GUITesting.pas and contains checks like

procedure CheckFocused(Control :TControl; Addrs :Pointer = nil); overload;
procedure CheckFocused(ControlName :string);                    overload;

procedure CheckEnabled(Control :TControl; Addrs :Pointer = nil);  overload;
procedure CheckEnabled(ControlName :string);                     overload;

procedure CheckVisible(Control :TControl; Addrs :Pointer = nil);  overload;
procedure CheckVisible(ControlName :string);                     overload;
procedure CheckVisible;  

Also related to Delphi UI testing is the Open Component Test Framework (OpenCTF) I wrote a while ago. This framework can be used to check all Forms and Frames in a Delphi application.

It is a rule-based test case generator for DUnit, and creates the tests at run time (it is not a source code generator). This has the advantage that test rules can be defined one time and then applied to all components of the project with one line of code.

It is open source, available at

http://sourceforge.net/projects/openctf/

like image 137
mjn Avatar answered Aug 14 '26 16:08

mjn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!