You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Tags:  jenkins plugin
The codebeamer Jenkins plugin is a community supported product, and is not covered by codebeamer support. For more information on Jenkins, see the Welcome to Jenkins Plugins Project.

codebeamer xUnit Uploader Plugin


This plugin publishes xUnit Results into codebeamer test cases and test runs.

It collects the unit test xml result files generated during build and processes them as follows:

Takes the root node and processes each <testcase> subnodes as follows:

  • builds ( if does not exist ) a test case folder structure based on the value of "classname" property
  • creates ( if if does not exist ) a testcase based on its "name" property
  • creates a testrun record and sets the testresult to Failure state if the testcases have any child element from the following set:
    • <failure> , <error>, <skipped>, <rerunFailure>
    • otherwise the test run result will be set to Passed.

A sample output xml can be defined as follows:

<?xml version="1.0" encoding="UTF-8"?>
<testsuite>
<testcase name="testcase0-success" classname="com.intland.testcases" time="2.382">
</testcase>
<testcase name="testcase1-fail" classname="com.intland.testcases" time="2.382">
 <failure/>
</testcase>
<testcase name="testcase2-error" classname="com.intland.testcases" time="2.382">
 <error/>
</testcase>
<testcase name="testcase3-skipped" classname="com.intland.testcases" time="2.382">
 <skipped/>
</testcase>
<testcase name="testcase4-rerun-fail" classname="com.intland.testcases" time="2.382">
 <rerunFailure/>
</testcase>
<testcase name="testcase5-other" classname="com.intland.testcases" time="2.382">
 <other/>
</testcase>
</testsuite>

Install Plugin

Go to "Manage jenkins" page and click on "Plugin manager".

You have two options to install:

  • First case:
    1. Go to the Available tab.
    2. Select XUnit Uploader plugin.
    3. Click on "Install without restart" button.
  • Second case:
    1. Download the plugin source code from GitHub and build it.
    2. Go to Advanced tab.
    3. Go to Upload Plugin section and upload the hpi file.

Add Plugin

  1. Go to the settings page of your jenkins job.
  2. Go to "Post-build Actions" tab and click on "Add post-build action" button.
  3. Select codebeamer XUunit Uploader plugin.

Plugin Settings

Now you can see the following screen:

Options:

  • Disable XUnit Uploader
    If this is set to true then the plugin does not upload test results to codebeamer.
  • codebeamer URL
    You can set the URL of codebeamer instance. It is mandatory.
  • Credentials
    You can set a codebeamer user, user should have "Rest / Remote API - Access" permission. It is mandatory.
  • Test Configuration ID
    You can set a test configuration to the generated test cases. It is mandatory.
  • Test Case Tracker ID
    You can set a test case tracker. The generated test cases are created on this tracker. It is mandatory if test case id is not set.
  • Test Case ID
    You can set a parent test case item. The generated test cases are created under this item. It is optional.
    Warning: This option override test case tracker option!
  • Test Run Tracker ID
    You can set a test run tracker. The generated test case runs are created on this tracker. It is mandatory.
  • Release ID
    You can set a release. This is set in all generated test case run items. It is optional
  • Test Results Directory
    You can set the test result directory. This contains the test result xml files. You can use relative path and the root folder is the workspace folder of your jenkins job in this case. It is mandatory.
  • Default Package Prefix
    You can set a package prefix. It is optional.
    For example: abc.test.ng
    In this case the test results are filtered by this prefix.