PageSourceSearch

https://pester.dev/assets/js/2d75429f.22ba65d1.js

js pester.dev collected 2026-10-03 19:40:38 UTC 7,619 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkpester_docs=self.webpackChunkpester_docs||[]).push([["7143"],{90(e,t,n){n.r(t),n.d(t,{metadata:()=>r,default:()=>c,frontMatter:()=>o,contentTitle:()=>l,toc:()=>p,assets:()=>a});var r=JSON.parse('{"id":"commands/Export-NUnitReport","title":"Export-NUnitReport","description":"Help for Pester command \'Export-NUnitReport\'. Exports a Pester result-object to an NUnit-compatible XML-report","source":"@site/docs/commands/Export-NUnitReport.mdx","sourceDirName":"commands","slug":"/commands/Export-NUnitReport","permalink":"/docs/commands/Export-NUnitReport","draft":false,"unlisted":false,"editUrl":null,"tags":[],"version":"current","frontMatter":{"id":"Export-NUnitReport","title":"Export-NUnitReport","description":"Help for Pester command \'Export-NUnitReport\'. Exports a Pester result-object to an NUnit-compatible XML-report","keywords":["PowerShell","Pester","Help","Documentation"],"hide_title":false,"hide_table_of_contents":false,"custom_edit_url":null},"sidebar":"commands","previous":{"title":"Export-JUnitReport","permalink":"/docs/commands/Export-JUnitReport"},"next":{"title":"Get-ShouldOperator","permalink":"/docs/commands/Get-ShouldOperator"}}'),s=n(1987),i=n(7008);let o={id:"Export-NUnitReport",title:"Export-NUnitReport",description:"Help for Pester command 'Export-NUnitReport'. Exports a Pester result-object to an NUnit-compatible XML-report",keywords:["PowerShell","Pester","Help","Documentation"],hide_title:!1,hide_table_of_contents:!1,custom_edit_url:null},l,a={},p=[{value:"SYNOPSIS",id:"synopsis",level:2},{value:"SYNTAX",id:"syntax",level:2},{value:"DESCRIPTION",id:"description",level:2},{value:"EXAMPLES",id:"examples",level:2},{value:"EXAMPLE 1",id:"example-1",level:3},{value:"PARAMETERS",id:"parameters",level:2},{value:"-Format",id:"-format",level:3},{value:"-Path",id:"-path",level:3},{value:"-Result",id:"-result",level:3},{value:"CommonParameters",id:"commonparameters",level:3},{value:"INPUTS",id:"inputs",level:2},{value:"Pester.Run",id:"pesterrun",level:3},{value:"OUTPUTS",id:"outputs",level:2},{value:"NOTES",id:"notes",level:2},{value:"RELATED LINKS",id:"related-links",level:2},{value:"VERSION",id:"version",level:2}];function d(e){let t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.admonition,{title:"This page was generated",type:"info",children:(0,s.jsxs)(t.p,{children:["Contributions are welcome in ",(0,s.jsx)(t.a,{href:"https://github.com/pester/pester",children:"Pester-repo"}),"."]})}),"\n",(0,s.jsx)(t.h2,{id:"synopsis",children:"SYNOPSIS"}),"\n",(0,s.jsx)(t.p,{children:"Exports a Pester result-object to an NUnit-compatible XML-report"}),"\n",(0,s.jsx)(t.h2,{id:"syntax",children:"SYNTAX"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-powershell",children:"Export-NUnitReport [-Result] <Run> [-Path] <string> [[-Format] <string>]\n"})}),"\n",(0,s.jsx)(t.h2,{id:"description",children:"DESCRIPTION"}),"\n",(0,s.jsx)(t.p,{children:"Pester can generate a result-object containing information about all\ntests that are processed in a run.\nThis object can then be exported to an\nNUnit-compatible XML-report using this function.\nThe report is generated\nusing the NUnit 2.5-schema (default) or NUnit3-compatible format."}),"\n",(0,s.jsx)(t.p,{children:"This can be useful for further processing or publishing of test results,\ne.g.\nas part of a CI/CD pipeline."}),"\n",(0,s.jsx)(t.h2,{id:"examples",children:"EXAMPLES"}),"\n",(0,s.jsx)(t.h3,{id:"example-1",children:"EXAMPLE 1"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-powershell",children:"$p = Invoke-Pester -Passthru\n$p | Export-NUnitReport -Path TestResults.xml\n"})}),"\n",(0,s.jsx)(t.p,{children:"This example runs Pester using the Passthru option to retrieve the result-object and\nexports it as an NUnit 2.5-compatible XML-report."}),"\n",(0,s.jsx)(t.h2,{id:"parameters",children:"PARAMETERS"}),"\n",(0,s.jsx)(t.h3,{id:"-format",children:"-Format"}),"\n",(0,s.jsx)(t.p,{children:"Specifies the NUnit-schema to be used."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-yaml",children:"Type: System.String\nDefaultValue: NUnit2.5\nSupportsWildcards: false\nAliases: []\nParameterSets:\n- N
1ame: (All)\n  Position: 2\n  IsRequired: false\n  ValueFromPipeline: false\n  ValueFromPipelineByPropertyName: false\n  ValueFromRemainingArguments: false\nDontShow: false\nAcceptedValues: []\nHelpMessage: ''\n"})}),"\n",(0,s.jsx)(t.h3,{id:"-path",children:"-Path"}),"\n",(0,s.jsx)(t.p,{children:"The path where the XML-report should be saved."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-yaml",children:"Type: System.String\nDefaultValue: ''\nSupportsWildcards: false\nAliases: []\nParameterSets:\n- Name: (All)\n  Position: 1\n  IsRequired: true\n  ValueFromPipeline: false\n  ValueFromPipelineByPropertyName: false\n  ValueFromRemainingArguments: false\nDontShow: false\nAcceptedValues: []\nHelpMessage: ''\n"})}),"\n",(0,s.jsx)(t.h3,{id:"-result",children:"-Result"}),"\n",(0,s.jsx)(t.p,{children:"Result object from a Pester-run.\nThis can be retrieved using Invoke-Pester\n-Passthru or by using the Run.PassThru configuration-option."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-yaml",children:"Type: Pester.Run\nDefaultValue: ''\nSupportsWildcards: false\nAliases: []\nParameterSets:\n- Name: (All)\n  Position: 0\n  IsRequired: true\n  ValueFromPipeline: true\n  ValueFromPipelineByPropertyName: false\n  ValueFromRemainingArguments: false\nDontShow: false\nAcceptedValues: []\nHelpMessage: ''\n"})}),"\n",(0,s.jsx)(t.h3,{id:"commonparameters",children:"CommonParameters"}),"\n",(0,s.jsxs)(t.p,{children:["This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,\n-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,\n-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see\n",(0,s.jsx)(t.a,{href:"https://go.microsoft.com/fwlink/?LinkID=113216",children:"about_CommonParameters"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"inputs",children:"INPUTS"}),"\n",(0,s.jsx)(t.h3,{id:"pesterrun",children:"Pester.Run"}),"\n",(0,s.jsx)(t.h2,{id:"outputs",children:"OUTPUTS"}),"\n",(0,s.jsx)(t.h2,{id:"notes",children:"NOTES"}),"\n",(0,s.jsx)(t.h2,{id:"related-links",children:"RELATED LINKS"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://pester.dev/docs/commands/Export-NUnitReport",children:"https://pester.dev/docs/commands/Export-NUnitReport"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://pester.dev/docs/commands/Invoke-Pester",children:"https://pester.dev/docs/commands/Invoke-Pester"})}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"version",children:"VERSION"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsxs)(t.em,{children:["This page was generated using comment-based help in ",(0,s.jsx)(t.a,{href:"https://github.com/pester/pester",children:"Pester 6.1.0"}),"."]})})]})}function c(e={}){let{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},7008(e,t,n){n.d(t,{R:()=>o,x:()=>l});var r=n(1763);let s={},i=r.createContext(s);function o(e){let t=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.