Hi folks,
I've been working on improving and cleaning JForm for Joomla 4.0
(
https://github.com/joomla/joomla-cms/pull/12414) and also worked hard
on cleaning up the unittests. It took me several days of continous work
to properly test JForm and get a 100% code coverage. I just achieved
that 10 minutes ago and then went to work on JFormField to get those
unittests improved.
I'm taking JFormField as an example here, other areas are equally
horrible. That class has next to no proper unittests! Ok, I can live
with that, lots of code has been already in the project before we
started writing unittests somewhere at the end of the 1.6 development.
But for fucks sake: Why are you still accepting completely new methods
with large new features without any tests? We had a rule in the past
that no new code gets added to the libraries folder without proper
testcoverage.
I can turn a blind eye for the occasional changed or added line of code
to fix a bug or something, which might show up in the code coverage
report, but not large new features that are being added like in
JFormField just 10 days ago. If that rule is not being enforced, I
wonder why I invest weeks and months of work into writing good tests for
my PRs. I currently feel like I'm not only wasting my time with writing
those tests, I'm also creating more issues with that for me, since I
have to not only fix issues that people report when testing, but also
explain why the tests don't work with my code-change. >:-(
Hannes