en-GB/PSSAToJunit-help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>ConvertTo-PSSAJunitXml</command:name>
      <command:verb>ConvertTo</command:verb>
      <command:noun>PSSAJunitXml</command:noun>
      <maml:description>
        <maml:para>Converts PSScriptAnalyzer results to JUnit XML format.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>The `ConvertTo-PSSAJunitXml` function converts the results of PSScriptAnalyzer to JUnit XML format. The conversion is exported as a `[System.Xml.XmlDocument]` object.</maml:para>
      <maml:para>The input object must be a collection of `[Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord]` objects. This is normally the output of `Invoke-ScriptAnalyzer` captured a variable or passed through the pipeline.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>ConvertTo-PSSAJunitXml</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
          <maml:name>PSScriptAnalyzerResult</maml:name>
          <maml:description>
            <maml:para>The results of `Invoke-ScriptAnalyzer` command.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">DiagnosticRecord[]</command:parameterValue>
          <dev:type>
            <maml:name>DiagnosticRecord[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
          <maml:name>TestName</maml:name>
          <maml:description>
            <maml:para>The name of the test suite.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>PSScriptAnalyzer</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
          <maml:name>Severity</maml:name>
          <maml:description>
            <maml:para>The severity of the diagnostic records to include in the JUnit XML output.</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">Information</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">Warning</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">Error</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>[Warning, Error]</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
        <maml:name>PSScriptAnalyzerResult</maml:name>
        <maml:description>
          <maml:para>The results of `Invoke-ScriptAnalyzer` command.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">DiagnosticRecord[]</command:parameterValue>
        <dev:type>
          <maml:name>DiagnosticRecord[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
        <maml:name>Severity</maml:name>
        <maml:description>
          <maml:para>The severity of the diagnostic records to include in the JUnit XML output.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>[Warning, Error]</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
        <maml:name>TestName</maml:name>
        <maml:description>
          <maml:para>The name of the test suite.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>PSScriptAnalyzer</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord[]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Xml.XmlDocument</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>Example 1: Capture PSScriptAnalyzer results to a variable and pass to ConvertTo-PSSAJunitXml as a argument</maml:title>
        <dev:code>PS C:\&gt; $Result = Invoke-ScriptAnalyzer -Path .\MyScript.ps1
PS C:\&gt; $JunitXml = ConvertTo-PSSAJunitXml -PSScriptAnalyzerResult $Result</dev:code>
        <dev:remarks>
          <maml:para>This example captures the results of `Invoke-ScriptAnalyzer` to a variable and passes it to `ConvertTo-PSSAJunitXml` as an argument.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 2: Pass PSScriptAnalyzer results to ConvertTo-PSSAJunitXml through the pipeline</maml:title>
        <dev:code>PS C:\&gt; $JunitXml = Invoke-ScriptAnalyzer -Path .\MyScript.ps1 | ConvertTo-PSSAJunitXml</dev:code>
        <dev:remarks>
          <maml:para>This example passes the results of `Invoke-ScriptAnalyzer` to `ConvertTo-PSSAJunitXml` through the pipeline.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri></maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Export-PSSAJunitXml</command:name>
      <command:verb>Export</command:verb>
      <command:noun>PSSAJunitXml</command:noun>
      <maml:description>
        <maml:para>The `Export-PSSAJunitXml` function exports the results of `ConvertTo-PSSAJunitXml` to a file.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>The `Export-PSSAJunitXml` function exports the results of `ConvertTo-PSSAJunitXml` to a file. It accepts the JunitXml object as either a specified parameter or through the pipeline.</maml:para>
      <maml:para>If no filepath is specified, the function will export the JunitXml object to the current directory with the name `PSScriptAnalyzerResults.xml`.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Export-PSSAJunitXml</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
          <maml:name>InputXml</maml:name>
          <maml:description>
            <maml:para>The JunitXml object to export.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">XmlDocument</command:parameterValue>
          <dev:type>
            <maml:name>XmlDocument</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
          <maml:name>FilePath</maml:name>
          <maml:description>
            <maml:para>The path to the file to export the JunitXml object to.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">FileInfo</command:parameterValue>
          <dev:type>
            <maml:name>FileInfo</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
        <maml:name>FilePath</maml:name>
        <maml:description>
          <maml:para>The path to the file to export the JunitXml object to.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">FileInfo</command:parameterValue>
        <dev:type>
          <maml:name>FileInfo</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
        <maml:name>InputXml</maml:name>
        <maml:description>
          <maml:para>The JunitXml object to export.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">XmlDocument</command:parameterValue>
        <dev:type>
          <maml:name>XmlDocument</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>System.Xml.XmlDocument</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Xml.XmlDocument</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>Example 1: Capture PSScriptAnalyzer results to a variable and pass to ConvertTo-PSSAJunitXml as a argument</maml:title>
        <dev:code>PS C:\&gt; $Result = Invoke-ScriptAnalyzer -Path .\MyScript.ps1
PS C:\&gt; $JunitXml = ConvertTo-PSSAJunitXml -PSScriptAnalyzerResult $Result
PS C:\&gt; Export-PSSAJunitXml -InputXml $JunitXml -FilePath .\MyScriptResults.xml</dev:code>
        <dev:remarks>
          <maml:para>This example captures the results of `Invoke-ScriptAnalyzer` to a variable and passes it to `ConvertTo-PSSAJunitXml` as an argument. The results are then passed to `Export-PSSAJunitXml` to be exported to a file.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 2: Pass PSScriptAnalyzer results to ConvertTo-PSSAJunitXml through the pipeline</maml:title>
        <dev:code>PS C:\&gt; Invoke-ScriptAnalyzer -Path .\MyScript.ps1 | ConvertTo-PSSAJunitXml | Export-PSSAJunitXml -FilePath .\MyScriptResults.xml</dev:code>
        <dev:remarks>
          <maml:para>This example passes the results of `Invoke-ScriptAnalyzer` to `ConvertTo-PSSAJunitXml` through the pipeline, and then passes the results to `Export-PSSAJunitXml` to be exported to a file.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri></maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
</helpItems>