Search Unity

Unity Code Coverage Package - Discussion

Discussion in 'Testing & Automation' started by Unity-Nikos, Nov 14, 2019.

Thread Status:
Not open for further replies.
  1. ScottyB

    ScottyB

    Joined:
    Apr 4, 2011
    Posts:
    141
    Hello @Unity-Nikos, I'm looking to integrate the Code Coverage package into a project I'm working on but when I attempt to do so it looks like I get some clashes with some NuGet packages I already have in the project for some other purposes.

    I get these errors in the console after importing the Code Coverage package:

    Assembly 'Library/ScriptAssemblies/Unity.TestTools.CodeCoverage.Editor.dll' will not be loaded due to errors:
    Reference has errors 'ReportGeneratorMerged'.

    Assembly 'Packages/com.unity.testtools.codecoverage/lib/ReportGenerator/ReportGeneratorMerged.dll' will not be loaded due to errors:
    ReportGeneratorMerged references strong named System.Text.Encoding.CodePages Assembly references: 4.0.1.0 Found in project: 4.1.1.0.
    Assembly Version Validation can be disabled in Player Settings "Assembly Version Validation"
    ReportGeneratorMerged references strong named System.Numerics.Vectors Assembly references: 4.1.4.0 Found in project: 4.1.3.0.
    Assembly Version Validation can be disabled in Player Settings "Assembly Version Validation"


    Is there anything that can be done to workaround these clashes apart from disabling "Assembly Version Validation" (which doesn't sound like a great idea)?

    Answer:

    Hi! I have reached out to you to get more information. In the meantime, as you mentioned, the workaround is to disable "Assembly Version Validation" in Player Settings.

    I will update on the progress here
     
    Last edited by a moderator: Feb 4, 2021
  2. JuliusJ

    JuliusJ

    QA Minion of the month Unity Technologies

    Joined:
    May 20, 2015
    Posts:
    13
    ScottyB and Unity-Nikos like this.
  3. lewisbroerman

    lewisbroerman

    Joined:
    Dec 17, 2020
    Posts:
    1
    Thank you for this package! It is extremely useful in our development process.

    Is it possible to enable Code Coverage for a build target in Unity Cloud Build? As part of our build pipeline, we would like to run tests and code coverage, then send the report to another service for analysis.

    Answer

    Thank you @lewisbroerman!

    Currently Code Coverage is not integrated in Unity Cloud Build but we are looking at adding support. I will keep you updated.
     
    Last edited by a moderator: Feb 5, 2021
  4. ScottyB

    ScottyB

    Joined:
    Apr 4, 2011
    Posts:
    141
    Hi @JuliusJ, thank you for looking into this and opening that bug.

    I've been keeping an eye on it and have seen that it has had the status of "Fix In Review for 0.4.3-preview, 1.0.0-pre.4" for a little while now. Do you have any ETA on when those versions might be released?

    Update:

    Hi @ScottyB - the reason this is taking longer is that we are including some further improvements to the package that are going to be bundled together in 0.4.3-preview & 1.0.0-pre.4. We are currently doing some testing before these are ready for release.
     
    Last edited by a moderator: Feb 17, 2021
  5. Unity-Nikos

    Unity-Nikos

    Unity Technologies

    Joined:
    Sep 30, 2015
    Posts:
    62
    The Code Coverage package has now been released. You can find the new introduction thread here: https://forum.unity.com/threads/1073831

    Thanks to everyone who contributed to the development of this package during preview with their feedback!

    This thread is now locked for further comments. If you have issues/comments/feedback related to the Code Coverage package, please visit the Testing & Automation section to browse current conversations or start a new thread. Please use the code coverage tag.
     
Thread Status:
Not open for further replies.
unityunity