在 HoloLens 上测试应用Testing your app on HoloLens

测试 HoloLens 应用程序类似于测试 Windows 应用程序。Testing HoloLens applications is similar to testing Windows applications. 你仍需要考虑功能、互操作性、性能、安全性、可靠性等。You still need to consider functionality, interoperability, performance, security, reliability, and so on. 但是,PC 或手机应用中未弹出的某些区域需要特殊处理。However, some areas that don't pop up in PC or phone apps require special handling. 全息应用需要在一组不同的环境中顺利运行。Holographic apps need to run smoothly in a diverse set of environments. 它们还需要始终保持性能和用户舒适。They also need to maintain performance and user comfort at all times. 本指南可帮助你测试这些区域。This guide is here to help you with testing these areas.


全息应用需要在一组不同的环境中顺利运行。Holographic apps need to run smoothly in a diverse set of environments. 它们还需要始终保持性能和用户舒适。They also need to maintain performance and user comfort at all times. 性能对用户使用全息版应用程序的体验非常重要,我们有一个专门的主题。Performance is so important to the user's experience with a Holographic app that we have an entire topic devoted to it. 请确保阅读并遵循 混合现实的了解性能Make sure you read and follow the Understanding Performance for Mixed Reality

在三维中测试3DTesting 3D in 3D

  1. 在尽可能多的不同空间中测试您的应用程序。Test your app in as many different spaces as possible. 尝试大房间、小房间、bathrooms、kitchens、间卧室、办公室等。Try in large rooms, small rooms, bathrooms, kitchens, bedrooms, offices, and so on. 还需要考虑使用非标准功能的房间,如非垂直壁、弯曲壁、非水平上限。Also take into consideration rooms with non-standard features such as non-vertical walls, curved walls, non-horizontal ceilings. 当在房间间过渡时,它是否能正常工作,并经历走廊或楼梯?Does it work well when transitioning between rooms, floors, going through hallways or stairs?
  2. 在不同的照明条件中测试您的应用程序。Test your app in different lighting conditions. 它是否能正确响应光源、黑色曲面等不同环境条件,以及镜像和玻璃壁等不同环境条件。Does it respond properly to different environmental conditions like lighting, black surfaces, and transparent or reflective surfaces like mirrors and glass walls.
  3. 在不同的动作条件中测试您的应用程序。Test your app in different motion conditions. 放在设备上,尝试各种运动状态的方案。Put on device and try your scenarios in various states of motion. 它是否响应了不同的移动或稳定状态?Does it respond properly to different movement or steady state?
  4. 测试应用程序在不同角度的工作方式。Test how your app works from different angles. 如果你有世界各地锁定的全息图,则当你的用户执行此操作时,会发生什么情况?If you have a world locked hologram, what happens if your user walks behind it? 如果用户与全息影像之间发生了什么情况?What happens if something comes between the user and the hologram? 如果用户查看上面或下面的全息图,该怎么办?What if the user looks at the hologram from above or below?
  5. 使用空间和音频提示。 请确保应用使用空间和音频提示来防止用户丢失。Use spatial and audio cues. Make sure your app uses spatial and audio cues to prevent the user from getting lost.
  6. 在不同的环境噪音级别测试应用。Test your app at different levels of ambient noise. 如果你已经实现了语音命令,请尝试对它们调用不同的环境噪音级别。If you've implemented voice commands, try invoking them with varying levels of ambient noise.
  7. 测试您的应用程序的安装Test your app seated and standing. 请确保从座位和位置进行测试。Make sure to test from both seating and standing positions.
  8. 从不同的距离测试你的应用程序Test your app from different distances. UI 元素是否可以从远处开始进行读取和交互?Can UI elements be read and interacted with from far away? 您的应用程序是否会对用户与全息影像非常接近的用户做出反应?Does your app react to users getting too close to your holograms?
  9. 针对常见的应用程序栏交互测试您的应用程序Test your app against common app bar interactions. 所有应用磁贴和2D 通用应用都具有一个 应用栏 ,可用于控制混合环境中的应用位置。All app tiles and 2D universal apps have an app bar that lets you control the apps position in the Mixed World. 请确保单击 "删除" 以正常结束应用过程,并确保在二维通用应用的上下文中支持 "后退" 按钮。Make sure clicking Remove ends your app process gracefully and that the Back button is supported within the context of your 2D universal app. 尝试在 " 调整" 模式下 进行缩放并将其移动到 "调整" 模式,同时处于活动状态,而是 "已暂停应用" 磁贴。Try scaling and moving your app in Adjust mode both while it's active, and while it's a suspended app tile.

