Version: Unity 6.2 (6000.2)
Language : English
Command-line reference
Performing actions before and after tests

Writing tests

Use the Unity Test Framework APIs to write tests specially adapted to the unique features of the Unity Editor and runtime.

Topic Description
Performing actions before and after tests Perform pre-test setup and post-test cleanup to ensure your tests run in the right conditions.
Asserting and comparing Perform assertions with constraints and compare the values of custom Unity types in your tests.
Yield instructions for the Editor Yield instructions for the Unity Editor from your Edit mode tests, using either a set of pre-defined common instructions or defining your own.
Writing parameterized tests Write parameterized tests for data-driven testing.
Writing asynchronous tests Write asynchronous tests with the .NET Task asynchronous programming model.

Additional resources

Command-line reference
Performing actions before and after tests
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961