Skip to content

Scope of a single scenario - should I call my role multiple times in one scenario #4012

Answered by cidrblock
pbarriscale asked this question in Q&A
Discussion options

You must be logged in to vote

IMHO, I would do 1 scenario for each check (set of vars). The reason is, it is easier to isolate, test, and see and recreate a failure. If you are using the pytest-ansible pluign, each scenario will show as an individual pytest test so when running in your CI it's easier to specific exactly which one failed.

In the end, having the tests is better than not having them, so which ever why you choose to go, everything will be better. :)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@pbarriscale
Comment options

Comment options

You must be logged in to vote
1 reply
@pbarriscale
Comment options

Answer selected by pbarriscale
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants