Investigating Build Failures: JUnit Integration with CloudBees Pipeline Explorer

Written by: Samantha Frost
3 min read

Here at CloudBees, we're all about providing tools that make your life as a developer easier because we, as developers ourselves, understand the tediousness of specific yet necessary tasks tearing us away from coding. In our last blog post, we introduced you to the basic use cases of CloudBees Pipeline Explorer, our comprehensive tool for troubleshooting pipelines faster, easier, and above all, all in one place. Today, we're taking it further by demonstrating how the Pipeline Explorer integrates with the JUnit testing framework to give you an all-in-one overview of your test results. Let's get started, shall we?

JUnit: An Overview

Before we dive into the integration, let's clarify what JUnit is and why it's an indispensable tool for Java developers. (I’m sure this is already known, but humor me as I walk the linear walk through this integration story.) JUnit is a simple yet powerful framework for writing automated, self-verifying tests in Java. Thanks to its support for test assertions, suite development, and immediate test reporting, it has become the most popular unit testing framework in the Java ecosystem.

JUnit plays a major role in regression testing, ensuring that new code changes don't negatively affect previously written code. The framework provides useful information about test results, including historical trends, a user-friendly web interface for viewing test reports, tracking failures, and much more.

For fun, read more about the Jenkins JUnit plugin integrated with the CloudBees Pipeline Explorer. 

Benefits of JUnit Integration into CloudBees Pipeline Explorer

Now that we've reviewed JUnit's importance let's discuss why integrating it into the CloudBees Pipeline Explorer (CPE) is helpful.

Firstly, by integrating JUnit with CPE, you get a centralized place to visualize failed build tests.

This integration takes place under the test insight icon in the Pipeline Explorer, leading you to the test insight panel.

CloudBees CI Pipeline Explorer test insight Icon
Cloudbees Pipeline Explorer

Although JUnit has its own dashboard, we've integrated it with Pipeline Explorer to highlight and consolidate what's in that dashboard, making your workflow more streamlined.

The test insights panel summarizes your test results and a list of test failures, including the stage each failure was in and a link to that test on the JUnit plugin page. You can search for tests and test class names, sort tests by name or duration, and display individual test results.

Investigating Build Failures: JUnit Integration with CloudBees Pipeline Explorer

Moreover, the integration directly links to the failures on the JUnit page within Jenkins, offering more detailed insights into each failure.

In essence, it provides you with an overview of statistics and visualizations directly in CPE by clicking the test insights icon.


Note: The JUnit plugin must be installed in your Jenkins environment to leverage these benefits. The test insights icon, which leads to the test insight panel, only appears if the JUnit plugin is installed.


Conclusion

Integrating JUnit with CloudBees Pipeline Explorer simplifies and enhances your testing process, providing a centralized, user-friendly interface for viewing and managing your test results. As developers, it's essential to have tools that make our jobs easier and increase our code's reliability and stability. This integration does just that, and we're excited to see how it improves your workflow!

So, give this integration a shot, and let us know your thoughts. 

Read all other 2 blogs in this series Investigating Build Failures with CloudBees Pipeline Explorer :

Stay up to date

We'll never share your email address and you can opt out at any time, we promise.