Running Tested Applications With Runtime Loader

Applies to TestComplete 15.47, last modified on January 20, 2023
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.

This topic describes how to run the tested Flash or Flex application under the Runtime Loader utility manually and how to automate this process.

Before You Begin

  • Regardless of the way you choose, you should use the RuntimeLoader.html page that you copied to the computer where the tested Flash or Flex application is located.

  • If you run Runtime Loader and the tested application from a local file system, you need to add the application’s folder to Flash Player's list of trusted locations. For detailed information on how you can do that, see the Setting Security Permissions topic.

Specify the Tested Application Manually

  1. Open the RuntimeLoader.html web page in a web browser (for the list of the supported web browsers, see Requirements for Testing Flash and Flex Applications).

  2. In the edit box on the page, specify the URL of the SWF file to be run for testing. You can specify a location which is relative to Runtime Loader’s location or specify an absolute path. If Runtime Loader resides in the same folder where the tested SWF file is located, then you can just enter the SWF file’s name with the .swf extension.

    Launching a tested application with Runtime Loader

    If the application is run on a web server, the absolute path to the SWF file can be specified in the following format:

    http://myserver/TestedApp/MyApp.swf
    The SWF file of the application to be tested and Runtime Loader must reside on the same web server. Otherwise, you will not be able to test the application.

    If the application resides on a local hard drive, you can specify the absolute path to the SWF file in either of the following formats:

    file:///C:/TestedApp/MyApp.swf
      -- or --
    C:\TestedApp\MyApp.swf
  3. Specify the type of resources which the tested application can access (it depends on the value set in the -use-network compiler option when compiling the application to be tested):

    • Select the Network (http://) option on the RuntimeLoader.html web page if the tested application was compiled to be able to use network resources (that is, if it was compiled with the -use-network compiler option set to true).

    • Select the Local file system (file:///) option on the RuntimeLoader.html web page if the application was compiled to be able to access only local file system resources (the -use-network compiler option was set to false).

  4. Click the Load SWF button to load and run the specified SWF file.

Automate the Tested Application Launch

To use Runtime Loader in automated tests, you may want to automate the launch of your Flash or Flex application within Runtime Loader. A possible approach is to record the manual launch actions described above and use the recorded test commands to simulate the launch. However, we would recommend that you use the Browsers.Item.Run method or the Run Browser operation:

  1. Open your test project in TestComplete.

  2. Select the test to which you want to add the commands that will run your tested application, or create a new test.

  3. Add the commands that will launch your tested application with Runtime Loader to your test:

    If you use keyword tests

    If you use script tests

Now Runtime Loader will start and load your Flash or Flex application when you start your test.

See Also

Runtime Loader Files
Preparing Flash and Flex Applications for Testing with the Runtime Loader Utility

Highlight search results