Instrumenting Xbox One apps

Instrumenting Xbox One app takes only a few easy steps. At this point you should have configured Xbox One in your Suitest account.


Native apps

Suitest supports UWP apps, written in C# and XAML. Apps created in C++, Visual Basic and XAML should work as well, however, we do not guarantee full support.

Instrumentation library in production

When inserting the instrumentation library you must make sure, that you don't accidentally release the app to production with Suitest code in it. Suitest code is intended for testing and could damage the user experience of your app's users.

To instrument your Xbox One native app:

  1. Install Suitest instrumentation library for Xbox One directly from your Visual Studio through NuGet package manager.

  2. Call Suitest.Initialize() from OnLaunched method in the App.xaml.cs file.

    protected override void OnLaunched(LaunchActivatedEventArgs e)
    {
    
        // ... your code
    
        #if SUITEST
        SuitestLibrary.Suitest.Initialize();
        #endif
    }
    
  3. Update the package manifest:

    In Visual Studio, navigate to your app's project manifest (Package.appxmanifest) then select the Capabilities tab, and check Internet (Client).

  4. Optionally create a dedicated configuration for building your app with the instrumentation library enabled. Refer to managing Xbox One native app builds section.

HTML apps

Suitest supports Xbox One apps built in HTML5. To instrument your HTML5 Xbox One app depends on if the application is hosted or local.

Hosted app

  1. Copy and paste the code snippet from the Suitest configuration page into every HTML file of your application.

  2. Whitelist your app's domain in the Package.appxmanifest under the Content URIs section and change WinRT Access to All.

  3. Update the package manifest:

    In Visual Studio, navigate to your app's project manifest (Package.appxmanifest) then select the Capabilities tab, and check Internet (Client).

Local app

Suitest can automatically inject the instrumentation library into your application package.

Please make sure to do the following before uploading your package for automatic instrumentation:

  1. For apps with local context you will additionally have to whitelist the Suitest domain in the Package.appxmanifest under the Content URIs section - https://*.suite.st.

  2. Update the package manifest:

    In Visual Studio, navigate to your app's project manifest (Package.appxmanifest) then select the Capabilities tab, and check Internet (Client).

  3. Select Inject the library automatically on the App platform tab. Then upload the app package under the App details tab.

    Inject the library automatically
    Inject the library automatically

If the process fails, please follow the manual instrumentation below based on your app's context.

Local context

  1. Insert the following code into every page of your application that you want to test. For best results put it as the first script element in your HTML file right after the opening tag:

    <script src="/suitest.js"></script>
    

    The JavaScript (suitest.js) file is our instrumentation library. It is automatically uploaded to the app's installation folder on the device. If this file is not present in the app's folder there will be no connection between the app and Suitest (you will not see the Suitest badge on the screen of the device).

  2. Whitelist Suitest domains in the Package.appxmanifest under the Content URIs section:

    Whitelist - https://*.suite.st
    Whitelist - https://*.suite.st
  3. Update the package manifest:

    In Visual Studio, navigate to your app's project manifest (Package.appxmanifest) then select the Capabilities tab, and check Internet (Client).

Important: If you have Xbox One with OS version 10.0.17763.2023 please refer to this version's specific section.

Web context

  1. Copy and paste the code snippet from the Suitest configuration page into every HTML file of your application. For best results put it as the first script element in your HTML file right after the opening tag.

  2. In the Package.appxmanifest under the Content URIs do the following:

    • Whitelist ms-appx-web:/// or app's domain name if your app is hosted.
    • Set WinRT Access to All.
    Whitelist - ms-appx-web:///
    Whitelist - ms-appx-web:///
  3. Update the package manifest:

    In Visual Studio, navigate to your app's project manifest (Package.appxmanifest) then select the Capabilities tab, and check Internet (Client).

Uploading app package

Once you have instrumented the code create an app package using your Visual Studio and archive it to a .zip file. Your ZIP file should have the following content:

Xbox One ZIP package content
Xbox One ZIP package content

Upload the created ZIP file to Suitest at the app configuration page. Suitest will automatically install or update the package on the device as necessary when you try running the app on this device.

If you use Suitest Network API you can also send the package with an API request. Suitest will automatically install or update the package on the device as necessary when you try running the app on this device.