Skip to content

Cross-platform PowerShell module that allows you to publish Pester code coverage results to Coveralls.io

License

Notifications You must be signed in to change notification settings

Badgerati/PSCoveralls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PSCoveralls

MIT licensed

This is a cross-platform PowerShell module that allows you to publish Pester code coverage results to Coveralls.io.

Example

In order to use this module, you will need Pester.

  1. The first step is to run your Pester tests, but using the -CodeCoverage switch:
# you'll need the source files
$srcFiles = (Get-ChildItem "$($pwd)/src/*.ps1" -Recurse -Force).FullName

# then, run your pester tests
$PesterReport = Invoke-Pester './tests' -CodeCoverage $srcFiles -PassThru
  1. Once you have your report, you can then make a report for Coveralls.io
$CoverallsReport = New-CoverallsReport -Coverage $PesterReport.CodeCoverage -ServiceName 'appveyor' -BranchName master
  1. Finally, you can publish that report to Coveralls.io
Publish-CoverallsReport -Report $CoverallsReport -ApiToken 'token'

About

Cross-platform PowerShell module that allows you to publish Pester code coverage results to Coveralls.io

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published