In a perfect world you don’t need a lot of GUI testing. In such ideal situation GUI event handlers are a thin shim translating GUI events into internal business logic data and method invocations. Then you unit test your internal logic without the GUI cruft and write simplistic tests for GUI event handlers with mocks for internal logic to cover the translation code and bam!, you have full test coverage.
Problem is KiCad is far from perfect in that regard, there is no clear separation of business logic and GUI code.
And that’s not something a newcomer can solve, this needs discipline and clear directive from project leadership: move toward testable code and add tests.
I strongly disagree with the last part here. Right now gitlab pipeline takes more than 3hours to run and it only does a linux build.
Imagine for a moment that every time you push a rev to a gitlab branch you get feedback in 3-5 minutes that you didn’t break any tests and you didn’t break any builds on all supported platforms. This allows the team to move completely to a model where every single commit goes through gitlab merge request and code review. It provides confidence that builds are not broken. It moves the bar of code quality higher.
This is doable today with dedicated machines.
Now add to this good test coverage and you are pretty close to being able to cut a release every month if you want. This one will of course take time and dedication.
Nickoe and Adam Wolf will likely disagree. Windows and mac builds still depend on a bunch of manual work.
You are talking about a different issue here. Coordinating codebase readiness with libs and docs and translations etc. will be somewhat manual but it’s not the thing that is impeding fast release cycle. Look at 5.1.7 release, it took what, 1-2 weeks from code being tagged to release.
My issue is with the whole “declare a feature freeze and hunker down for 3 months to hunt down bugs” approach. That kills development velocity.
I completely agree on this. But choosing a bad example doesn’t necessarily take away from @halachal’s point: there are plenty of large projects that adapt rapid release cycle model and enjoy it’s benefits. Not all of them are the dumpster fire that is js ecosystem.
That’s what tests are there to prevent. Or at least, they should be there before such release cycle model is adopted.
That right there is the reason why any individual can’t solve this problem. This needs to be a push from project leadership. Of course a volunteer coming in to add a random feature doesn’t see it as good use of his time to overhaul a bunch of existing code in addition to implementing a feature he cares about just to be able to write a unit test for his feature. So the problem perpetuates and nobody writes tests.
In every software projects life when it gets large enough it becomes a lot more time efficient to write tests than to not write them. KiCad is waay past that point in my opinion.
I touched on this earlier and it’s good to realize that you see the same problem as I. But I think your solution is not the best, you need to separate GUI from business logic first and then you can have a lot of ROI from simple non-gui unit tests.
=======
I apologize if this post reads like a rant of an entitled user who only demands things without taking into account the volunteer nature of the project and limitations of time and resources available for development.
It’s just that I like KiCad, I have invested a good chunk of my own time into it and my plugin for it and I would like to see the project succeed and grow further.
At the same time I look at it as a professional software engineer and can’t help but compare it to the process I am used to at my workplace and it’s just… painful. Kicad development is missing on so much quality of life things that would save you the precious volunteer time and raise their efficiency. But there just isn’t enough movement in that direction.
But I should also praise the movement that does happen. Switch to gitlab was a great step and I know a lot of work went into it.
Now it’s time to utilize the platform fully.