Skip to content

Commit

Permalink
Merge pull request #39 from it-praktyk/v1.6.0-devel
Browse files Browse the repository at this point in the history
Format-Pester v1.6.0
  • Loading branch information
it-praktyk authored Nov 26, 2017
2 parents 5f82c91 + a67b50c commit a315d61
Show file tree
Hide file tree
Showing 29 changed files with 1,521 additions and 118 deletions.
4 changes: 2 additions & 2 deletions Format-Pester/Format-Pester.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RootModule = 'Format-Pester.psm1'
# Version number of this module.
# If you are increasing ModuleVersion please change also the values of variable 'ScriptVersion' in the Format-Pester.ps1 file
# Verify also translations and increase the values of msg00 fields
ModuleVersion = '1.5.1'
ModuleVersion = '1.6.0'

# ID used to uniquely identify this module
GUID = 'daa609a5-1293-4f62-9467-1a120c529e87'
Expand Down Expand Up @@ -50,7 +50,7 @@ PowerShellVersion = '4.0'
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @('pester','pscribo')
RequiredModules = @('Pester','PScribo')

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()
Expand Down
263 changes: 161 additions & 102 deletions Format-Pester/Public/Format-Pester.ps1

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Format-Pester/Public/en-US/Format-Pester.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# culture = "en-US"
ConvertFrom-StringData @'
msgA000 = 1.5.1
msgA000 = 1.6.0
msgA001 = Table of Contents
msgA002 = Total Tests
msgA003 = Passed Tests
Expand All @@ -42,8 +42,8 @@ ConvertFrom-StringData @'
msgA020 = The test result named: '{0}' is duplicated in the ResultOrder parameter values. It will be skipped to avoid duplicating of a report section.
msgA021 = The test result named: '{0}' in unrecognized and will not be included in a report.
msgA022 = Documents will be exported with options:
msgX001 = The parameter '{0}' is deprecated and will be removed in the further version of Format-Pester. Please use the parameters Include instead.
msgX002 = The parameter Order is deprecated and will be removed in the further version of Format-Pester. Please use the parameter ResultOrder instead."
msgX001 = The parameter '{0}' is deprecated and will be removed in the further version of Format-Pester. Please use the parameters '{1}' instead.
# msgX002 NOT_EXISTS
msgX003 = The parameter PassedFirst parameter was used but passed results are not included in the report.
msgX004 = The parameter FailedFirst parameter was used but failed results are not included in the report.
msgB000 = Passed
Expand Down
6 changes: 3 additions & 3 deletions Format-Pester/Public/pl-PL/Format-Pester.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# culture="pl-PL"
ConvertFrom-StringData @'
msgA000=1.5.1
msgA000=1.6.0
msgA001=Spis treści
msgA002=Testy ogółem
msgA003=Testy zdane
Expand All @@ -42,8 +42,8 @@ ConvertFrom-StringData @'
msgA020 = Nazwa wyniku testu: '{0}' jest powielona w wartości parametru ResultOrder. Duplikat zostanie pominięty by uniknąć powielenia sekcji dokumentu.
msgA021 = Nazwa wyniku testu: '{0}' jest nierozpoznana i nie zostanie uwzględniona w dokumencie. Muszą zostać użyte angielskie nazwy wyników testów.
msgA022 = Dokumenty zostaną wyeksportowane przy użyciu ustawień:
msgX001 = Użycie parametru '{0}' jest niepożądane gdyż zostanie on usunięty w przyszłej wersji Format-Pester. Proszę użyć parametru Include.
msgX002 = Użycie parametru Order jest niepożądane gdyż zostanie on usunięty w przyszłej wersji Format-Pester. Proszę użyć parametru ResultOrder.
msgX001 = Użycie parametru '{0}' jest niepożądane gdyż zostanie on usunięty w przyszłej wersji Format-Pester. Proszę użyć parametru '{1}'.
#msgX002 = NOT_EXISTS
msgX003 = Został użyty parametr PassedFirst ale rezultaty zdanych testów nie są ujęte w raporcie.
msgX004 = Został użyty parametr FailedFirst ale rezultaty niezdanych testów nie są ujęte w raporcie.
msgB000=Zdane
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@

# Format-Pester

Powershell module for documenting Pester's results.
Powershell module for documenting Pester's results.

All the formatting work is done by the module [PScribo](https://github.com/iainbrighton/PScribo).

Reports are generated based on a custom PowerShell object returned by Invoke-Pester. You have to provide the parameter `PassThru` to Pester. Currently, NUnit style files generated by Pester are not supported.

If you can't generate report on a computer where tests are executed please save tests results piping them to `Export-Clixml`.

You can be interested also in the [ReportUnit](https://github.com/reportunit/reportunit) tool. It's a report generator for the test-runner family. It uses stock reports from NUnit, MsTest, xUnit, TestNG and Gallio and converts them into HTML reports with dashboards.
You can be interested also in the
- [ReportUnit](https://github.com/reportunit/reportunit) tool. It's a report generator for the test-runner family. It uses stock reports from NUnit, MsTest, xUnit, TestNG and Gallio and converts them into HTML reports with dashboards.
- [PSTestReport](https://github.com/Xainey/PSTestReport) - it's an early example to generate a static PowerShell test report. You can read about it in the blog post ["Hitchhikers Guide to the PowerShell Module Pipeline"](https://xainey.github.io/2017/powershell-module-pipeline) by Michael Willis.

## Report example

![](./img/Format-Pester-1.5.0-part.png)
![](./img/Format-Pester-1.6.0-part.png)

Partial screenshot for a HTML report generated by Format-Pester v. 1.5.0, PScribo v. 0.7.15.63, [the full screenshot](./img/Format-Pester-1.5.0-full.png).
Partial screenshot for a HTML report generated by Format-Pester v. 1.6.0, PScribo v. 0.7.19, [the full screenshot](./img/Format-Pester-1.6.0-full.png).

You can find more examples [here](/examples/).

Expand Down Expand Up @@ -49,7 +51,7 @@ Format-Pester is a PowerShell module so it has to be imported before using it -

This command will document the results of the Pester's tests. Documents will be stored in the current path and they will be available in 3 formats (.html,.docx and .txt).

## Example
## Example 2

```PowerShell
Invoke-Pester -PassThru | Export-Clixml -Path .\Test-Result.xml
Expand All @@ -74,11 +76,11 @@ You can read [online version of help](/doc/Format-Pester.md) - online help gener
- Travis Plunk - [GitHub](https://github.com/TravisEz13) - [Twitter](https://twitter.com/TravisPlunk)
- Wojciech Sciesinski - [GitHub](https://github.com/it-praktyk) - [Twitter](https://twitter.com/ITpraktyk)


# [Version history](VERSIONS.md)

# [TODO and development plans](TODO.md)

# License

Copyright 2016-17 Erwan Quelin and the community.
Licensed under [the MIT License](LICENSE)
12 changes: 10 additions & 2 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
- Updates
- Added support for Skipped, Pending, Inconclusive tests results
- Parameters related to sorting of sections changed: the parameter ResultsOrder added, the parameter Order deprecated
- Parameters to skipping/including sections changed: the parameter Include added, the parameter FailedOnly, Passed only deprecated
- Parameters to skipping/including sections changed: the parameter Include added, the parameter FailedOnly, PassedOnly deprecated
- Added support for returning refecences to created files - the PassThru parameter
- the structure of translations files changed
- formating of document sections updated
Expand All @@ -58,4 +58,12 @@

- Fix
- links in a table of content corrected - #29
- parameter sets for the parameter DumpPScriboObject corrected - #31
- parameter sets for the parameter DumpPScriboObject corrected - #31

## 1.6.0 - 2017-11-25

- Updates
- An option to add a report title added
- Structure of the parameter set changed due to deprecation
- Warnings about deprecated parameters added
- Parameters to skipping/including sections changed: the parameters SkipTableOfContent, SkipSummary, SummaryOnly deprecated
124 changes: 124 additions & 0 deletions examples/1.6.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Example files

Files generated using

- Format-Pester v. 1.6.0
- Pester v. 4.1.0
- PScribo v. 0.7.19.93

## Known issues

- The exception message "'ClassID' cannot be found" is displayed under formatitng to HTML document. Result files look like correctly rendered. - #36.

## en-US

### 20171125a

```powershell
$FormatPesterArguments = @{
'Include' = 'All'
'Format' = @('word','html','text')
'Path' = '.\examples\1.6.0\en-US\'
'BaseFileName' = '20171125a'
'ReportTitle' = 'Results of tests - a customized report title'
'GroupResultsBy' = 'Result-Describe'
'Language' = 'en-us'
}
Invoke-Pester -Path .\demo\ -Show None -PassThru | Format-Pester @FormatPesterArguments
```

### 20171125b

```powershell
$FormatPesterArguments = @{
'Format' = @('word','html','text')
'Path' = '.\examples\1.6.0\en-US\'
'BaseFileName' = '20171125b'
'ReportTitle' = 'Tests results to check'
'Include' = @('Title','Failed','Inconclusive')
'GroupResultsBy' = 'Result-Describe-Context'
'Language' = 'en-us'
}
Invoke-Pester -Path .\demo\ -Show None -PassThru -Tag Static | Format-Pester @FormatPesterArguments
```

### 20171125c

```powershell
$FormatPesterArguments = @{
'Format' = @('word','html','text')
'Path' = '.\examples\1.6.0\en-US\'
'BaseFileName' = '20171125c'
'Include' = 'All'
'ResultsOrder' = 'Skipped','Failed','Inconclusive','Passed'
'GroupResultsBy' = 'Result'
'Language' = 'en-US'
}
Invoke-Pester -Path .\demo\ -Show None -PassThru | Format-Pester @FormatPesterArguments
```

## pl-PL

### 20171125a

```powershell
$FormatPesterArguments = @{
'Format' = @('word','html','text')
'Path' = '.\examples\1.6.0\pl-PL\'
'BaseFileName' = '20171125a'
'Title' = 'Wyniki testów'
'Include' = 'Passed','Failed','Title'
'GroupResultsBy' = 'Result-Describe'
'Language' = 'pl-PL'
}
Invoke-Pester -Path .\demo\ -Show None -PassThru | Format-Pester @FormatPesterArguments
```

### 20171125b

```powershell
$FormatPesterArguments = @{
'Format' = @('word','html','text')
'Path' = '.\examples\1.6.0\pl-PL\'
'BaseFileName' = '20171125b'
'Include' = @('Inconclusive','Failed')
'GroupResultsBy' = 'Result-Describe-Context'
'Language' = 'pl-PL'
}
Invoke-Pester -Path .\demo\ -Show None -PassThru -Tag Static | Format-Pester @FormatPesterArguments
```

### 20171125c

```powershell
$FormatPesterArguments = @{
'Format' = 'word','html','text'
'Path' = '.\examples\1.6.0\pl-PL\'
'BaseFileName' = '20171125c'
'Title' = 'Super ważne testy'
'Include' = 'All'
'ResultsOrder' = 'Skipped','Failed','Inconclusive','Passed'
'GroupResultsBy' = 'Result'
'Language' = 'pl-PL'
}
Invoke-Pester -Path .\demo\ -Show None -PassThru | Format-Pester @FormatPesterArguments
```
Binary file added examples/1.6.0/en-US/20171125a.docx
Binary file not shown.
Loading

0 comments on commit a315d61

Please sign in to comment.