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

PSRemotely support to pass tag or Pester Splat hash #51

Open
DexterPOSH opened this issue Apr 4, 2017 · 3 comments
Open

PSRemotely support to pass tag or Pester Splat hash #51

DexterPOSH opened this issue Apr 4, 2017 · 3 comments
Assignees

Comments

@DexterPOSH
Copy link
Owner

This one is not completely ready. Want the ability to specify tags to PSRemotely while invoking it.

Invoke-PSRemotely -Script S2Dvalidation.PSRemotely.ps1 -Tag VMMReadiness

Now the above should flow down the tag to the remote nodes and only run ops validation tests marked with the same tag.

@DexterPOSH DexterPOSH self-assigned this Apr 4, 2017
@DexterPOSH
Copy link
Owner Author

DexterPOSH commented Apr 10, 2017

Thinking aloud.
Should PSRemotely support passing tags at two different scopes?

At Node scope

This would capability to organize tests targeting the same nodes.

PSRemotely {
    Node AD -Tag ServiceValidation {
         # Service tests
    }

    Node AD -Tag DomainGroupsValidation {
         # tests run on domain groups
    }
}

At Test scope

This would give capability to organize tests using Pester Describe blocks.

PSRemotely {
    Node AD {
         # Service tests
         Describe 'Service test' -tag Service {
              # tests
         }

         # Domain group tests
         Describe 'DomainGroups test' -tag domaingroup {
              # tests
         }
    }
} 

Now the default would be passing tags to test scope. For example -

Invoke-PSRemotely -Tag Service

Now the above would only run Pester tests (Describe blocks) marked with the specified tag.

To support more flexibility to the DSL by allowing tags at the node scope, thinking of adding -Tag parameter supports a hash table as an alternative like below:-

Invoke-PSRemotely -Tag @{Scope='Node';Name=@('ServiceValidation','DomainGroupsValidation')}

@DexterPOSH DexterPOSH changed the title PSRemotely support to pass tag PSRemotely support to pass tag or Pester Splat hash May 24, 2017
@DexterPOSH
Copy link
Owner Author

DexterPOSH commented May 24, 2017

Or we can add a parameter named -PesterSplatHash which takes a hashtable and splats that to the Invoke-Pester on the PSRemotely node while running the tests. This is much cleaner and less amount of work.

@DexterPOSH DexterPOSH added this to Backlog in Active workbench Jun 23, 2017
@DexterPOSH DexterPOSH moved this from Backlog to In Progress in Active workbench Jun 23, 2017
@DexterPOSH
Copy link
Owner Author

This requires some unit and integration tests coverage before it can be merged.

@DexterPOSH DexterPOSH moved this from In Progress to Testing in Active workbench Jul 11, 2017
@DexterPOSH DexterPOSH moved this from Testing to Done in Active workbench Sep 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant