I'm working on a project that has a lot of legacy code that is not covered with tests.
Is there any way that I could set up the integration server to check that all new commits have a minimum amount of tests (say, coverage is >70%)?
Essentially, I see two options:
I like option 1 more because it forces changes in legacy code to be unit tested. This should increase the overall test coverage.
Right now we're using Jenkins as our CI server and JaCoCo for test coverage. Maven is used for building the project and SVN is our main source control.
I know you can configure Jenkins to verify that there is at least one test file as part of the commit. That would not assure good test coverage, but at least you would know there was some kind of test related changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With