Skip to content

Format-Pester only generating Summary View from Pester results #14

Closed
@ChrisLynchHPE

Description

I am trying to figure out why Format-Pester is only creating a Summary View of the Pester results of my Smoke Test script. The contents of the Smoke Test script follow this cadence:

Describe
   Context
      It
      It
      It
      ...
   Context
      It
      It
   Context
      It
Describe
   It
Describe
   It

I call my Smoke Test script with the following:

([String]$PesterScriptSource  = '{0}\Build Scripts\Pester Scripts' -f $LibrarySource) | Write-Verbose
([String]$DateStamp           = [DateTime]::UtcNow.ToString('yyyyMMdd.HHmmss')) | Write-Verbose
([String]$PesterResultsFile   = 'SmokeTestResults_{0}' -f $DateStamp) | Write-Verbose
Invoke-Pester -Tag SmokeTest -Script $PesterScriptSource -Passthru | Format-Pester -Path ($PesterScriptSource + '\Results') -Format HTML,Word -BaseFileName $PesterResultsFile

However, when looking at the TEXT file Format-Pester creates, I see basically a summary report:

Table of Contents
------------------------------------------------------------------------------------------------------------------------
1.  Results summary


1.  Results summary
------------------------------------------------------------------------------------------------------------------------

Total Tests Passed Tests Failed Tests Skipped Tests Pending Tests
----------- ------------ ------------ ------------- -------------
         28           28            0             0             0


My Windows 10 host $PSVerionTable

[PS] C:\Users\me> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.0
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.0
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Here are the loaded Modules, minus the module I am using Pester to test with:

[PS] C:\Users\clynch.DOCTORS-LAB> get-module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     1.0.0.0    CimCmdlets                          {Export-BinaryMiLog, Get-CimAssociatedInstance, Get-CimCla...
Script     1.3.1      Format-Pester                       Format-Pester
Script     1.1.3.15   FormatPX                            {Format-Custom, Format-Default, Format-List, Format-Table...}
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest   3.0.0.0    Microsoft.PowerShell.Security       {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Manifest   3.0.0.0    Microsoft.WSMan.Management          {Connect-WSMan, Disable-WSManCredSSP, Disconnect-WSMan, En...
Script     3.4.2      Pester                              {AfterAll, AfterEach, Assert-MockCalled, Assert-Verifiable...
Script     0.7.12.47  pscribo                             {BlankLine, Document, Export-Document, GlobalOption...}
Script     1.0.0.13   PSReadline                          {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PS...
Binary     1.0.5.18   SnippetPx                           {Get-Snippet, Invoke-Snippet}

Am I "doing it wrong?" Am I missing something?

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions