File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,22 @@ jobs:
260
260
261
261
# Output the combined report
262
262
$mergedReport.Save("merged-jacoco-report.xml")
263
- $mergedReport | Out-String
263
+
264
+ # Assuming $mergedReport is your final [xml] object:
265
+ $xmlString = $mergedReport.OuterXml
266
+
267
+ # To format (pretty-print) the XML nicely:
268
+ $stringWriter = New-Object System.IO.StringWriter
269
+ $xmlWriter = [System.Xml.XmlTextWriter]::new($stringWriter)
270
+ $xmlWriter.Formatting = "Indented"
271
+ $mergedReport.WriteTo($xmlWriter)
272
+ $xmlWriter.Flush()
273
+ $prettyXml = $stringWriter.ToString()
274
+
275
+ $prettyXml | Out-String
276
+
277
+ # Output or export the XML string
278
+ # $prettyXml | Out-File -FilePath "merged-jacoco-report.xml" -Encoding UTF8
264
279
265
280
266
281
# TestModuleStatus:
You can’t perform that action at this time.
0 commit comments