skippy-io / skippy

Mono-repo for all Skippy projects.
https://www.skippy.io
Apache License 2.0
19 stars 2 forks source link

Some tests in nested classes are not exercised when changing related production code not exercised by the tests' top-level class #163

Closed pjmartos closed 4 weeks ago

pjmartos commented 1 month ago

Skippy appears to not be taking into account that test classes may contain nested classes (e.g. classes annotated with @Nested) that in turn may contain test methods of their own (it is not mandatory, but it is usually the case).

Worts case scenario, if the top-level class itself doesn't exercise a production class that has changed, none of the tests would be executed, even if some of the nested classes of that test class do. The net result is that the change in the production class would be undetected.

fmck3516 commented 1 month ago

Thank you for your report. I was able to re-produce the issue - I'm working on a fix.

pjmartos commented 1 month ago

@fmck3516 I already submitted a PR with a fix: https://github.com/skippy-io/skippy/pull/164, would you have any suggestions? Thanks.

fmck3516 commented 1 month ago

Thanks a bunch for the PR - I will review after work today.

fmck3516 commented 1 month ago

@fmck3516 I already submitted a PR with a fix: #164, would you have any suggestions? Thanks.

I've responded in the PR.

fmck3516 commented 4 weeks ago

Additional functional tests have been added in skippy-regression-suite: https://github.com/skippy-io/skippy-regression-suite/pull/3

pjmartos commented 3 weeks ago

Thanks @fmck3516!