Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    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