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
  3. Dismiss Notice

Bug The opencov file does not generate correctly the path to the files if they are in /Packages

Discussion in 'Testing & Automation' started by bdovaz, Nov 21, 2023.

  1. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,066
    @JuliusJ @Unity-Nikos

    Reported as: CASE IN-61372

    (The problem occurs regardless of running in UI or batch mode).

    I am trying to generate by command line the opencov archive but it does not correctly generate the fullPath field if the files it parses are under /Packages, example (using the sample that comes with the CodeCoverage package):

    <File uid="1" fullPath="./Packages/com.package/Runtime/Asteroids/Tests/AsteroidTests.cs" />

    If instead I leave it where it was originally if it does well:

    <File uid="1" fullPath="C:/Users/{MY_USER}/Downloads/My project (6)/Assets/Samples/Code Coverage/1.2.4/Code Coverage Tutorial/Asteroids/Tests/AsteroidTests.cs" />
     
  2. JuliusJ

    JuliusJ

    QA Minion of the month Unity Technologies

    Joined:
    May 20, 2015
    Posts:
    35
    Hi @bdovaz. Thanks for your report. I've been able to confirm the issue, you should be able to track it here: https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-56873 (link should become valid shortly).

    As a workaround, you could use
    pathReplacePatterns
    coverage option in batchmode to transform relative path back into full path. Something like
    pathReplacePatterns:./,C:/MyProject/
    should do the trick. You can find more details here.
     
    bdovaz likes this.