Which Testing Approach to Choose

Applies to TestComplete 15.70, last modified on December 17, 2024
Flash Player has reached end of life on December 31, 2020. Support for Flash and Flex applications is now deprecated in TestComplete and will be removed in a future release.

The information in this topic applies to web tests that locate web objects by using internal identification properties provided by TestComplete and run in local environments.

To test Flash and Flex applications, TestComplete needs to get access to their internals. Currently, you can get access to Flash and Flex applications and make them testable in several ways.

You can —

Each of these approaches has its specifics that may or may not match your testing needs.

This topic contains recommendations on choosing the best testing approach and a brief description of pros and cons of these testing approaches. We hope this information will help you decide which technique meets your testing needs best.

How to Choose the Best Approach for Testing?

To test Flash and Flex applications with TestComplete, you do not have to change applications’ source code, implement specific Automation API interfaces or change the build process. Usually, TestComplete can expose needed objects, methods and properties automatically.

Considering the specifics of possible testing approaches, we recommend the following strategy for choosing the best approach for testing your Flash or Flex application:

  1. Try using the debug version of Adobe Flash Player.

    This is the easiest way to make Flash and Flex applications testable and achieve the deepest access to applications’ internals.

    Note: You need to configure Flash Player for it to load the TestComplete FlashInjector.swf helper module.

    To learn how to use the approach, see —

    Testing Flash and Flex Applications with the Debug Version of Flash Player

    • Pros:

      • There is no need to recompile your application in any special way.

      • There is no need to copy additional files to the web server where the tested application resides. Therefore, you can test the release version of your application that is already deployed on a website on the Internet.

      • Provides the best possible object identification by TestComplete.

      • Provides scripting access to native methods and properties of Flash and Flex application objects.

      • Allows simultaneous testing of several SWF movies embedded into a single web page.

      • You configure your testing environment only once, you do not need to recompile and reconfigure each tested application.

    • Cons:

      • Requires that the debug version of the Adobe Flash Player web browser plugin be installed in the system.

      • Does not support applications running in Microsoft Edge or Internet Explorer 11 on Windows 10 (the debug version of Flash Player cannot be installed in these browsers on Windows 10).

      • Does not support applications created with ActionScript version 1 and 2.

      • Does not allow testing applications protected against running them with an additional SWF file preloaded.

      • Cannot be used to test applications in device clouds.

  2. If you can configure the application’s publishing settings, you can embed the FlexClient library into the application.

    For detailed instructions on how to include the FlexClient library into your application, see —

    Preparing Flash and Flex Applications for Testing with the FlexClient Library

    Although this approach requires additional preparations, it makes your application testable once it is compiled. It also resolves possible problems that may occur when you test your application under Runtime Loader.

    • Pros:

      • Provides the best possible object identification by TestComplete.

      • Provides scripting access to native methods and properties of Flash and Flex application objects.

      • Allows simultaneous testing of several SWF movies embedded into a single web page.

    • Cons:

      • Applications must be compiled with the TestComplete FlexClient automated testing library (see Preparing Flash and Flex Applications for Testing with the FlexClient Library).

      • The application size is increased (because of including the TestComplete FlexClient library).

      • Developers have to create special application builds that include the TestComplete FlexClient automated library for testing purposes.

      • Does not support applications created with ActionScript version 1 and 2.

  3. If you cannot change the application’s publishing settings, try using the TestComplete Runtime Loader to run your Flash or Flex application. See —

    Testing Flash and Flex Applications with the Runtime Loader Utility

    • Pros:

      • There is no need to recompile your application in any special way.

      • Provides the best possible object identification by TestComplete.

      • Provides scripting access to native methods and properties of Flash or Flex application objects.

    • Cons:

      • Some Flash and Flex applications and their wrapper web pages may interact and exchange data between each other. Runtime Loader loads only a .SWF file and does not load the application’s wrapper page. That is, in some cases, Runtime Loader cannot reproduce test conditions that are normal for the application under test. Therefore, you cannot test such an application properly by using the Runtime Loader utility.
      • Loading an application to an external container in the Runtime Loader application may affect the tested application’s functionality (see Limitations on Testing with the Runtime Loader Utility).

      • You need to copy Runtime Loader files to the computer where the tested Flash or Flex application resides.

      • Does not support applications created with ActionScript version 1 and 2.

      • Cannot be used to test applications in device clouds.

      • Allows testing only one SWF movie at a time.

      Some known limitations on using Runtime Loader are also listed in the Limitations on Testing with the Runtime Loader Utility topic.

  4. If you cannot recompile your application with the FlexClient library and testing under Runtime Loader causes problems, try to use the abilities provided by the MSAA engine.

    For this purpose, the application must be compiled with accessibility information. See —

    Preparing Flash and Flex Applications for Testing via the MSAA Engine

    This approach provides the least access to the application’s internals in comparison with the other approaches.

    • Pros:

      • Supports applications created with ActionScript version 1, 2 and 3.

      • Allows simultaneous testing of several SWF movies embedded into a single web page.

    • Cons:

      • Does not provide scripting access to native methods and properties of Flash and Flex objects.

      • Does not work in Microsoft Edge.

      • Not supported in Internet Explorer 11.

      • Not supported in Firefox x64.

      • Object identification is limited and depends on the accessibility information provided by the application to be tested. The object hierarchy exposed by TestComplete is much less detailed compared to the hierarchy that can be achieved with one of the other possible approaches to testing Flash and Flex applications.

      • The application needs to be compiled with accessibility information (see Preparing Flash and Flex Applications for Testing via the MSAA Engine).

See Also

Testing Flash and Flex Applications
Testing Flash and Flex Applications with the FlexClient Library
Testing Flash and Flex Applications with the Runtime Loader Utility
Limitations on Testing with the Runtime Loader Utility
Testing Flash and Flex Applications via the MSAA Engine

Highlight search results