Instrumenting Xbox (One, Series X/S) apps¶
- Xbox (One, Series X/S)
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 Suitest instrumentation library, ensure you do not accidentally release the app to production with the Suitest code included. Suitest code is intended for testing and could impact the user experience of your application.
To instrument your Xbox (One, Series X/S) native app:
-
Install related Suitest instrumentation library directly from your Visual Studio through NuGet package manager.
-
Call
Suitest.Initialize()
fromOnLaunched
method in theApp.xaml.cs
file.protected override void OnLaunched(LaunchActivatedEventArgs e) { // ... your code #if SUITEST SuitestLibrary.Suitest.Initialize(); #endif }
-
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).
-
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¶
-
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. -
Whitelist your app's domain in the
Package.appxmanifest
under the Content URIs section and change WinRT Access to All. -
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/
andhttps://*.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:
-
For apps with local context you will additionally have to whitelist the Suitest domain in the
Package.appxmanifest
under theContent URIs
section -https://*.suite.st
. -
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).
-
Select Inject the library automatically on the App platform tab. Then upload the app package under the App details tab.
If the process fails, please follow the manual instrumentation below based on your app's context.
Local context¶
-
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).
-
Whitelist Suitest domains in the
Package.appxmanifest
under the Content URIs section: -
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¶
-
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. -
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
-
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:
-
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. -
Whitelist your app's domain in the
Package.appxmanifest
under the Content URIs section and change WinRT Access to All. -
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/
andhttps://*.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:
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.
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.