环境测试矩阵Environmental test matrix

用于 HoloLens 应用开发的环境测试矩阵


  1. 剪辑平面。Clip planes. 要留心到 呈现全息影像的位置。Be attentive to where holograms are rendered.
  2. 避免与实际头运动不一致的虚拟移动。Avoid virtual movement inconsistent with actual head movement. 避免以不代表用户实际运动的方式移动相机。Avoid moving the camera in a way that isn't representative of the user's actual motion. 如果你的应用程序要求通过场景移动用户,则可预测运动,尽量减少加速度,并让用户控制移动。If your app requires moving the user through a scene, make the motion predictable, minimize acceleration, and let the user control the movement.
  3. 按照全息图质量指导原则进行操作。Follow the hologram quality guidelines. 实现 全息影像质量指导的高 性能应用程序不太可能导致用户 discomfort。Performant apps that implement the hologram quality guidance are less likely to result in user discomfort.
  4. 横向分布全息影像,而不是垂直分布。Distribute holograms horizontally rather than vertically. 强制用户花很长时间查找或缩小可能会导致疲劳。Forcing the user to spend extended periods of time looking up or down can lead to fatigue in the neck.


交互模型Interaction models

请确保全息影像交互适用于所选的 交互模型Make sure the hologram interactions work with your chosen interaction model. 如果需要支持辅助功能,则最好使用鼠标和键盘之类的其他附件进行验证。It's also a good idea to validate with different accessories like mouse and keyboard if they're needed to support accessibility.

当你的应用程序具有与鼠标和触控不同的行为时进行验证。Validate when your app has a different behavior with mouse and touch. 确定不一致并帮助设计决策,使用户更自然地体验体验。Identifies inconsistencies and help with design decisions to make the experience more natural for users. 例如,根据悬停触发操作。For example, triggering an action based on hover.

自定义语音命令Custom voice commands

语音输入 是一种自然的交互方式。Voice input is a natural form of interaction. 用户体验可能会神奇或混淆,具体取决于你选择的命令以及如何公开它们。The user experience can be magical or confusing depending on your choice of commands and how you expose them. 通常,不应将系统语音命令(如 "Select" 或 "你好 Cortana")用作自定义命令。As a rule, you shouldn't use system voice commands such as "Select" or "Hey Cortana" as custom commands. 下面是几个需要注意的要点:Here are a few points to consider:

  1. 避免使用类似的命令。Avoid using commands that sound similar. 可能会触发错误的命令。Can potentially trigger the incorrect command.
  2. 尽可能选择发音丰富的字词。Choose phonetically rich words when possible. 最小化和/或避免错误激活。Minimizes and/or avoid false activations.


用户可以通过 外围设备与你的应用进行交互。Users can interact with your App through peripherals. 应用无需执行任何特殊操作即可利用此功能,但有几个值得注意的事项。Apps don't need to do anything special to take advantage of that capability, however there are a couple things worth checking.

  1. 验证自定义交互。Validate custom interactions. 例如,应用的自定义键盘快捷方式。Things like custom keyboard shortcuts for your app.
  2. 验证切换输入类型。Validate switching input types. 尝试使用多个输入方法完成同一方案中的任务,如语音、手势、鼠标和键盘。Attempting to use multiple input methods to complete a task, such as voice, gesture, mouse, and keyboard all in the same scenario.

系统集成System integration


在未连接电源的情况下测试应用程序,以了解它消耗电池的速度。Test your application without a power source connected to understand how quickly it drains the battery. 通过查看电源 LED 读数,可以轻松地了解电池状态。One can easily understand the battery state by looking at Power LED readings.

指示电池电量的 LED 状态

指示电池电量的 LED 状态LED states that indicate battery power

电源状态转换Power state transitions

验证密钥方案在电源状态之间转换时按预期方式工作。Validate key scenarios work as expected when transitioning between power states. 例如,应用程序是否仍保留在其原始位置?For example, does the application remain at its original position? 它是否正确保存其状态?Does it correctly persist its state? 它是否继续按预期方式工作?Does it continue to function as expected?

  1. 备用/继续。Stand-by / Resume. 若要进入备用状态,可以立即按下并释放电源按钮。To enter standby, one can press and release the power button immediately. 设备还会在处于非活动状态3分钟后自动进入待机状态。The device also will enter standby automatically after 3 minutes of inactivity. 若要从待机状态恢复,可以立即按下并释放电源按钮。To resume from standby, one can press and release the power button immediately. 如果将设备连接或断开连接电源,该设备也会恢复。The device will also resume if you connect or disconnect it from a power source.
  2. 关闭/重新启动。Shutdown / Restart. 若要关闭,请按住电源按钮6秒钟。To shut down, press and hold the power button continuously for 6 seconds. 若要重新启动,请按 "电源" 按钮。To restart, press the power button.

