Pester ExcludeTag not working

Welcome Forums General PowerShell Q&A Pester ExcludeTag not working

This topic contains 1 reply, has 2 voices, and was last updated by

2 years ago.

  • Author
  • #63625

    Points: 1
    Rank: Member


    I'm trying to separate my Unit Tests from the Integration Tests by applying tags to my Integration Tests:

    Describe -Tag 'Integration' -Name "New-Foo" {
        # Integration Tests

    If I now use Invoke-Pester -ExcludeTag 'Integration', the tests inside this describe block are still run. I tried to revert the logic and tagged every other describe block with 'Unit' and called Invoke-Pester -Tag 'Unit', but the Integration Tests are still beeing executed.

    I'm using:
    Pester version 3.4.3
    Powershell version 5.0.10586.672 (locally)
    Powershell version 5.0.10586.117 (remotely, where the integration tests are executed)

    Am I missing something? How can I get the tags to work properly?

  • #63630

    Points: 24
    Team Member
    Rank: Member


    I haven't been able to reproduce the problem on my machine. It works for me with Pester 3.4.0, 3.4.3 and 4.0.2. It would probably be better to create an issue on GitHub in the Pester project –

The topic ‘Pester ExcludeTag not working’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort