Version: Unity 6.2 (6000.2)
Language : English
17. Running tests programmatically
1. Setting up LostCrypt

Testing Lost Crypt

Welcome to the this training material for the Unity Test Framework (UTF).

The training is structured with a selection of exercises, starting with more basic topics and then expanding on that knowledge.

Each section has a Learning Objectives section, which can help you pick what exercises will teach you new things. The exercises are grouped thematically and their difficulty varies.

This course focus on testing an actual game. Our candidate is the LostCrypt example project.

Course outline

Topic Description
Setting up Set up a simple Unity 2D project and import a sample project (LostCrypt).
Running a test in LostCrypt Set up a simple Play mode test for LostCrypt.
Moving character Use the Unity InputSystem package to have a generic way of moving your character programmatically in tests.
Reach wand test Perform assertions on your character position and behavior.
Collision test Check for collisionsA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info
See in Glossary
and make sure that LostCrypt does not have bugs that allow your character to move outside the map.
Asset change test Use a common pattern in game testing to verify if assets change over time.
Scene validation test Test the sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
for the presence of specific game objects and make this test use all scenes as fixtures.
Performance tests Extend Unity Test Framework with performance tests.

Additional resources

General Introduction course

17. Running tests programmatically
1. Setting up LostCrypt
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961