docs.unity3d.com
    Show / Hide Table of Contents

    Technical details

    How it works

    The package is a client of the coverage API that was added in Unity 2019.2. For more information, see the coverage API's documentation. The package uses a combination of this API and C# reflection to output the test coverage data in the OpenCover format. Optionally, a third party report generator will then parse the OpenCover data and present the coverage data as a series of html documents.

    Requirements

    This version of the Code Coverage package is compatible with the following versions of the Unity Editor:

    • 2019.3 and later

    3rd party libraries used

    • ReportGenerator - v4.8.13

    Known limitations

    Code Coverage includes the following known limitations:

    • Code Coverage currently only supports the OpenCover format.
    • Code Coverage currently only supports code ran in the Editor and not in Standalone/Player.
    • NPath Complexity calculation and Branch Coverage are not implemented at present so they will always appear as zero in the coverage report.
    In This Article
    • How it works
    • Requirements
    • 3rd party libraries used
    • Known limitations
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023