多应用方案Multi-app scenarios

在应用程序之间切换时验证核心应用程序的功能,尤其是在实现后台任务的情况下。Validate core app functionality when switching between apps, especially if you've implemented a background task. 如果适用,还需要检查复制/粘贴和 Cortana 集成。Copy/Paste and Cortana integration are also worth checking where applicable.


使用遥测和分析指导你。Use telemetry and analytics to guide you. 将分析集成到你的应用可帮助你从 Beta 测试人员和最终用户那里获取有关应用的见解。Integrating analytics into your app will help you get insights about your app from your Beta testers and end users. 此数据可用于在提交到应用商店之前优化你的应用,并用于将来的更新。This data can be used to help optimize your app before submission to the Store and for future updates. 这里有许多分析选项。There are many analytics options out there. 如果你不确定从何处开始,请查看 App InsightsIf you're not sure where to start, check out App Insights.

要考虑的问题:Questions to consider:

  1. 用户如何使用空间?How are users using the space?
  2. 应用在世界中放置对象的方式-能否检测问题?How is the app placing objects in the world - can you detect problems?
  3. 它们在应用程序的不同阶段花费了多少时间?How much time do they spend on different stages of the application?
  4. 在应用程序中花费了多少时间?How much time do they spend in the app?
  5. 用户尝试使用的最常见使用路径是什么?What are the most common usage paths the users are trying?
  6. 用户是否遇到意外状态或错误?Are users hitting unexpected states or errors?

模拟器和模拟输入Emulator and simulated input

HoloLens 模拟器是一种有效的方式,可以使用不同种类的模拟用户特征和空间来有效地测试全息应用。The HoloLens emulator is a great way to efficiently test your Holographic app with different kinds of simulated user characteristics and spaces. 下面是一些建议,用于有效地使用模拟器来测试应用程序:Here are some suggestions for effectively using the emulator to test your app:

  1. 使用模拟器的虚拟房间展开测试。Use the emulator's virtual rooms to expand your testing. 模拟器附带一组虚拟房间,可用于在更多环境中测试应用。The emulator comes with a set of virtual rooms that you can use to test your app in even more environments.
  2. 使用模拟器,查看所有角度的应用。Use the emulator to look at your app from all angles. PageUp/PageDn 键会使模拟用户更高或更短。The PageUp/PageDn keys will make your simulated user taller or shorter.
  3. 使用真实的 HoloLens 测试应用。Test your app with a real HoloLens. HoloLens 模拟器是一种很好的工具,可帮助你快速地循环访问应用并捕获新的 bug,但请确保在提交到 Windows 应用商店之前,还需在物理 HoloLens 上进行测试。The HoloLens Emulator is a great tool to help you quickly iterate on an app and catch new bugs, but make sure you also test on a physical HoloLens before submitting to the Windows Store. 这一点非常重要,可确保性能和体验在真实硬件上非常重要。This is important to ensure that the performance and experience are great on real hardware.

通过感知模拟进行自动测试Automated testing with Perception Simulation

某些应用程序开发人员可能希望自动测试其应用程序。Some app developers might want to automate testing of their apps. 除了简单的单元测试以外,你还可以使用 HoloLens 中的 感知模拟 堆栈自动输入应用。Beyond simple unit tests, you can use the perception simulation stack in HoloLens to automate human and world input to your app. 感知模拟 API 可以向 HoloLens 模拟器或物理 HoloLens 发送模拟输入。The perception simulation API can send simulated input to either the HoloLens emulator or a physical HoloLens.

Windows 应用认证工具包Windows App Certification Kit

若要为你的应用程序提供在 Windows 应用商店上发布的最大机会,请在提交该应用程序进行认证之前,在本地对其进行验证和测试。To give your app the best chance of being published on the Windows Store, validate and test it locally before you submit it for certification. 如果你的应用面向 Windows 全息设备家族, Windows 应用程序认证工具包 将仅在你的电脑上运行本地静态分析测试。If your app targets the Windows.Holographic device family, the Windows App Certification Kit will only run local static analysis tests on your PC. 不会在 HoloLens 上运行任何测试。No tests will be run on your HoloLens.

另请参阅See also