> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liv.tv/llms.txt
> Use this file to discover all available pages before exploring further.

# Integration Testing

ntegration testing is critical to ensure that the LIV SDK works seamlessly within your Unreal Engine project. This section provides detailed instructions for verifying the SDK’s functionality, testing Mixed Reality (MR) features, and validating compatibility with both the stock Unreal Engine and the Meta Fork.

## **Why Integration Testing is Important**

Integration testing ensures:

* The LIV SDK is correctly installed and configured.
* Mixed Reality capture works as expected in both editor and packaged builds.
* Advanced features like transparency, global clipping planes, and Meta Presence Platform functionality are fully operational.
* Performance and compatibility meet project requirements.

## **Preparation for Testing**

Before beginning integration testing, ensure the following:

### **Prerequisites**

1. **LIV SDK Installed**:
   * Follow the steps outlined in [Installing and Configuring the LIV SDK](https://mrc-docs.liv.tv/sdk-for-unreal/installing-and-configuring).
2. **Meta Fork (Optional)**:
   * If using Meta-specific features, ensure the **Meta Fork** is installed and configured (see [Meta Fork Specifics](https://mrc-docs.liv.tv/sdk-for-unreal/meta-fork-specifics)).
3. **Hardware Setup**:
   * Connect a SteamVR-compatible devices (Oculus Quest, HTC Vive, Valve Index, etc)
4. **Packaging Configuration**:
   * Ensure the project is set up for **Windows 64-bit** builds and uses **DirectX 11** (mandatory for LIV).

## **Testing in the Editor**

### **Step 1: Enable VR Preview**

1. Launch your project in Unreal Editor.
2. Open the **VR Preview** mode:
   * Go to **Play > VR Preview** in the toolbar.

<img src="https://mintcdn.com/liv/v4zFUEfIihMyS4q1/images/mrc/1(3).png?fit=max&auto=format&n=v4zFUEfIihMyS4q1&q=85&s=047c615e55bba9ca00f2d2f444dd20fd" alt="1(3)" width="393" height="228" data-path="images/mrc/1(3).png" />

3. Verify that:
   * The LIV plugin is active.
   * Your VR headset is correctly tracked and rendering.

### **Step 2: Test MR Settings**

1. Navigate to **Edit > Project Settings > Plugins > LIV**.
2. Adjust the following settings to test different MR features:
   * **Capture Method**:
     * Test the different capture methods :
       * `ULivCaptureSingle`
       * `LivCaptureBackgroundTransparency`
       * `LivCaptureGlobalClipPlaneNoPostProcess`
       * `LivCaptureGlobalClipPlanePostProcess`
       * `LivCaptureMulti`
   * **Transparency**:
     * Enable transparency and test with translucent materials in the scene.

<img src="https://mintcdn.com/liv/o6CJmZJW7ShcAPtG/images/mrc/2(3).png?fit=max&auto=format&n=o6CJmZJW7ShcAPtG&q=85&s=7e52b5d12bca65661d71462e8ab67f70" alt="2(3)" width="593" height="211" data-path="images/mrc/2(3).png" />

**Background Only**:

* Toggle the background-only setting to verify its behavior.

<img src="https://mintcdn.com/liv/FAkfaAxCh6RIQfwX/images/mrc/3(2).png?fit=max&auto=format&n=FAkfaAxCh6RIQfwX&q=85&s=b2439c2a58aac51625d42f35fbe12f4d" alt="3(2)" width="401" height="38" data-path="images/mrc/3(2).png" />

### **Step 3: Test Meta Presence Platform Features**

(If using the Meta Fork)

1. Enable **Passthrough**, **Scene API**, and **Spatial Anchors** in **Project Settings > Meta XR**.
2. Use sample scripts from Meta’s documentation to validate these features in the editor.

<img src="https://mintcdn.com/liv/rOjkTDQ_qIFlf8D7/images/mrc/4(2).png?fit=max&auto=format&n=rOjkTDQ_qIFlf8D7&q=85&s=b54de2ac6eed65afcdbddf1e57e49a1f" alt="4(2)" width="655" height="481" data-path="images/mrc/4(2).png" />

## **Testing in Packaged Builds**

Testing in a packaged build is crucial as the LIV SDK’s MR functionality is primarily validated in fully packaged applications.

### **Step 1: Package the Project**

1. Open your Unreal Engine project.
2. Go to **File > Package Project > Windows**.
3. Choose an output directory for the packaged build.
4. Verify that:
   * The build configuration is set to **Development** or **Shipping**.
   * The **Default RHI** is set to **DirectX 11** in **Project Settings > Platforms > Windows**.

<img src="https://mintcdn.com/liv/rCtn5vMmaHe_RvRp/images/mrc/5(2).png?fit=max&auto=format&n=rCtn5vMmaHe_RvRp&q=85&s=b136d460fbbff7c6291942d80fea0865" alt="5(2)" width="689" height="92" data-path="images/mrc/5(2).png" />

### **Step 2: Test with the LIV App**

1. **Download the LIV App**:
   * Follow the setup instructions here: [LIV App Guide](https://help.liv.tv/hc/en-us/articles/19370309456402).
2. **Launch the Packaged Build**:
   * Run the `.exe` file generated during packaging.

<img src="https://mintcdn.com/liv/2_kW-hlzMFGXZyUM/images/mrc/6(2).png?fit=max&auto=format&n=2_kW-hlzMFGXZyUM&q=85&s=bf7441dd1a3036719a68059b6a36af32" alt="6(2)" width="267" height="147" data-path="images/mrc/6(2).png" />

3. **Open the LIV App**:

* Start the LIV App and verify it detects your packaged application.

<img src="https://mintcdn.com/liv/R97mnVaSu3zQwt_b/images/mrc/7(2).png?fit=max&auto=format&n=R97mnVaSu3zQwt_b&q=85&s=685a4599ed55141abba8c7585344eaa7" alt="7(2)" width="703" height="428" data-path="images/mrc/7(2).png" />

4. **Test MR Output**:
   * Select **Mixed Reality Capture** mode in the LIV App.
   * Validate the MR output in both **automatic** and **manual** launch modes:
     * **Automatic**: The LIV App detects the game automatically.
     * **Manual**: Manually select the `.exe` file in the LIV App.

### **Step 3: Validate Transparency and Global Clip Planes**

1. Ensure the following are active in your build:
   * **Transparency**:
     * Verify translucent objects render correctly in the MR output.
   * **Global Clip Plane**:
     * Test scenes with clipping planes and ensure objects are composited properly.

## **Performance Testing**

Testing the performance of MR capture ensures the LIV SDK operates smoothly without compromising the VR experience.

### **Step 1: Monitor Frame Rates**

1. Use the Unreal Engine **Stat Unit** and **Stat FPS** commands to monitor frame rates.
2. Ensure that enabling MR capture does not cause significant performance degradation.

### **Step 2: Test on Target Hardware**

1. Deploy the packaged build to a system with your target VR headset.
2. Validate that performance remains consistent across different hardware setups.

## **Tips for Successful Testing**

1. **Use Command-Line Logs**:
   * Launch the packaged application with the `log` flag to view detailed runtime logs.

     `"[GamePath]\MyGame.exe" -log`
2. **Simplify the Test Scene**:
   * Use a minimal scene for initial testing to isolate MR capture issues.
3. **Verify Engine Settings**:
   * Double-check all relevant settings in **Project Settings**, especially under **Plugins > LIV** and **Platforms > Windows**.
