Customer Cases
Pricing
UDT-Jenkins CI Integration
UDT menu

UDT-Jenkins CI Integration

Updated on: 2025-12-19 16:20

Jenkins is a widely used continuous integration (CI) tool. As a free and open-source software written in Java, Jenkins enhances your release agility by providing continuous integration services. These services can be triggered via a web application server or command line, accelerating deployment processes and version migration activities.

Leveraging the Jenkins plugin provided by the UDT Platform, you can connect your Jenkins CI instance to the platform’s automated testing tasks—embedding UDT’s “multi-device test execution capabilities” into Jenkins pipelines. This replaces fragmented manual processes such as “manual UDT test triggering, manual result aggregation, and manual release blocking,” enabling end-to-end automation of the entire workflow: code submission → build → multi-device automated testing → result feedback → release/rollback.

This document details the working principles, applicable scenarios, and step-by-step operation guide for integrating the UDT Platform with Jenkins.

If you wish to experience the UDT Platform’s Jenkins pipeline integration functionality, please contact us to obtain the UDT Jenkins plugin. Our technical team will assist you in completing the initial task build.

Key Application Scenarios for UDT Jenkins Plugin

Automated multi-end compatibility, functionality, and performance testing in CI pipelines, as well as multi-dimensional acceptance testing prior to version release.

Pain Points in Scenarios

  • During the iteration of client-side projects, after code submission, it is necessary to quickly verify compatibility and functionality issues across multiple devices/systems. Manual operations present the following challenges:
  • Manual login to the UDT Platform to select devices and trigger tests, resulting in low efficiency;
  • Test results cannot be associated with code submissions, leading to slow fault localization;
  • Manual re-triggering of tests after fault fixes, resulting in a long closed-loop cycle.

Solution
Jenkins monitors code commits/merge requests in the customer’s code repository, and tests are triggered immediately after code submission—greatly improving CI pipeline efficiency.

  • Automation replaces manual triggering, result aggregation, and ticket creation, enhancing test efficiency;
  • Leverage UDT’s multi-device pool to cover over 90% of device models/systems;
  • End-to-end automation from “code submission → testing → fix → retesting” with no manual breakpoints;
  • Comprehensive multi-dimensional verification prior to release, reducing the incidence of online compatibility and performance faults.

Working Principle of UDT Jenkins Plugin

Using the Jenkins plugin as a communication intermediary, it encapsulates the API call logic of UDT services, transmits Jenkins’ build artifacts and deployment instructions to the UDT server, and UDT executes the actual deployment operations. The results are then synchronized back to Jenkins, ultimately enabling end-to-end automation of the “build-deployment” workflow.

Throughout the process, there is no need to manually log in to the UDT Platform—all operations are triggered via Jenkins configurations or pipelines, aligning with CI/CD closed-loop requirements.

Preconditions for UDT Jenkins Plugin

  1. Jenkins version ≥ 2.452.4 and JDK version ≥ JDK 11
  2. An active UDT Platform account has been created, and the account has been added to a UDT Platform project

Detailed Operation Guide for UDT Jenkins Plugin

1. Install the UDT Jenkins Plugin

  • Open the Manage Jenkins interface and navigate to Plugins.
  • Go to Plugins > Advanced settings and select the UDT Jenkins plugin.
  • Click Deploy and wait for the deployment to complete.
  • During the deployment, check the box labeled “Restart Jenkins when installation is complete and no jobs are running” in the Download progress section.
    image.png
    image.png
    image.png
    image.png

2.System Configuration

  • Open the Manage Jenkins interface and navigate to System.
    image.png

  • Scroll down the page to find the UDT Automation Config section, then fill in the required information:

    • UDT Host API: Site URL, e.g., https://udt.wetest.net
    • User ID: Refer to the same-named field in UDT Platform > Account > userinfo
    • User Key: Refer to the same-named field in UDT Platform > Account > userinfo
    • Global Project ID: Refer to UDT Platform > Setting > Project > Unique identifier
    • Global Project Token: Refer to UDT Platform > Setting > Project > Project Token
    • Default Python Interpreter: This global interpreter will be used by default if no interpreter is configured for individual jobs.
  • Click Apply and Save.
    image.png

