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

AndroidAppmethodC++BuilderDelphiDemoFiremonkeyIOSOSXWindows

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

Delphi XE8 Firemonkey Test Harness Android 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
AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux

C++BuilderDelphiIDEWindows

Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows

AndroidC++BuilderDelphiFiremonkeyIOSLiveBindingsOSXWindows

Top Tips And Tricks To Speed Up Development With Delphi 10.4 FireMonkey On Android and IOS

Sign up for our Newsletter and
stay informed

Leave a Reply