Legacy Knowledge Base
Published Jun. 30, 2025

How to Determine if JUnit is installed on Liferay Cloud

Written By

Santhosh Kumar

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • How to determine if JUnit is installed on Liferay Cloud?
  • How do users install JUnit on Liferay Cloud and integrate it with Jenkins?

Environment

  • Liferay Cloud

Resolution

  • JUnit is pre-installed on Liferay Cloud environments.
  • To verify the JUnit installation and version within a Jenkins pipeline, use the following Groovy script in the Jenkins script console:
    def plugin = Jenkins.instance.pluginManager.getPlugin('junit')
    if (plugin) {
        println "JUnit Plugin Version: ${plugin.getVersion()}"
    } else {
        println "JUnit Plugin is not installed."
    }
    
  • For guidance on integrating JUnit with the Jenkins pipeline, consult these external resources:

NOTE: Liferay Support does not recommend or endorse specific third-party products over others. The information provided about products not created by Liferay is for reference purposes only, and any implementation of these principles will be at your team's discretion.

Did this article resolve your issue ?

Legacy Knowledge Base