as said here and there, I don’t have a solid computer science or software engineering background. Instead I’m an electrical engineer student, doing scientific real time DSP university projects that really benefit from JUCE. We now got an exiting application up and running and see a lot more potential in starting to build our own modules for better code reusability. There are quite a lot of ideas what could be contained in these modules, but before getting started on implementing features over features, I’d really like to gather some information on how the professionals out there ensure high code quality.
Unit tests and CI are terms I came across and google gave me some hints to basically understand the aims of these approaches. However wisely choosing one approach, one special framework, etc. for a project that should last for maybe years usually needs some experience I don’t have. And I think I just scratched the surface in understanding why this is done but have no experience on what working with those setups in a daily productive environment looks like.
At the moment it will be just me working on the codebase, but others might join over the time and have developed code in the past. We use a private GitLab Server, hosted by the university, which displays me the possibility of trying out a new CI build/test solution called “AutoDevOps” since month. I don’t know if this is one of the possible tools to use, especially if it’s marked as beta?
What I’d expect would be a system behaving like that:
- When implementing a new class, I would first implement a unit test (based on the JUCE
UnitTestclass?) that does a bunch of tests to see if the class behaves as expected. Then I would go on and implement the actual features.
- When I’m done, I’d push a commit containing these changes
- Now there is some kind of server (hosted where, running which OS?) that gets a notification if I pushed a commit. It will then automatically run all unit tests (using the
UnitTestRunner?) and give me a notification through whichever communication channel if any test failed
Are my expectations right until here?
Now if there are right, what do I need to build such a system? Do I need to set up an independent physical build server with every possible OS the code should run on (–>would that mean I have to set up a Mac Mini somewhere running the Mac OS tests ) or is this usually done with virtual machines running a specific version of the target OS? What about mobile target platforms like iOS? How does interaction between those server(s) and the GitLab server work (assumed that it’s not part of the GitLab server through this autoDevOps feature mentioned above)?
A lot of questions. I’d love to hear how the professionals out there handle those tasks! Thank you in advance!