Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!


Build Your Own Test Harness For #Delphi XE8 Firemonkey Apps On #Android And #IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE8 Firemonkey Test Harness Android IOS | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSIf you are building complex enterprise applications with Delphi XE8 Firemonkey you may want to look into building a test harness for your applications on Android, IOS, OSX, and Windows. Basically a test harness is an automated way of testing your application to make sure that it behaves like you want it to and that any changes that you make do not break functionality. Using a test harness is similar to unit testing except in this case you would be using the test harness to visually test your app. So to create a test harness you would need to create some kind of click and data entry automation system. The sample source code that I am including with this post will allow you to get a head start in creating such a system. What the sample code does is it uses app tethering to send an image of the current application via app tethering to a second application. It does this by using Firemonkey’s MakeScreenshot function on a TLayout control. All children of the TLayout are drawn in the screenshot. You can then send a click back from the second application to the first application where it clicks a button in the TLayout. Any additional functionality like actually entering text into a text box you would have to implement yourself. This method of sending clicks between two Firemonkey apps will also not work with controls like TWebBrowser and probably TMapView because those are native controls. The code for this sample originated in the TImageCacheLayout component. You could also use this same code to remotely control a Firemonkey app. You can also take a look at the Accessibility Pack for Delphi XE8 Firemonkey which may allow you to build a test harness using the accessibility functionality. This sample code should also work in Appmethod.

Download the test harness sample source code for Delphi XE8 Firemonkey on Android and IOS.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts

Unleashing Creativity With Song Writer AI: A Deep Dive


How To Build Stable Diffusion Text To Image Prompts


FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes


Ryzen 9 5950x: One Billion Lines Of Delphi Code Compiled In ~5 Minutes On 16 Cores

Sign up for our Newsletter and
stay informed

Leave a Reply