You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe this feature already exists, but I currently do this manually through "architecture tests".
For example, if I have a FluentValidator class implementation that validates an entity or single property, I use Reflection to guarantee at least one ValidatorTestBase sub-class exists that has at least one Fact/Theory on it. However, this doesn't guarantee any path coverage per say, as the Fact/Theory could be empty.
This is a bit tricky for me to "know" this rule got triggered internal to FluentValidator engine. I can call Validator.TestValidate and get whether or not a specific property had an error or not, but it doesn't tell me the path covered/coverage.
Furthermore, the library has idioms that wrap RuleFor expressions, like When...Otherwise.
Maybe this feature already exists in Coverlet and I just have never dug deep enough. I was thinking of a CoverletOutputFormat that is simply a gRPC object or Microsoft Bond format that could pipe into a streaming endpoint via IPC, and my actual interface for analyzing coverage was a lot like XUnit or Fixie data driven tests and the overall framework was smart enough to pipe objects to the right method, similar to how HotChocolate routes graphql requests. E.g.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Maybe this feature already exists, but I currently do this manually through "architecture tests".
For example, if I have a FluentValidator class implementation that validates an entity or single property, I use Reflection to guarantee at least one ValidatorTestBase sub-class exists that has at least one Fact/Theory on it. However, this doesn't guarantee any path coverage per say, as the Fact/Theory could be empty.
Consider the following code:
This is a bit tricky for me to "know" this rule got triggered internal to FluentValidator engine. I can call Validator.TestValidate and get whether or not a specific property had an error or not, but it doesn't tell me the path covered/coverage.
Furthermore, the library has idioms that wrap RuleFor expressions, like When...Otherwise.
Maybe this feature already exists in Coverlet and I just have never dug deep enough. I was thinking of a CoverletOutputFormat that is simply a gRPC object or Microsoft Bond format that could pipe into a streaming endpoint via IPC, and my actual interface for analyzing coverage was a lot like XUnit or Fixie data driven tests and the overall framework was smart enough to pipe objects to the right method, similar to how HotChocolate routes graphql requests. E.g.
I can imagine ways to make this syntax even smoother but don't want to write a giant spec just yet.
Beta Was this translation helpful? Give feedback.
All reactions