Autopilot for Delphi - Fully automated Delphi app testing

I just released Autopilot v3.0.

Autopilot for Delphi hands the controls of your running VCL or FMX app to the AI. It can click all controls, type text into edit boxes, read the labels, set and read any property, take screenshots — the same loop a human operator runs, except the assistant does it on its own.

Add one single line of code to your project, and the wall is gone. And it does all this in the background without moving the mouse! You can proceed with your daily tasks while the AI tests in the background.

DON’T TREAT IT LIGHTLY! It is way more powerful that it seems at the first look. Testing is one of the few categories where the AI is significantly better than the human. This tool allows the AI to fully take over testing!

Full source code available: Autopilot for Delphi - AI drives and tests your VCL/FMX app

4 Likes

Somebody posted a video: https://www.youtube.com/watch?v=hSIAiL7Gz2A

1 Like

This looks like something that would be worth publishing as dpm packages (probably split into client and bridge packages) :wink:

2 Likes

I promise will try (as much as the time allows it for a free library :money_mouth_face:). But first GetIt because I had lots of requests for that.

By which way the app is tested during run-time (eg: click the button that increments) and apparently on the same app instance, a checkbox is added? I believe the RTTI framework is included in the binary, isn’t it?

@dcabale

I know if I understand this question exactly.
BUT, if you wonder “how an outside tool reaches inside a running EXE”?

Answer: In “Debug” mode, some Autopilot units (aka “the bridge”) are compiled into the app (via StartBridge in the .dpr). They open a communication pipe. The AI talks to that pipe through Autopilot.Mcp.exe, and the bridge runs each command on the app’s main thread. No restart, no second instance.

In “Release” mode that bridge disappears (is not compiled in).


“Is RTTI included in the binary?”

Yes. Every Delphi EXE carries RTTI for published properties (the DFM loader needs it), and the bridge reads it through System.Rtti. You add nothing extra (the exe is not getting bigger - because of the RTTI).

These 2 things together creates the “magic” you see.


a checkbox is added

I think you mean “check mark” not “check box”. Right?
If this is your question, then the answer is simple: the Autopilot find the checkbox by name or text (caption) and it changes its value. Not a big deal at all :slight_smile:


Check my website. Some of the explanations are already there.
For how it finds the checkbox, look at the list_tree command.


Thank you Delphi, thank you RTTI :slight_smile:

1 Like

How would this work, if the target Delphi app is embedding Edge, and basically all of the UI is in a webpage open inside?

I.e.: this is powerful functionality, but there are so many WEB applications around, that being able to automate / test them can add a lot of extra value.

I guess it could be able to expose the page’s DOM, but if that’s complicated and uses auto-generated control names, it would probably be impractical.

This was actually one of the things I was trying to do earlier in the year, but it went nowhere, just because of these simple things I mentioned above. I wish I could resurrect and complete that…

Alex

Thanks, I have installed it. I am not doing VCL/FMS apps at the moment, My current project is a Webapp. And Claude can already do this for WebApps - which works really well.

This will be helpful, when I get back to VCl.

1 Like