diff --git a/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 b/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 index f4ea749e285..21168fdd876 100644 --- a/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 +++ b/test/tools/CodeCoverageAutomation/Start-CodeCoverageRun.ps1 @@ -121,9 +121,14 @@ Write-LogPassThru -Message "***** New Run *****" Write-LogPassThru -Message "Forcing winrm quickconfig as it is required for remoting tests." winrm quickconfig -force -$codeCoverageZip = 'https://ci.appveyor.com/api/projects/PowerShell/powershell-f975h/artifacts/CodeCoverage.zip' -$testContentZip = 'https://ci.appveyor.com/api/projects/PowerShell/powershell-f975h/artifacts/tests.zip' -$openCoverZip = 'https://ci.appveyor.com/api/projects/PowerShell/powershell-f975h/artifacts/OpenCover.zip' +$appVeyorUri = "https://ci.appveyor.com/api" +$project = Invoke-RestMethod -Method Get -Uri "${appVeyorUri}/projects/PowerShell/powershell-f975h" +$jobId = $project.build.jobs[0].jobId + +$appVeyorBaseUri = "${appVeyorUri}/buildjobs/${jobId}/artifacts" +$codeCoverageZip = "${appVeyorBaseUri}/CodeCoverage.zip" +$testContentZip = "${appVeyorBaseUri}/tests.zip" +$openCoverZip = "${appVeyorBaseUri}/OpenCover.zip" Write-LogPassThru -Message "codeCoverageZip: $codeCoverageZip" Write-LogPassThru -Message "testcontentZip: $testContentZip"