Runtime Loader Page Description

Applies to TestComplete 12.60, last modified on September 17, 2018

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.

Specifying the Tested Movie 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.

    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.

Automating the Tested Movie Launch

To use Runtime Loader in automated tests, you need 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 adding the RuntimeLoader.html page as a tested application to your project:

  1. Open your test project in TestComplete.

  2. If the project does not contain the Tested Applications project item, add this item to the project. To do this:

    • Right-click the project in the Project Explorer panel (by default, it is on the left of the TestComplete window), and select Add | New Item from the context menu.

    • In the subsequent dialog, select Tested Applications and click OK.

  3. Right-click the Your_Project | TestedApps node in the Project Explorer and select Edit from the context menu. This will display the Tested Applications editor.

  4. Right-click somewhere within the editor and then click Add Application. TestComplete will open the Add Tested Application wizard.

  5. In the wizard, select Web Application. The wizard will open the Add a new Web application page.

  6. On the page:

    • In the Web browser box, specify the web browser, in which the page will be opened. For the list of the supported web browsers, see Requirements for Testing Flash and Flex Applications.

    • In the Page URL box, specify the URL of the RuntimeLoader.html file on the server.

      If your tested application and Runtime Loader are located on a web server, you should specify a URL like the one below:

      http://myserver/MyApp/RuntimeLoader.html?url=MyApp.swf&useNetwork=true

      If you run Runtime Loader from a local hard drive, specify a URL like this one:

      file:///C:/MyApp/RuntimeLoader.html?url=MyApp.swf&useNetwork=false

      In the URL, you should set the needed values in the following query string parameters (the parameters are highlighted in the examples above):

      • url - The URL of the SWF file to be tested. The path can be either relative or absolute.

      • useNetwork - A flag that specifies whether the tested application was compiled to be able to use network resources (the -use-network compiler option was set to true) or whether it was compiled to be able to access only local file system resources (the -use-network compiler option was set to false). For applications with network access enabled, set this flag to true. For applications compiled to use only local file system resources, set it to false. The default value of the parameter is false.

    • Click Finish to close the wizard and to apply the settings.

      TestComplete will add the page to the tested applications list of your project.

Now Runtime Loader will start and load your Flash or Flex application when you launch tested applications in your tests, for example, when you use the TestedApp.Run script method or when you use the Run TestedApp operation in keyword tests. See Running Tested Applications.

See Also

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

Highlight search results