Page tree
Skip to end of metadata
Go to start of metadata

Automation Testing Surface Pro

Perfecto provides support for testing of Windows 10 applications developed for the Surface Pro 3 & 4 based on Microsoft WinAppDriver. Using Surface Pro devices connected to the Perfecto Lab you can:

  • Install the application onto the device (see below).
  • Create your WinAppDriver test script in any supported Remote WebDriver language using the Perfecto plugin for any of the supported IDE [Visual Studio, Eclipse, or IntelliJ] (see below).
  • Open the SurfacePro device from the Perfecto Lab and execute the script on the device, using WinAppDriver.
  • Retrieve the Perfecto report to see the results of the execution.
WinAppDriver supports Windows 10 PC only. There's no support by Microsoft for Windows 10 Mobile

Install the Application

To prepare the Windows 10 application for installation -

  • Develop the application in Visual Studio.
  • Use the CreateAppPackages tool of Visual Studio to generate a Store application package.
  • Compress the generated package into a .zip file. The entire appx folder should be compressed (for example, if you create a HelloWorld application, the tool will generate the components in a HelloWorld folder and the compression should be performed for this folder and its subfolders, as HelloWorld.zip)
  • Upload the compressed file to the Perfecto Repository.
  • Install the application manually onto the device, or (preferably) use the RemoteWebDriver capabilities to install the application (see below).

Test Development

Windows 10 Test Development on Perfecto CQ Lab is fully compliant with Microsoft WinAppDriver. Follow the official WinAppDriver documentation for detailed information on test development.

Desired Capabilities

The following specific desired capabilities apply to WinAppDriver on Perfecto CQ Lab.

Pay special attention to the following special considerations:

  • Specify the application to test using the following Desired Capabilities:
    • "app" - used to specify the Repository file that contains the application package to be installed on the Surface Pro device.
    • "winAppId" - indicates the Windows app package identifier. This should be provided by the developer.
      • If the package identifier is not known - install the application onto a Surface Pro device and then, using the Interactive mode, use the Get-AppxPackage tool of the PowerShell to check for the package identifier, listed as the PackageFamilyName. Append the string "!App" to the package identifier provided by the tool.

Java

Java
capabilities.setCapability("app","PUBLIC:/PMTestAppWin10_1.0.7.0_Debug_Test.zip");
capabilities.setCapability("winAppId","com.perfecto.pmtestappwin10_r8aakf30rbczp!App");


C#

C#
capabilities.SetCapability("app","PUBLIC:/PMTestAppWin10_1.0.7.0_Debug_Test.zip");
capabilities.SetCapability("winAppId","com.perfecto.pmtestappwin10_r8aakf30rbczp!App");


The identifier is the PackageFamilyName of the application retrieved from the Get-AppxPackage (see red box), with the "!App" string appended

Specify the device to test on using the regular device capabilities - specifically "model", "platformName", "platformVersion", and "deviceName".

Object Spy

Perfecto Object Spy is not supported for Windows 10 applications. Use the Windows 10 inspect application, in Interactive mode, to retrieve the element names. inspect should be installed on the Surface Pro.

The following shows the inspect information for the Calculator application:

GitHub Samples

 

  • No labels