Pester icon indicating copy to clipboard operation
Pester copied to clipboard

making the language a bit more specific about the enabled flags

Open simonsabin opened this issue 2 years ago • 8 comments

PR Summary

Makes the docs more explicit about the need to set the enabled flag. #2036

If your pull request integrates Pester with another system, please tell us how the change can be tested. -->

PR Checklist

  • [x] PR has meaningful title
  • [x] Summary describes changes
  • [x] PR is ready to be merged
  • [x] Tests are added/update (if required)
  • [x] Documentation is updated/added (if required)

simonsabin avatar Jul 22 '21 09:07 simonsabin

Those lines are generated from the C# code. You would need to change them there. https://github.com/pester/Pester/blob/main/src/csharp/Pester/CodeCoverageConfiguration.cs#L44

nohwnd avatar Jul 22 '21 09:07 nohwnd

I assume same applies to https://github.com/pester/Pester/blob/main/src/csharp/Pester/TestResultConfiguration.cs, and the RSpec needs to match.

simonsabin avatar Jul 22 '21 09:07 simonsabin

What are your thoughts on changing https://github.com/pester/Pester/blob/6285de4c82bf61065d80395b770cfd31fa37b631/src/csharp/Pester/TestResultConfiguration.cs#L90 to set Enabled if the value isn't the default?

simonsabin avatar Jul 22 '21 10:07 simonsabin

Yes all the entries in the options list on New-PesterConfiguration are generated from the C# source in the build.ps1 -clean build.

What are your thoughts on changing to set Enabled if the value isn't the default?

Let's do it only if the same makes sense for all the other options that use the same pattern. E.g. Codecoverage. We should also check if use did not set the Enabled value explicitly to false by checking the isoriginalvalue property.

nohwnd avatar Jul 22 '21 10:07 nohwnd

Before I make broad changes, can you check the latest changes to see if that aligns with your thoughts and the testing is sufficient?

simonsabin avatar Jul 22 '21 11:07 simonsabin

Friendly reminder @simonsabin 😇

fflaten avatar May 30 '22 14:05 fflaten

I was just coming to report/request that the TestResult.Enabled flag should be automatically set to true if any of the TestResult properties are set and Enabled hasn't been explicitly set.. I can't tell you how many times I've forgotten to set enabled and discover weeks later that we haven't been capturing test results.

Any chance this can get reviewed, completed, approved, and merged?

splatteredbits avatar Aug 25 '22 19:08 splatteredbits

will look at it next week when back in office

simonsabin avatar Aug 25 '22 22:08 simonsabin