Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Add support for codecov.io code coverage reporting. #117

Merged
merged 9 commits into from
Feb 13, 2017

Conversation

TravisEz13
Copy link
Member

@TravisEz13 TravisEz13 commented Feb 12, 2017

This address part of #88
Tested here:
TravisEz13 ForceAppVeyor results
Code tree results are here
Good example file result are here

Also, you can add one of the browser extensions and just browse the code on GitHub.
TravisEz13/xWindowsUpdate//dev/.../MSFT_xWindowsUpdateAgent.psm1

Green lines indicating hits and red indicating misses (the missed code was mocked, indicating we need integration tests):

image


This change is Reviewable

@TravisEz13
Copy link
Member Author

TravisEz13 commented Feb 12, 2017

@johlju @PlagueHO Please take a look when you have a chance.
I still need to add instruction on how to set the notifications on the PR. The default is if all not product code added is not covered it will add a warning to the PR. But that can be customized by adding a file in the repo. I tried to expose it so that it was easy enough to consume with for the Harness style repo's.

To be clear, each repo will have to go enable this.

@TravisEz13 TravisEz13 force-pushed the CodeCoverageRefactoring branch 3 times, most recently from a2259ca to a438d40 Compare February 12, 2017 04:12
@TravisEz13
Copy link
Member Author

Added documentation on deployment and tested with this PR: TravisEz13/xWindowsUpdate#4

@johlju
Copy link
Contributor

johlju commented Feb 12, 2017

This looks cool! 👍

@johlju
Copy link
Contributor

johlju commented Feb 12, 2017

Reviewed 3 of 4 files at r1, 2 of 2 files at r2.
Review status: all files reviewed at latest revision, 39 unresolved discussions.


AppVeyor.psm1, line 242 at r2 (raw file):

    Push-TestArtifact -Path $testResultsFile

    if($CodCovIo.IsPresent)

Whitespace after if: if (


AppVeyor.psm1, line 244 at r2 (raw file):

    if($CodCovIo.IsPresent)
    {
        if($results.CodeCoverage)

Whitespace after if: if (


AppVeyor.psm1, line 252 at r2 (raw file):

        else 
        {
            Write-Warning "Could not create CodeCov.io report because pester results object did not contain a CodeCoverage object"            

Change to Single quotes


AppVeyor.psm1, line 257 at r2 (raw file):

    Write-Info -Message 'Done running tests.'
    Write-Info -Message "Test result Type: $($results.GetType().fullname)"

Change to upper F in.Fullname


README.md, line 253 at r2 (raw file):

### Repos using `-Type 'Default'` for `Invoke-AppveyorTestScriptTask`

1. File an issue in DscResources for the PowerShell team to enable CodeCove.IO

If this gets enabled for a repo when using Default model. Is this something that needs to be changed (dsiabled) when repo is switching to the Harness model?


README.md, line 260 at r2 (raw file):

### Repos using `-Type 'Harness'` for `Invoke-AppveyorTestScriptTask`

1. Make sure you are properly generating pester code coverage.

No need to enable CodeCode.IO when using Harness model?


DscResource.CodeCoverage/CodeCovIo.psm1, line 7 at r2 (raw file):

  RootTable.[FileKey].[SubTable].[Line

  .PARAMETER FileLine

Wrong parameter name here, missing an 's'


DscResource.CodeCoverage/CodeCovIo.psm1, line 24 at r2 (raw file):

    param
    (
        [Parameter(Mandatory=$true)]

Change to [Parameter(Mandatory = $true)]. Whitespace around the equal sign.
Do this for all occurrences.


DscResource.CodeCoverage/CodeCovIo.psm1, line 33 at r2 (raw file):

        [Parameter(Mandatory=$true)]
        [string]

[String] - upper 'S'


DscResource.CodeCoverage/CodeCovIo.psm1, line 37 at r2 (raw file):

        [Parameter(Mandatory=$true)]
        [string]

[String] - upper 'S'


DscResource.CodeCoverage/CodeCovIo.psm1, line 42 at r2 (raw file):

    # Populate the sub-table
    foreach($command in $Commands)

Whitespace after foreach


DscResource.CodeCoverage/CodeCovIo.psm1, line 45 at r2 (raw file):

    {
        $fileKey = $command.File.replace($RepoRoot,'').replace('\','/')
        if(!$FileLines.ContainsKey($fileKey))

Whitespace after if


DscResource.CodeCoverage/CodeCovIo.psm1, line 50 at r2 (raw file):

        }

        if(!$fileLines.$fileKey.ContainsKey($TableName))

Whitespace after if


DscResource.CodeCoverage/CodeCovIo.psm1, line 57 at r2 (raw file):

        $lines = $FileLines.($fileKey).$TableName
        $lineKey = $($command.line)
        if(!$lines.ContainsKey($lineKey))

Whitespace after if


DscResource.CodeCoverage/CodeCovIo.psm1, line 85 at r2 (raw file):

    [CmdletBinding()]
    param(
        [Parameter(Mandatory=$true)]

Change to [Parameter(Mandatory = $true)]. Whitespace around the equal sign.
Do this for all occurrences.


DscResource.CodeCoverage/CodeCovIo.psm1, line 86 at r2 (raw file):

    param(
        [Parameter(Mandatory=$true)]
        $CodeCoverage,

Missing a type here.


DscResource.CodeCoverage/CodeCovIo.psm1, line 89 at r2 (raw file):

        [Parameter(Mandatory=$true)]
        [string]

[String] - upper 'S'


DscResource.CodeCoverage/CodeCovIo.psm1, line 93 at r2 (raw file):

        [ValidateNotNullOrEmpty()]
        [string]

[String] - upper 'S'


DscResource.CodeCoverage/CodeCovIo.psm1, line 101 at r2 (raw file):

    # Get a list of all unique files
    $files = @()
    foreach($file in ($CodeCoverage.missedCommands | Select-Object -ExpandProperty file -Unique))

Whitespace after foreach

Are the property named 'file' and not 'File' (upper 'F')?


DscResource.CodeCoverage/CodeCovIo.psm1, line 109 at r2 (raw file):

    }

    foreach($file in ($CodeCoverage.hitCommands | Select-Object -ExpandProperty file -Unique))

Whitespace after foreach

Are the property named 'file' and not 'File' (upper 'F')?


DscResource.CodeCoverage/CodeCovIo.psm1, line 122 at r2 (raw file):

    # Basically indexing all the hit and miss lines by file and line.
    # Populate the misses sub-table
    Add-UniqueFileLines -FileLines $fileLines -Commands  $CodeCoverage.MissedCommands -TableName 'misses' -RepoRoot $RepoRoot

Two whitespaces after -Commands


DscResource.CodeCoverage/CodeCovIo.psm1, line 125 at r2 (raw file):

    # Populate the hits sub-table
    Add-UniqueFileLines -FileLines $fileLines -Commands  $CodeCoverage.HitCommands -TableName 'hits' -RepoRoot $RepoRoot

Two whitespaces after -Commands


DscResource.CodeCoverage/CodeCovIo.psm1, line 135 at r2 (raw file):

    }

    foreach($file in $fileLines.Keys)

Whitespace after foreach


DscResource.CodeCoverage/CodeCovIo.psm1, line 144 at r2 (raw file):

        # Get the hits, if they exist
        $hits = @{}
        if($fileLines.$file.ContainsKey('hits'))

Whitespace after if


DscResource.CodeCoverage/CodeCovIo.psm1, line 151 at r2 (raw file):

        # Get the misses, if they exist
        $misses = @{}
        if($fileLines.$file.ContainsKey('misses'))

Whitespace after if


DscResource.CodeCoverage/CodeCovIo.psm1, line 157 at r2 (raw file):

        Write-Verbose -Message "fileKeys: $($fileLines.$file.Keys)"
        $max = $hits.Keys| Sort-Object -Descending | Select-Object -First 1

Minor: Add a whitespace between .Keys |


DscResource.CodeCoverage/CodeCovIo.psm1, line 158 at r2 (raw file):

        Write-Verbose -Message "fileKeys: $($fileLines.$file.Keys)"
        $max = $hits.Keys| Sort-Object -Descending | Select-Object -First 1
        $maxMissLine = $misses.Keys| Sort-Object -Descending | Select-Object -First 1

Same here.


DscResource.CodeCoverage/CodeCovIo.psm1, line 160 at r2 (raw file):

        $maxMissLine = $misses.Keys| Sort-Object -Descending | Select-Object -First 1

        # if max missed line is greater than maxed hit line

Use comment block <# #>
https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-comments

<#
    This is a good comment
    on multiple lines
#>

DscResource.CodeCoverage/CodeCovIo.psm1, line 162 at r2 (raw file):

        # if max missed line is greater than maxed hit line
        # used max missed line as the max line
        if($maxMissLine -gt $max)

Whitespace after if


DscResource.CodeCoverage/CodeCovIo.psm1, line 167 at r2 (raw file):

        }

        $lineData=@()

Spaces around the equal sign.


DscResource.CodeCoverage/CodeCovIo.psm1, line 171 at r2 (raw file):

        # produce the results
        # start at line 0 per codecov doc
        for($lineNumber=0; $lineNumber -le $max; $lineNumber++)

Whitespace after for.

Minor: Spaces around the equal sign.


DscResource.CodeCoverage/CodeCovIo.psm1, line 175 at r2 (raw file):

            $hitInfo = $null
            $missInfo = $null
            switch($true)

Whitespace after switch.


DscResource.CodeCoverage/CodeCovIo.psm1, line 180 at r2 (raw file):

                ($hits.ContainsKey($lineNumber) -and ! $misses.ContainsKey($lineNumber))
                {
                    Write-Verbose -Message "Got cc hit at $lineNumber"

Could we write out what 'cc' means?


DscResource.CodeCoverage/CodeCovIo.psm1, line 187 at r2 (raw file):

                ($misses.ContainsKey($lineNumber) -and ! $hits.ContainsKey($lineNumber))
                {
                    Write-Verbose -Message "Got cc miss at $lineNumber"

Could we write out what 'cc' means?


DscResource.CodeCoverage/CodeCovIo.psm1, line 194 at r2 (raw file):

                ($misses.ContainsKey($lineNumber) -and $hits.ContainsKey($lineNumber))
                {
                    Write-Verbose -Message "Got cc partial at $lineNumber"

Could we write out what 'cc' means?


DscResource.CodeCoverage/CodeCovIo.psm1, line 205 at r2 (raw file):

                {
                    Write-Verbose -Message "Got non-code at $lineNumber"
                    # If I put an actual null in an array ConvertTo-Json just leaves it out

Use comment block <# #>


DscResource.CodeCoverage/CodeCovIo.psm1, line 212 at r2 (raw file):

) and misses:

Two whitespaces between 'and' and 'misses'


DscResource.CodeCoverage/CodeCovIo.psm1, line 245 at r2 (raw file):

    param
    (
        [Parameter(Mandatory=$true)]

Change to [Parameter(Mandatory = $true)]. Whitespace around the equal sign.


DscResource.CodeCoverage/CodeCovIo.psm1, line 252 at r2 (raw file):

    $resolvedResultFile = (Resolve-Path -Path $Path).ProviderPath

    if($env:APPVEYOR_REPO_BRANCH)

Whitespace after if


Comments from Reviewable

@TravisEz13 TravisEz13 force-pushed the CodeCoverageRefactoring branch 3 times, most recently from ae016c8 to 17d4b91 Compare February 12, 2017 17:43
Add support for CodeCov.io for harness type tests
@TravisEz13
Copy link
Member Author

Review status: 2 of 5 files reviewed at latest revision, 39 unresolved discussions.


AppVeyor.psm1, line 242 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after if: if (

Done.


AppVeyor.psm1, line 244 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after if: if (

Done.


AppVeyor.psm1, line 252 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Change to Single quotes

Done.


AppVeyor.psm1, line 257 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Change to upper F in.Fullname

Done.


README.md, line 253 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

If this gets enabled for a repo when using Default model. Is this something that needs to be changed (dsiabled) when repo is switching to the Harness model?

No, and I think I can simplify this both should be very similar.


README.md, line 260 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

No need to enable CodeCode.IO when using Harness model?

See previous comment


DscResource.CodeCoverage/CodeCovIo.psm1, line 7 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Wrong parameter name here, missing an 's'

Parameters names should be singular in PowerShell.


DscResource.CodeCoverage/CodeCovIo.psm1, line 24 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Change to [Parameter(Mandatory = $true)]. Whitespace around the equal sign.
Do this for all occurrences.

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 33 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

[String] - upper 'S'

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 37 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

[String] - upper 'S'

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 42 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after foreach

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 45 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after if

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 50 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after if

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 57 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after if

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 85 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Change to [Parameter(Mandatory = $true)]. Whitespace around the equal sign.
Do this for all occurrences.

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 86 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Missing a type here.

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 89 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

[String] - upper 'S'

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 93 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

[String] - upper 'S'

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 101 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after foreach

Are the property named 'file' and not 'File' (upper 'F')?

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 109 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after foreach

Are the property named 'file' and not 'File' (upper 'F')?

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 122 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Two whitespaces after -Commands

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 125 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Two whitespaces after -Commands

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 135 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after foreach

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 144 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after if

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 151 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after if

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 157 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Minor: Add a whitespace between .Keys |

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 158 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Same here.

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 160 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Use comment block <# #>
https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-comments

<#
    This is a good comment
    on multiple lines
#>

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 162 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after if

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 167 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Spaces around the equal sign.

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 171 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after for.

Minor: Spaces around the equal sign.

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 175 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after switch.

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 180 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Could we write out what 'cc' means?

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 187 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Could we write out what 'cc' means?

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 194 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Could we write out what 'cc' means?

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 205 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Use comment block <# #>

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 212 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

) and misses:

Two whitespaces between 'and' and 'misses'

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 245 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Change to [Parameter(Mandatory = $true)]. Whitespace around the equal sign.

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 252 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Whitespace after if

Done.


Comments from Reviewable

@TravisEz13
Copy link
Member Author

@johlju @PlagueHO I updated the code to support harness type repos. Is there one that has been updated to use Invoke-AppveyorTestScriptTask

@TravisEz13
Copy link
Member Author

Review status: 2 of 5 files reviewed at latest revision, 38 unresolved discussions.


DscResource.CodeCoverage/CodeCovIo.psm1, line 7 at r2 (raw file):

Previously, TravisEz13 (Travis Plunk) wrote…

Parameters names should be singular in PowerShell.

I updated all instances to be signular


DscResource.CodeCoverage/CodeCovIo.psm1, line 86 at r2 (raw file):

Previously, TravisEz13 (Travis Plunk) wrote…

Done.

Since it's an object I also added a validate script.


Comments from Reviewable

@johlju
Copy link
Contributor

johlju commented Feb 12, 2017

@TravisEz13 SharePointDsc and xNetworking is the only two that uses the Harness type. But don't know if they have been fixed for the new model yet. @PlagueHO has PR's for fixing some, which I was suppose to help him review this weekend (but had to work half the weekend). Maybe SharePointDsc is your best bet.
/cc @PlagueHO

@johlju
Copy link
Contributor

johlju commented Feb 12, 2017

Reviewed 3 of 3 files at r3.
Review status: all files reviewed at latest revision, 3 unresolved discussions.


DscResource.CodeCoverage/CodeCovIo.psm1, line 70 at r3 (raw file):

<#
  .SYNOPSIS
  Tests if the specified proprety is a CodeCoverage object

Typo 'property'


DscResource.CodeCoverage/CodeCovIo.psm1, line 88 at r3 (raw file):

    if (!($CodeCoverage | Get-Member -Name MissedCommands))
    {
        throw "Must be a Pester CodeCoverage object"

Single quotes


DscResource.CodeCoverage/CodeCovIo.psm1, line 120 at r3 (raw file):

        $RepoRoot,

        [ValidateNotNullOrEmpty()]

Should add [Parameter()] on this parameter


Comments from Reviewable

@TravisEz13
Copy link
Member Author

Review status: 4 of 5 files reviewed at latest revision, 3 unresolved discussions.


DscResource.CodeCoverage/CodeCovIo.psm1, line 70 at r3 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Typo 'property'

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 88 at r3 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Single quotes

Done.


DscResource.CodeCoverage/CodeCovIo.psm1, line 120 at r3 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Should add [Parameter()] on this parameter

Done.


Comments from Reviewable

@johlju
Copy link
Contributor

johlju commented Feb 12, 2017

:lgtm:


Reviewed 1 of 1 files at r4.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@PlagueHO
Copy link
Contributor

@TravisEz13 - This looks awesome! Can't wait to implement it. Just some nitpicks.


Reviewed 1 of 4 files at r1, 1 of 2 files at r2, 2 of 3 files at r3, 1 of 1 files at r4.
Review status: all files reviewed at latest revision, 3 unresolved discussions, all commit checks successful.


AppVeyor.psm1, line 246 at r4 (raw file):

        if ($results.CodeCoverage)
        {
            Write-Info 'Uploading CodeCoverage to CodeCov.io...'

Could we add parameter name?


AppVeyor.psm1, line 247 at r4 (raw file):

        {
            Write-Info 'Uploading CodeCoverage to CodeCov.io...'
            Import-Module (Join-Path -Path $PSScriptRoot -ChildPath 'DscResource.CodeCoverage')

Could we add parameter name?


AppVeyor.psm1, line 253 at r4 (raw file):

        else 
        {
            Write-Warning 'Could not create CodeCov.io report because pester results object did not contain a CodeCoverage object'

Could we add parameter name?


Comments from Reviewable

@TravisEz13
Copy link
Member Author

Review status: all files reviewed at latest revision, 3 unresolved discussions.


AppVeyor.psm1, line 246 at r4 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…

Could we add parameter name?

Done.


AppVeyor.psm1, line 247 at r4 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…

Could we add parameter name?

Done.


AppVeyor.psm1, line 253 at r4 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…

Could we add parameter name?

Done.


Comments from Reviewable

AppVeyor.psm1 Outdated
[Parameter(ParameterSetName = 'Harness')]
[Parameter(ParameterSetName = 'DefaultCodeCoverage')]
[Switch]
$CodCovIo,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$CodeCovIo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

.PARAMETER $TableName
The path of the file to write the report to.
#>
function Add-UniqueFileLine
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add-UniqueFileLineToTable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

.PARAMETER $RepoRoot
The path to the root of the repo. This part of the path will not be included in the report. Needed to normalize all the reports.

.PARAMETER $TableName
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TableName

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

.PARAMETER Command
The list of Command from pester to update the table based on

.PARAMETER $RepoRoot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RepoRoot

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

.SYNOPSIS
Updates a hash table with the Unique file lines
Structure:
RootTable.[FileKey].[SubTable].[Line
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Line]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

.PARAMETER CodeCoverage
The CodeCoverage property of the output of Invoke-Pester with the -PassThru and -CodeCoverage options

.PARAMETER $RepoRoot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RepoRoot

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

.PARAMETER $RepoRoot
The path to the root of the repo. This part of the path will not be included in the report. Needed to normalize all the reports.

.PARAMETER $Path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Path

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Description = 'This module is used to assist in Code Coverage for PowerShell DSC resoruces'

# Minimum version of the Windows PowerShell engine required by this module
# PowerShellVersion = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have minimum PowerShell version

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

README.md Outdated

### Repos using `-Type 'Default'` for `Invoke-AppveyorTestScriptTask`

1. On the call to `Invoke-AppveyorTestScriptTask`, make sure you have
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note that this is code coverage through Pester and not code coverage with CodeCovIO

Also please add a note about what the difference between running these two is or why you would or would not want to run one or the other.

@TravisEz13 TravisEz13 merged commit 8797d57 into PowerShell:dev Feb 13, 2017
@TravisEz13 TravisEz13 deleted the CodeCoverageRefactoring branch February 23, 2017 23:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants