-
Notifications
You must be signed in to change notification settings - Fork 45
Tests Not Executed Should Show as Skipped #162
Comments
I'm not sure the gist would fix this problem - #130 seems to exist to handle the problem of "What if I need to test that a given setting is set to The problem I'm referencing here is that we need a way to distinguish between:
|
I see the differentiation now. So if you remove entire lines in the config, when you run
I'm sketched out about skipping $Null values. |
Agreed, skipping on So the other option then would be to remove the tests from the config or otherwise mark them for skipping? Removing them from the config implies than any test not found in the config is skipped, meaning you wouldn't get the newly released tests by default, they'd have to be explicitly added. On the other hand, this is already true. Marking them with the special value But I think this uncovers another problem - since we don't use tags or anything, we don't have a way to get Pester to show the tests as existing but skipped. |
I don't mean to interrupt, but as an acknowledgment: Yeah, good report, and no quick answer. I'm sure we can figure out a reasonable option to present them properly as "skipped," it'll just take time to dive into the code and play around with it. |
Here's an idea, based on the above conversation. The person configuring and running Vester probably needs to know about available, unreferenced tests, but like @michaeltlombardi says the person reading the output may find "300 skipped tests" non-intuitive.
This would require implementing -ListUnreferencedTests, implementing something like #130, and a VESTER_SKIP option. I'd be up for helping on the code side if you all think this is a feasible direction. |
I like this approach a lot - gives people a way to discover tests, makes test output pretty obvious, and lets people test for null values. |
Yes! In particular, dynamically counting the unreferenced tests as they're processed and then reporting the total number at the end sounds great. ( Here are some quick questions that come to mind:
|
Expected Behavior
Current Behavior
When running
Invoke-Vester
, all items in the config which have been removed or whose value has been set tonull
show in the test results asUnknown
because no tests run but the describe block still generates a data.Pester Host Output (Tests)
Pester Host Output (Summary)
ReportUnit Report (Suites)
ReportUnit Report (Summary)
Possible Solution
null
are skipped.These aren't the only ways to solve this, just the ones that came initially to mind.
Context
Often the readers of test output aren't the people most familiar with the ins and outs of how the test project works - they're either stakeholders who just want to be able to poke in and see how things are doing, or engineers/admins who are keeping an eye on health/compliance, or people peer reviewing changes, or auditors, or whatever. The primary value of this project from my perspective is that the people reviewing the output don't need to know how it works, just be able to use the information to drive better decisions and improve their insight into the environment.
Having these tests show up in a report as
unknown
or to see them visually run but without any tests underneath them executing can be confusing and concerning for people or lead them down wrong thought-lanes.The text was updated successfully, but these errors were encountered: