Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug After updating Unity version of project, some classes no longer measure test coverage properly

Discussion in 'Testing & Automation' started by ThisIsNoZaku, Jan 4, 2023.

  1. ThisIsNoZaku

    ThisIsNoZaku

    Joined:
    May 1, 2013
    Posts:
    8
    I had a project that was using a slightly older version of Unity (2021.3.6f1). When I started working on a different computer with a newer Unity version (2021.3.15f1), I updated the project version (I have done this repeatedly without issue before, with this and other projects) and now the coverage metrics for one of my classes has inexplicably dropped to 0; as far as the coverage report is concerned, the code is never called, despite the fact that I can manually step through each line in the debugger.

    Looking at the package-lock.json, the version of the coverage package changes from 1.0.1 to 1.2.2

    I have no idea about what might be wrong. Reimporting all of the assets, deleting and regenerating all the test history and coverage have had no effect.
     
    Last edited: Jan 4, 2023