Instrumenting Xbox (One, Series X/S) apps

Instrumenting your application takes only a few easy steps. At this point you should have your device configured in your Suitest account.

Only .zip package file extension is supported. For more information see the Uploading package to Suitest section below.


Native apps

Suitest supports UWP apps, written in C# and XAML or Visual Basic and XAML.

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, Series X/S) native app:

  1. Install related Suitest instrumentation library 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 native app builds section.

HTML apps

Suitest supports Xbox (One, Series X/S) apps built in HTML5. The way of instrumenting your HTML5 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. For best results put it as the first script element in your HTML file right after the opening tag.

  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).

Suitestify: If you plan to use Suitestify, also whitelist the Suitestify domains http://*.suitest.net/ and https://*.suitest.net/. Make sure to also change WinRT Access to All.

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

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

  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 a console 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:///

  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).

HTML hosted (WebView) apps

You can use all the possible programming languages combinations:

  • C# and XAML
  • C++ and XAML
  • Visual Basic and XAML

The process of adding the instrumentation library into your application:

  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. 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).

Suitestify: If you plan to use Suitestify, also whitelist the Suitestify domains http://*.suitest.net/ and https://*.suitest.net/. Make sure to also change WinRT Access to All.

Uploading package to Suitest

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:

Application ZIP package content

Upload the created ZIP file to Suitest at the app configuration page. If you are using an HTML hosted (WebView) app then do not forget to check the "This is an HTML based application" checkbox under the file name before saving.

This is an HTML based application - checkbox

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.

Setting up Suitestify

You can optionally set up Suitestify with any HTML based hosted application.