Setting up Xbox (One, Series X/S) apps¶
- Xbox (One, Series X/S)
At this point you should have a working Xbox (One, Series X/S) device configured in your Suitest account.
Only
.zip
package file extension is supported.
Suitest supports testing of both WebView and Native applications. In addition to that, Suitest also supports HTML5 apps (see below).
WebView apps¶
Considering the Native part of the app, we support you all the possible programming language combinations:
- C# and XAML
- C++ and XAML
- Visual Basic and XAML
For Suitest to work, it needs to communicate with your app.
-
For WebView2 apps with correct configuration, we recommend using Lite method
-
For other cases, you need to manually insert the instrumentation library
Lite support for WebView2 apps¶
In order to make Lite method working with the app, please set the environment variable by adding the following line into your code of your Xbox app.
Environment.SetEnvironmentVariable("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", "--enable-features=msEdgeDevToolsWdpRemoteDebugging");
If you are interested in more information, see Microsoft documentation.
Manual insertion of Instrumentation library into WebView apps¶
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.
Setting up Suitestify¶
You can optionally set up Suitestify with any HTML-based hosted application.
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 test your Xbox (One, Series X/S) native app, you need to Manually insert Suitest instrumentation library:
-
Install the 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.
-
Inside the Suitest app configuration, make sure that you have Insert library manually option selected.
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.
HTML apps (old)¶
Suitest also supports local and hosted HTML5 apps.
Hosted apps¶
-
Copy the following snippet, replace the
tag.appId
with your Suitest app ID and paste it 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<script src="https://il.suite.st/app/appId.js"></script>
-
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 apps¶
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 (HTML local apps only) on the App platform tab. Then upload the app package on 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 the following snippet, replace the
tag.appId
with your Suitest app ID and paste it 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<script src="https://il.suite.st/app/appId.js"></script>
-
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).
Next steps¶
Once the setup is done, upload the package into Suitest.