docs.unity.cn
    Show / Hide Table of Contents

    What's new in version 2.0

    This page summarizes new features, improvements, and issues resolved in version 2.0 of Unity Test Framework.

    Added

    Combine Edit Mode and Play Mode tests

    This version removes the previous requirement to keep Edit Mode and Play Mode tests in separate assemblies by introducing the RequiresPlayModeAttribute. An Editor-only test assembly can now include tests that will run in the Editor's Play Mode if given the [RequiresPlayMode] attribute. Likewise, a platform-specific assembly can include Edit Mode tests and exempt them from running in Play Mode if the tests are given the [RequiresPlayMode(False)] attribute.

    Ignore tests based on arguments

    This version introduces the ParameterizedIgnoreAttribute which allows ignoring tests based on arguments which were passed to the test method of a parameterized test.

    Async tests

    This version introduces support for writing asynchronous tests with the dotnet Task asynchronous programming model. See Async tests. Feedback on this feature is especially welcome.

    Updated

    Revised Test Runner UI

    This version includes a revised Test Runner window with support for combined Edit Mode and Play Mode tests and several usability improvements:

    • The former separate Edit Mode and Play Mode tabs are gone and replaced with single options for creating a Test Assembly folder and test script.
    • Additional usability improvements make it easier to filter and run tests.
    • The Run Selected option is now available when running tests on a player.

    Fixed

    This version includes many bug fixes and performance improvements. For a full list of changes and updates in this version, see the Unity Test Framework package changelog.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Monday, November 14, 2022
    Terms of use