stryker-net
stryker-net copied to clipboard
Improve integration tests to check mutation spans
Is your feature request related to a problem? Please describe. We have seen problems with the spans of mutations after a release.
Describe the solution you'd like We would like to improve the integration tests to also check the spans of the mutations. Currently we only check if the number of mutations is correct.
We could do this by looping through all mutations an check if they are logically placed. For example, a span inside a using statement is unexpected as we don't mutate usings. The same goes for xml comments and outside of methods or fields. If the span of one or more mutations is unexpected the integration test should fail. That way we know before we release stryker.
Describe alternatives you've considered We can also check the exact span for each mutation. But this would be a lot of work and with each change the integration test would fail.
Note that we have unit tests for span verification. It may be easier to add more test cases to these. Envoyé de mon iPhone
Le 9 sept. 2020 à 10:27, Richard Werkman [email protected] a écrit :
Is your feature request related to a problem? Please describe. We have seen problems with the spans of mutations after a release.
Describe the solution you'd like We would like to improve the integration tests to also check the spans of the mutations. Currently we only check if the number of mutations is correct.
We could do this by looping through all mutations an check if they are logically placed. For example, a span inside a using statement is unexpected as we don't mutate usings. The same goes for xml comments and outside of methods or fields. If the span of one or more mutations is unexpected the integration test should fail. That way we know before we release stryker.
Describe alternatives you've considered We can also check the exact span for each mutation. But this would be a lot of work and with each change the integration test would fail.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Yes we do have unit tests. But the issue here is that the span can get lost in a lot of places. It could go wrong in any of the orchestrators. Or a mutator itself. Or mutationcontext. By using the integration test we are sure the spans are correct in all of our code.