@@ -110,42 +110,17 @@ function DotNetTest {
110110 $propsFile = Join-Path $solutionPath " build"
111111 $propsFile = Join-Path $propsFile " dependencies.props"
112112
113- $openCoverVersion = (Select-Xml - Path $propsFile - XPath " //OpenCoverVersion" ).Node.' #text'
114- $openCoverPath = Join-Path $nugetPath " OpenCover\$openCoverVersion \tools\OpenCover.Console.exe"
115-
116113 $reportGeneratorVersion = (Select-Xml - Path $propsFile - XPath " //ReportGeneratorVersion" ).Node.' #text'
117114 $reportGeneratorPath = Join-Path $nugetPath " ReportGenerator\$reportGeneratorVersion \tools\netcoreapp2.0\ReportGenerator.dll"
118115
119- $coverageOutput = Join-Path $OutputPath " code- coverage.xml"
116+ $coverageOutput = Join-Path $OutputPath " coverage.cobertura .xml"
120117 $reportOutput = Join-Path $OutputPath " coverage"
121118
122119 if ($null -ne $env: TF_BUILD ) {
123- & $openCoverPath `
124- `" - target:$dotnetPath `" `
125- `" - targetargs:test $Project -- output $OutputPath -- logger trx`" `
126- - output:$coverageOutput `
127- `" - excludebyattribute:System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage* `" `
128- - hideskipped:All `
129- - mergebyhash `
130- - mergeoutput `
131- - oldstyle `
132- - register:user `
133- - skipautoprops `
134- `" - filter:+ [AspNet.Security.OAuth. * ]* - [AspNet.Security.OAuth.Providers.Tests ]* `"
120+ & $dotnetPath test $Project -- output $OutputPath -- logger trx
135121 }
136122 else {
137- & $openCoverPath `
138- `" - target:$dotnetPath `" `
139- `" - targetargs:test $Project -- output $OutputPath `" `
140- - output:$coverageOutput `
141- `" - excludebyattribute:System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage* `" `
142- - hideskipped:All `
143- - mergebyhash `
144- - mergeoutput `
145- - oldstyle `
146- - register:user `
147- - skipautoprops `
148- `" - filter:+ [AspNet.Security.OAuth. * ]* - [AspNet.Security.OAuth.Providers.Tests ]* `"
123+ & $dotnetPath test $Project -- output $OutputPath
149124 }
150125
151126 $dotNetTestExitCode = $LASTEXITCODE
@@ -154,7 +129,7 @@ function DotNetTest {
154129 $reportGeneratorPath `
155130 `" - reports:$coverageOutput `" `
156131 `" - targetdir:$reportOutput `" `
157- - reporttypes:HTML` ;Cobertura `
132+ - reporttypes:HTML `
158133 - verbosity:Warning
159134 }
160135
0 commit comments