3.Configure Git Credentials

If you need to pull script code from private Git repositories, you must first configure the credentials for accessing the corresponding Git repository in accordance with Jenkins documentation.

  • Open the Manage Jenkins interface and navigate to Credentials.
  • Follow Jenkins’ guidelines to complete the configuration.

image.png
image.png

4.Build Tasks and Task Configuration

4.1 Example of Creating a Regular Task

With the UDT Jenkins Plugin, users can execute tests on the local Jenkins server without uploading script code to the UDT Platform, ensuring high security.
Click New Item on the Jenkins dashboard, enter the item name, and select the desired type. The following shows the relevant settings for a Freestyle project:
image.png

  • Navigate to the Configure page. Under Source Code Management, select and associate a Git repository:

    • Enter the repository URL.
    • Select the previously configured repository credentials.
    • Configure the polling interval via Poll SCM to keep up with content updates in the Git repository.
      image.png
  • Click Add build step and select UDT Automation Test (only Python is supported by default currently):

    • Test Script Path: Enter the path to the Git script to be tested.
    • Python Interpreter: Specify a Python interpreter for this task (the global interpreter configured in System will be used if not specified).
    • Dependency Management: Check the required environment operations as needed.
    • Authentication & Project:
      • Select Use Global Configuration to use the UDT project configured in System (test tasks will be created under this project scope).
      • Select Custom Configuration to reconfigure the UDT Platform account and project bound to the test.
    • Target Device Configuration: Select the devices to run the test:
      • Device ID: Refer to the Device ID of the device on the UDT Platform.
      • App ID: Refer to the number after “#” in UDT Platform > Repository > Applications.
      • App Package: The APP package name.
      • For iOS device testing: Additionally enter the correct iOS device serial number.
    • For Web testing: Select the browser to use (currently, only Chrome is supported for Android, and only Safari for iOS).
      image.png
  • Under Post-build Actions, set the archiving directory for files output as specified in the script. After configuration, the required generated files can be viewed in Jenkins.

  • Click Apply and Save after completing all settings.

  • Click Build Now on the left to start the test task directly.

Optional: Upload the package directly on Jenkins (no need to open the UDT Platform):

  • Go to Configure > General, check This project is parameterized, select File Parameter, and enter the File location.
  • In Build Steps > App Source, fill in the same App File Path as the File location above.
  • Later, upload the App to be tested to the Jenkins Workspace, name the compressed file the same as the specified File location, and the UDT Jenkins Plugin will recognize it automatically.
    image.png

4.2 Viewing Test Reports

After the test task is built, you can view the entire test process and error messages in the Console Output.
Additionally, the UDT Jenkins Plugin supports refreshing the task after the test completes. Click UDT Test Report in the left sidebar to access the complete test result report. The report includes UDT Platform test device information, test report links, device-level reports, and case-level reports. You can view all test task results without opening or logging into the UDT Platform.
image.png
image.png
image.png
image.png

4.3 Pipeline Task Example

  • Click New Item.
  • Enter the item name, select the Pipeline type, and navigate to the Configure page.
  • Scroll down to the Script section, paste the sample code into the code window, and click Apply and Save.

Download to See Pipeline Script & Python Script Demos
企业微信截图_7a2a909ecc434a529f613000d487759a.png

Note:
The subsequent task building, execution, and test report viewing processes are the same as those for the Freestyle project described above. Below is a demo of the Jenkins platform report for parallel testing on multiple devices:
image.png


If you have additional integration requirements or encounter integration-related issues, please contact us. We will arrange for test experts to understand your needs one-on-one and assist you with the testing.