A recent of developers found that Spring/Spring Boot users rate their code higher in quality, maintainability, and test coverage than non-Spring users. The survey of 450 Java developers also found that spend 25% of their time on tests, while non-Spring users spend 20% on tests. Mathew Lodge, CEO of AI-powered automated test solution provider , which sponsored the survey, said the results exemplify how tooling can help organizations adopt a particular way of working. “Everyone talks about and the culture of testing, and good tooling helps people do the right things,” he said. “Spring has great support for and testing in general.”
Lodge noted that respondents said the primary benefit of Spring/Spring Boot is that it . Still, the second most important benefit to them is that the to write unit tests in the first place. But, paradoxically, even spending that much time writing and maintaining tests, 45% of the survey respondents say they have less than 50% test coverage of their code; 37% said their range falls between 26% and 50%; while another 6% said they have coverage. Of that, the last 6% are Spring users. “That highlights how difficult it is to do unit testing,” Lodge said.
Some in the industry argue that 100% code coverage isn’t necessary; instead, organizations should focus on the most significant impact on the . But Lodge said, “The danger is you don’t know what you don’t know in that situation.” He said, “We try to write the smallest of tests possible to get the maximum coverage because you want to have as few tests as possible, so they’re easier to understand. And, you don’t get … 100 when you change one thing.”
Hand in hand with that, in the following terms that apply — reliable, maintainable, testable, portable, automated, and modern. Most (51%) respondents described their code as reliable; 50% chose modern, and 40% chose maintainable. And, despite respondents indicating they spend a quarter of their time on testing, only 37% described their code as testable. as maintainable.
The survey report noted that DiffBlue Cover was described by 39% of respondents as “very useful,” trailing only JUnit (44%) and TestNG (40%). Parasoft’s JTest was fourth at 38%. The survey did not answer this question: Does Spring help developers be better testers, or do better testers use Spring? According to the survey report, spring/Spring Boot developers value unit testing more highly than non-Spring users, have higher quality, more maintainable code, and better code coverage in their organizations.