3 ms·
I've seen clients run automated architecture tests with varying degrees of success. These reduce damage done by juniors. For example tests that ensure that con
by hu3 3y ago
I've seen clients run automated architecture tests with varying degrees of success. These reduce damage done by juniors.
For example tests that ensure that controller actions don't create SQL queries directly but instead always use repositories/services/models (whatever you call data fetching layer).
Another example is a test that ensures that there's no "print" in data fetching layer, only allowing them in HTTP controller actions.
That's the gist of it.
- zx8080 3y ago> damage done by juniors This phrase says it all. But why doesn't the review process help to improve the quality?
- hu3 3y agoSome clients do use Pull Request reviews. And to a lesser extent some use Pair Programming. Automated architecture tests helps to keep things tidy during those rushed moments.
- zx8080 3y ago> Automated architecture tests Is there some good links to know more about it?
- hu3 3y agoHi zx, I'll link some tools I've seen and/or worked with: For C#: 1) https://github.com/TNG/ArchUnitNET https://github.com/TNG/ArchUnitNET For PHP: 1) Pest testing framework demonstration: https://youtu.be/ZidLP7TqXnc?t=133 https://youtu.be/ZidLP7TqXnc?t=133 2) https://github.com/spaze/phpstan-disallowed-calls https://github.com/spaze/phpstan-disallowed-calls 3) https://github.com/ekino/phpstan-banned-code https://github.com/ekino/phpstan-banned-code 4) https://packagist.org/packages/ta-tikoma/phpunit-architecture-test https://packagist.org/packages/ta-tikoma/phpunit-architectur... 5) https://qossmic.github.io/deptrac/ https://qossmic.github.io/deptrac/ Hope that helps.