Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement request: Code coverage exclusion filters #463

Closed
Novanet- opened this issue Mar 21, 2019 · 1 comment
Closed

Enhancement request: Code coverage exclusion filters #463

Novanet- opened this issue Mar 21, 2019 · 1 comment
Labels

Comments

@Novanet-
Copy link

Azure DevOps Extension you are using

Pester

Where are you running it?

TFS 2018

Version of Extension/Task

V7

Requirement

Add a task parameter that allows the specifying of multiple exclude filters for folders/files to run coverage against.

Reason: Within our source folder which contains our poweshell scripts which we want to get coverage data for, we have a "ServiceFabric" folder that includes a load a Microsoft provided scripts that are needed for our implementation, but because are third-party code we don't write unit tests for.
Because they are in our source folder, they get included in our coverage data which messes up up our results. We have a workaround for this during local developmentby using a custom script to generate the coverage data.

$files = Get-ChildItem ..\Installation -File -Recurse -Include *.ps1 | Where {$_.FullName -notlike "*\ServiceFabric\*"}
Invoke-Pester -Path ..\Installation.Tests -CodeCoverage $files -CodeCoverageOutputFile ..\cov.xml

But there is no mechanism to specify this sort of filtering in our CI process using the Pester task at the moment.

I was thinking something like the search pattern parameter in the Index Sources & Publish Symbols task https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/index-sources-publish-symbols?view=azure-devops

@ChrisLGardner
Copy link
Collaborator

Being tracked over in pester/AzureDevOpsExtension#12 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants