Search Unity

Question Split build and run Playmode tests with Code Coverage

Discussion in 'Testing & Automation' started by flintml, Mar 28, 2023.

  1. flintml

    flintml

    Joined:
    Apr 13, 2021
    Posts:
    16
    I'm working on setting up a split build and run pipeline for my Playmode tests for an Android app, using TestPlayerBuildModifier and TestRunCallback. I would like to also generate Code Coverage reports of the tests that run. Is this possible?

    If so, how does it work? I'm familiar with including Code Coverage with EditMode tests, and even with Playmode tests that aren't "split". But does the coverage analysis happen at build time, or do the tests need to actually run?
     
  2. JuliusJ

    JuliusJ

    QA Minion of the month Unity Technologies

    Joined:
    May 20, 2015
    Posts:
    35
    Hi. At this time, Code Coverage package only supports coverage gathering in the Editor. It is not possible to record coverage on a player.