Just a brief update on my current pet project’s Jenkins pipelines setup. The Jenkins BlueOcean graph probably already covers it mostly:
I have parallelized some “Fast Tests” – all of these take less than a second to run currently due to the small codebase. If any of them fails it doesnt make sense to proceed. Currently these contain
- phpmd: “mess detector” using the clean code ruleset to identify unclean code.
- pdepend: Some code analytics I learned while reading “Clean Architecture” (review will come to the blog soon I hope).
- phan: Static Code Analysis
- phpunit: Unit testing
After those I run API tests with schemathesis. This takes one minute (configurable) and sends random payload to my REST API as per the generated swagger file.
Last but not least I run some acceptance tests, as described in Adventures with PHPUnit, geckodriver and selenium.
For a while I also parallelized the latter two test activities in a “Slow Tests” block, but I learned that the test execution was very unreliable due to the load the test environments put on my server. So for now they run sequential.
Today I finished some major clean code refactoring and I am happy to say that I could rework most of the code and the tests in place ensured that functionally nothing broke without me checking the actual application manually once! This is a major achievement for me personally, as all my former pet projects based on heavy manual testing on basically every change.