Adding Windows Store Applications to the List of Tested Applications

Applies to TestComplete 15.48, last modified on March 01, 2023

If you are testing Windows Store applications, you may want to add them to the Tested Applications collection in your project.

Adding Windows Store Applications From TestComplete IDE

  1. If your project does not have the Tested Applications collection, add it:

    Add the Tested Apps collection to your project

    Click the image to enlarge it.

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

  3. On the first page of the wizard, choose Windows Store application.

  4. On the next page of the wizard, the Application package name drop-down list contains the package names of all Windows Store applications installed on your computer. Select the needed package name from the list.

  5. If needed, in the Command-line parameters box, enter the command-line options to pass to your Windows Store application.

  6. Click Finish to close the wizard. TestComplete will add the specified Windows Store application to the list of tested applications.

Adding Windows Store Applications From Tests

Instead of configuring the Tested Applications collection manually before running tests, you can add your Windows Store application to the Tested Applications collection directly from tests. To do this, use the TestedApps.AddWinStoreApp method:

TestedApps.AddWinStoreApp(AppName)

The method takes the following parameters:

  • AppName - The name of the application package as it is specified in the application’s package manifest. For example, Microsoft.BingMaps. The application must be installed on your computer.

The method returns the index of the newly added application in the Tested Applications collection.

The example below shows how to add a Windows Store application to the Tested Application collection and run the application.

JavaScript, JScript

function Test()
{
  // Adds a Windows Store application to the project
  var index = TestedApps.AddWinStoreApp("Microsoft.SDKSamples.Hilo.JS");
  var app = TestedApps.Items(index);

  // Launches the application
  app.Run();

  // Tests the application
  …
}

Python

def Test():
  # Adds a Windows Store application to the project
  index = TestedApps.AddWinStoreApp("Microsoft.SDKSamples.Hilo.JS")
  app = TestedApps.Items[index]
  
  # Launches the application
  app.Run()
  
  # Tests the application
  # ...

VBScript

Sub Test
  Dim index, app

  ' Adds a Windows Store application to the project
  index = TestedApps.AddWinStoreApp("Microsoft.SDKSamples.Hilo.JS")
  Set app = TestedApps.Items(index)

  ' Launches the application
  app.Run

  ' Tests the application
  …

End Sub

DelphiScript

procedure Test;
var index, app;
begin
  index := TestedApps.AddWinStoreApp('Microsoft.SDKSamples.Hilo.JS');
  app := TestedApps.Items(index);

  // Launches the application
  app.Run;

  // Tests the application
  …
end;

C++Script, C#Script

function Test()
{
  // Adds a Windows Store application to the project
  var index = TestedApps["AddWinStoreApp"]("Microsoft.SDKSamples.Hilo.JS");
  var app = TestedApps["Items"](index);
  // Launches the application
  app["Run"]();

  // Tests the application
  …
}

See Also

Testing Windows Store Applications
Deploying Windows Store Tested Applications on Test Computers

Highlight search results