Docs
Bumblebee
CICD
Jenkins

Jenkins and ALM Integration

Team use Jenkins to implement CI pipelines. These pipeline typically contain stages for running unit or integration tests using a variety of testing frameworks or tools like JUnit with Selenium, Python with Playwright, etc. The Bumblebee Plugin for Jenkins enables user to easily configure these pipeline stages to send test results to ALM via the Bumblebee server. The Bumblebee Jenkins plugin is able to parse a variety of reporting formats, extract useful data, and map them to appropriate fields in ALM without any changes to the test code.

Installation

Install Bumblebee Jenkins plugin from Jenkins update center

jenkins

Configure the Bumblebee Jenkins: Manage Jenkins → Configure System → Bumblebee Plugin

jenkins

Bumblebee Jenkins plugin exposes a variety of options within the Jenkins Job to enable a variety of interactions with ALM.

Test Results Processor

Bumblebee is able to process a variety of test framework reporting schemas such as JUnit, TestNG, NUnit, Cucumber, Robot, and seamlessly upload them to ALM. Add the Bumblebee ALM Uploader post-build action and configure the step per your ALM integration needs

jenkins

Jenkins Pipeline

  step([$class: 'BumblebeePublisher',
     configs:[[
	     domain: 'DEFAULT',
	     projectName: 'demo',
	     testPlan: 'Subject\\testPlan',
	     testLab: 'Root\\testLab',
	     testSet : 'testSet',
	     format: 'JUNIT',
	     resultPattern:'**/surefire-reports/*.xml',
	     customProperties:'key=value',
	     failIfUploadFailed: false,
	     offline: false]],
     ])

ALM custom fields that are configured on the Bumblebee Server XML mappings, can be specified in the custom properties field as name-value pairs. jenkins

Bumblebee ALM Uploader Field Reference

Field NameRequiredDescription
DomainYesThe name of ALM domain where to export test results
ProjectYesThe name of ALM project
Test PlanYesTestPlan path in ALM where tests should be saved. Must start with Subject\
Test LabYesTestLab path in ALM where test results should be saved. Must start with Root\
Test SetYesThe name of test set in ALM
FormatYesFormat of test results generated by previous tasks in the same job. Available values: junit, nunit, testng, cucumber, serenity, jbehave
Results File PatternYesProvide path to the XML file(s) generated during the build.This is a comma separated list of test result directories.You can also use Ant style patterns such as **/surefire-reports/*.xml
HP ALM MappingsNoIf ALM Mappings are configured on the Bumblebee server, their values can be specified in this field.The format is [alm field label 1]=[value 1], [alm field label 2]=[value 2]. The label values can be Jenkins environment variables. You can also directly specify the default value on the Bumblebee server. Please refer to Bumblebee server documentation for details on configuring HP ALM mappings.
Fail build if upload unsuccessfulN/AIf checked, the build will be marked as failed if for any reason the plugin was not able to upload the results. This could be due to Bumblebee server issues, HP ALM server issues, network issues, etc.
Process offlineN/AIf checked, Bumblebee will send test reports to be processed in a background thread on the Bumblebee server. This option is useful if you notice a large increase in build time due to Bumblebee's real-time test results processing.

When the Jenkins job is run, the build log will show useful information about Bumblebee server activity. The test results will be processed by Bumblebee server and corresponding TestPlan, TestLab, Testset, and TestRun will be created automatically.

jenkins

jenkins

jenkins

Defect Management

Triaging Jenkins build failures and viewing test results reports in Jenkins can be a very time consuming exercise. If this is not done in a timely manner, defect may not be reported on time. Bumblebee Jenkins plugin allows user to automatically create and resolve defect in ALM using a variety of configurable rules and policies.

Add the HP ALM Uploader post-build action and configure the Defect Management section per your defect management workflow.

jenkins

Bumblebee Defect Managment Configuration

Field NameDescription
Defect Create PolicyCreate: Creates a new defect for failing test or updates existing tests whose status is New, Open or Reopen.
Reopen: Creates a new defect for failing test or reopens the existing one
Create StatusStatus in ALM which will be assigned to a newly created defect
Create Defect MappingsSet of properties which will be set to a newly created defect. The format is as follows: [alm field label]=[value]. Each name/value pair must start with the new line. ALM field labels must be configured on Bumblebee Server Bumblebee Server
Reopen StatusStatus in ALM which will be assigned to a reopened defect. Effective only if create policy is Reopen
Reopen Defect MappingsSet of properties which will be set to a reopened defect. The format is as follows: [alm field label]=[value]. Each name/value pair must start with the new line. ALM field labels must be configured on Bumblebee Server
SeverityValue for Severity property of defect
Defect Resolve PolicyIf set to Close, Bumblebee will search for an existing defects with Bumblebee prefix for passed tests and resolve them
Resolve StatusStatus in ALM which will be assigned to a resolved defect
Resolve Defect MappingsSet of properties which will be set to a resolved defect. The format is as follows: [alm field label]=[value]. Each name/value pair must start with the new line. ALM field labels must be configured on Bumblebee Server

Jenkins Pipeline

step([$class: 'BumblebeePublisher',
     configs:[[
         domain: 'DEFAULT',
         projectName: 'demo',
         testPlan: 'Subject\\defcts',
         testLab: 'Root\\defects',
         testSet : 'defects',
         format: 'cucumber',
         resultPattern:'target/*.json',
         defectCreatePolicy: 'REOPEN',
         defectCreateStatus: 'Open',
         defectSeverity: "1-Low",
         defectReopenStatus: "Open",
         defectResolvePolicy: "CLOSE",
         defectResolveStatus: "Closed",
         defectCreateProperties: "defect parameter=Created from Jenkins\ndefect project=Test\ndefect priority=2-Medium",
         defectReopenProperties: "defect parameter=Reopened from Jenkins",
         defectResolveProperties: "defect parameter=Closed from Jenkins",
         failIfUploadFailed: false,
         offline: false]],
     ])