Boost Development Productivity With Data-Driven Testing Automation for Gradle

by Alastair Wilkes in

How Launchable’s Machine Learning Compliments Build Automation Tools

Software development has often been an arduous process, one slowed by manual input and long cycle times. Organizations and DevOps teams want to speed up application development, helping them to respond to market potential and address problems as quickly as possible. But modern software design has made it difficult to reach that goal. The challenge is to go fast, but still maintain code quality; enterprises do not want to go so fast that they crash and burn. 

Build automation tools like Gradle control the development process, from compilation and packaging to testing, deployment, and publishing. Supporting Java, C/C++, and JavaScript languages, Gradle automates software delivery to an extent. Friction comes because applications are divvied up into small components that are dynamically assembled at run time. Understanding what is occurring, identifying problems, and resolving them has been a laborious task because there are so many interconnected parts and contingencies. Consequently, running a test to see the impact of a straightforward change often consumes hours, during which developers might sit idle waiting for the results. 

There’s opportunity to further boost development productivity and cycle times alongside tools like Gradle with smarter, data-driven testing automation. Advances in areas, like machine learning, are increasing the potential to streamline testing times significantly and deliver continuous quality improvements. 

Improving Build Automation with Predictive Test Selection

The problems arise for many reasons, starting with testing inefficiency. These inefficiencies span a spectrum of causes. Developers are encouraged (rightly so) to write a lot of unit tests using junit framework. Over a period of time the test suite balloons up such that the execution time gets in the way of quick feedback.

Further right into the funnel, you have UX tests using frameworks like Selenium for cross browser testing. These tests take a lot of time. Larger suites like integration tests, smoke tests, and end-to-end tests suffer from both long test times of individual tests or the test overall suite itself. Another persistent problem is flaky tests in the test suite.

In most testing instances, much of the code remains the same and only a few spots are altered. To date, testing tools have not been smart enough to recognize where the changes occur and limit checking to those areas.

Tools include a series of standard tests that run regardless of what has been changed. A QA run may include four tests but only one really focuses on the potential impact of the change; the other three tie up time and resources unnecessarily. As a result, what developers end up with is a copious amount of information that they have to laboriously ferret through in order to determine the impact of the changes.

Launchable’s Predictive Test Selection harnesses machine learning to identify and run tests with highest probability of failing based on code and test metadata. This speeds up the development feedback loop and further propels the efficiencies when run alongside build automation tools like Gradle. DevOps teams are able to eliminate unnecessary manual test review or running full test suites every time.

As the machine learning algorithm tracks your testing over time, it identifies the right tests to run based on code changes. For example rather than running all four tests, it can narrow the number down to critical one. The Predictive Test Selection’s machine learning learns from your data the likelihood of failure for each test based on past runs and the source code changes being tested.

Benefits of Integrating Launchable with Gradle: 

  • Testing times are reduced by 80% or more
  • Developers test what matters and leave the rest of the code alone
  • Testing becomes smarter 
  • Developers get feedback faster
  • Programmers find bugs quicker
  • Companies move fast but do not crash and burn

Launchable cut a client’s test time by 40% from more than two hours to one hour and change. The company ran the test 400 times a week, which translated to 43,000 hours annually. So, the savings were significant: They reduced testing by 15.6 K hours a year, saved $998,000, had of ROI 2,010% that translated to 8 people on staff and a 3X reduction in hardware capacity.

As development evolves to shift left, new challenges will continue to arise. Harnessing the power of machine learning will enable DevOps teams to prioritize critical tests, reduce the noise from flaky tests, deliver continuous quality, and speed up application delivery.  

Launchable’s integration with Gradle is simple and takes less than 30 minutes. Simply sign up, install the Launchable CLI, set your API key, and verify your connection. From there you can subset your test runs and start having Predictive Test Selection learn your testing suite.

Eliminate slow test cycles.

You don’t have the time for slow tests. Test what matters. Learn how Launchable works and get started in less than 30 minutes.

Your cart
    Checkout