This Polarion extension is designed to integrate BDD process into Polarion. It provides the almost same functionality as Xray plugin for Jira. | Read-only mirror of https://github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.cucumber — SBB. Issues & pull requests at the source.
  • Java 58.5%
  • TypeScript 35.2%
  • CSS 2.8%
  • JavaScript 2.7%
  • HTML 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
renovate[bot] 69c4215d22
fix(deps): update dependency ch.sbb.polarion.extensions:ch.sbb.polarion.extension.generic to v17.0.1 (#323)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-12-04 03:17:12 +00:00
.github chore: sync workflows and the bug form from the template (#319) 2026-12-02 20:13:32 +01:00
.idea/codeStyles ci: update workflows with template to fix codeql findings (#39) 2025-04-16 13:42:59 +02:00
.mvn feat: publish to JFrog instead of Maven Central (#316) 2026-12-02 16:12:47 +01:00
docs chore: family maintenance sweep (#147) 2026-08-13 08:47:17 +02:00
src chore: fix CodeQL findings (#295) 2026-11-20 18:07:50 +01:00
ui feat!: build against Polarion 2612 (#321) 2026-12-02 23:21:59 +01:00
.gitignore feat: react UI (#121) 2026-07-28 15:46:53 +02:00
.pre-commit-config.yaml chore: sync workflows and the bug form from the template (#319) 2026-12-02 20:13:32 +01:00
.yamlfix.toml ci: update workflows with template to fix codeql findings (#39) 2025-04-16 13:42:59 +02:00
CHANGELOG.md chore(main): release 5.3.0 (#180) 2026-12-02 16:21:25 +01:00
CLAUDE.md feat: publish to JFrog instead of Maven Central (#316) 2026-12-02 16:12:47 +01:00
CODING_STANDARDS.md ci: update build process to use JFrog for private artifacts and impro… (#56) 2025-07-01 17:15:05 +02:00
CONTRIBUTING.md chore: sync from open-source-polarion-java-repo-template (3dc98c4) (#82) 2026-06-09 11:44:23 +02:00
DCO chore: sync from open-source-polarion-java-repo-template (3dc98c4) (#82) 2026-06-09 11:44:23 +02:00
DEVELOPMENT.md feat!: build against Polarion 2612 (#321) 2026-12-02 23:21:59 +01:00
LICENSE chore: sync from open-source-polarion-java-repo-template (3dc98c4) (#82) 2026-06-09 11:44:23 +02:00
lombok.config ci: update workflows with template to fix codeql findings (#39) 2025-04-16 13:42:59 +02:00
NOTICE chore: sync from open-source-polarion-java-repo-template (3dc98c4) (#82) 2026-06-09 11:44:23 +02:00
pom.xml fix(deps): update dependency ch.sbb.polarion.extensions:ch.sbb.polarion.extension.generic to v17.0.1 (#323) 2026-12-04 03:17:12 +00:00
README.md feat!: build against Polarion 2612 (#321) 2026-12-02 23:21:59 +01:00
redocly.yaml chore: sync from open-source-polarion-java-repo-template (3dc98c4) (#82) 2026-06-09 11:44:23 +02:00
RELEASE.md feat: publish to JFrog instead of Maven Central (#316) 2026-12-02 16:12:47 +01:00
renovate.json Initial commit 2024-07-04 08:19:23 +02:00
USER_GUIDE.md fix: extend/update documentation (#256) 2026-10-21 17:44:15 +02:00
zizmor.yml chore: sync from open-source-polarion-java-repo-template (3dc98c4) (#82) 2026-06-09 11:44:23 +02:00

Quality Gate Status Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Reliability Rating Security Rating Maintainability Rating Vulnerabilities

Cucumber Integration Extension for Polarion ALM

This Polarion extension is designed to integrate BDD process into Polarion. It provides the almost same functionality as Xray plugin for Jira:

  • Cucumber feature tracked as WorkItem attachment and can be edited using Gherkin editor
  • Cucumber features can be downloaded as .zip file according to provided criteria
  • Execution results can be imported as Test Run into Polarion

Important

Starting from version 2.0.0 only latest version of Polarion is supported. Right now it is Polarion 2612.

Documentation

Document Description
User guide Create tests, upload test results
Development guide Build from sources, local installation, debugging
Changelog Changes in each release
REST API OpenAPI specification

Compatibility

This extension is compatible with:

  • Polarion 2612
  • Java 21

Quick start

The compiled extension is available on the releases page. You do not need to compile it from the sources.

  1. Download ch.sbb.polarion.extension.cucumber-<version>.jar from the latest release.
  2. Stop Polarion.
  3. Copy the jar file to <polarion_home>/polarion/extensions/ch.sbb.polarion.extension.cucumber/eclipse/plugins. Create the folder if it does not exist.
  4. Remove older versions of the extension jar from this folder.
  5. Delete the folder <polarion_home>/data/workspace/.config.
  6. Start Polarion.
  7. Do the Polarion configuration steps for each project that uses the extension.

Important

You must delete <polarion_home>/data/workspace/.config after each installation or update of the extension. If you do not delete it, Polarion does not load the new extension version.

To make sure that the extension is loaded, log in to Polarion and open https://<polarion_host>/polarion/cucumber/rest/api/version. To see the REST API description, open https://<polarion_host>/polarion/cucumber/rest/swagger.

Build

This extension can be produced using maven:

mvn clean package

Installation to Polarion

To install the extension to Polarion ch.sbb.polarion.extension.cucumber-<version>.jar should be copied to <polarion_home>/polarion/extensions/ch.sbb.polarion.extension.cucumber/eclipse/plugins It can be done manually or automated using maven build:

mvn clean install -P local-install-into-polarion

For automated installation with maven env variable POLARION_HOME should be defined and point to folder where Polarion is installed.

Changes only take effect after restart of Polarion.

Important

Delete <polarion_home>/data/workspace/.config before you restart Polarion.

Polarion configuration

Cucumber feature editor to appear on Test Case page

  1. Open a project which Test Case pages should display the editor
  2. On the top of the project's navigation pane click ⚙ (Actions) ➙ 🔧 Administration. Project's administration page will be opened.
  3. On the administration's navigation pane select Work Items ➙ Form Configuration.
  4. On the form configuration page you will see 2 sections: Form Filters and Form Layouts.
  5. In the table of Form Layouts section find line Test Case and click 📝 Edit
  6. In opened Form Layout Configuration editor find a line with code:
    …
    <field id="description"/>
    …
    
  7. Insert following new line after it:
    …
    <extension id="cucumber" label="Cucumber Test"/>
    …
    
  8. Save changes by clicking 💾 Save

Cucumber feature editor to appear on the Live Doc sidebar

  1. Open a project which the Live Doc sidebar should display the editor
  2. On the top of the project's navigation pane click ⚙ (Actions) ➙ 🔧 Administration. Project's administration page will be opened.
  3. On the administration's navigation pane select Documents & Pages ➙ Work Item Properties Sidebar.
  4. In the opened Edit Project Configuration editor insert the following line:
    …
    <extension id="cucumber" label="Cucumber Test"/>
    …
    
  5. Save changes by clicking 💾 Save

Test Run's description to appear on UI

By default, Test Run's UI doesn't display its description (as a custom field). To enable displaying description following needs to be done:

  1. Open a project which Test Run Templates needs to be modified.
  2. In Navigation, click Test Runs. The Test Runs page opens. The top section of the page displays a table of existing Test Runs.
  3. On the right hand side of the toolbar of the Test Runs page, click Manage Templates. The table of Test Runs is replaced by a table of Test Run Templates.
  4. Select a template you want to modify.
  5. On the toolbar of the detail pane, click ⚙ (Actions) ➙ Customize Test Run Page.
  6. You will see a warning block containing text:

    This is a Test Run template, you cannot execute this test. Please create a Test Run first using this template

  7. Click ✎ (Pencil) to edit code of this block, on the right hand side of the page you will see following lines of code:
    #if($testRun.fields().isTemplate().get())
      $widgetContext.renderWarning("<b>This is a Test Run template</b>, you cannot execute this test. Please create a Test Run first using this template")
    #end
    #if($testRun.fields().records().is().empty() && $testRun.fields().selectTestCasesBy().optionId().equals("manualSelection"))
      $widgetContext.renderInfo("Select the test cases you want to plan for execution by clicking Operations > Select Test Cases.")
    #end
    
  8. Add new lines:
    …
    #if(!$testRun.fields().description().is().empty())
      $testRun.fields.description.render().withText()
    #end
    
  9. Save template by clicking 💾

Custom fields: Components

  1. Create an enum containing all acceptable components names for selected project:
    • go to Project Administration -> Work Items -> Enumerations
    • use Work Item Type: --Unspecific--, Enumeration: Custom + provide own name e.g. components
    • fill all possible values of this enum, e.g. TA-Adapter, DailyTrainDataCalculator, ItisGateway, etc
    • save enum configuration
  2. Create a custom field for selected project:
    • go to Project Administration -> Testing -> Test Run Custom Fields
    • use ID: components, Name: Components, Type: Enum (+ select enum name created on step 1) and enable 'Multi' checkbox
    • save configuration
  3. Customize Test Run Report to show Components field:
    • Test Runs -> on the right hand side of the toolbar of the Test Runs page, click Manage Templates and select a template you want to modify
    • Place where it is needed widget "Script - Block" and put following code inside:
      #if(!$testRun.fields().get("components").is().empty())
      <h2>Components</h2>
      $testRun.fields().get("components").render()
      #end
      
    • click 'Save'
    • Now 'Components' field would appear on detail page if the field was sent during importing test results

Custom fields: Test Plan

  1. Create a custom field for selected project :
    • go to Project Administration -> Testing -> Test Run Custom Fields
    • use ID: plans, Name: Test Plan, Type: Rich Text (multi-line)
    • save configuration
  2. Customize Test Run Report to show Test Plan field:
    • Test Runs -> on the right hand side of the toolbar of the Test Runs page, click Manage Templates and select a template you want to modify
    • Place where it is needed widget "Script - Block" and put following code inside:
      #if(!$testRun.fields().get("plans").is().empty())
      <h2>Test plan</h2>
      $testRun.fields().get("plans").render()
      #end
      
    • click 'Save'
    • Now 'Test Plan' field would appear on Test Run detail page if the field was sent by maven-plugin. Also if current project contains some plan(s) with the id equal to given value - the value will be transformaed into a link to certain plan.
  3. Customize Plan to show links to Test Runs:
    • go to Administration -> Plans -> Plan Custom Fields and create custom field using ID: testRunLinks, Name: Test Run Links, Type: Rich Text (multi-line)
    • go to Plans -> select any plan and click ⚙ -> Customize Plan Report -> Customize Shared Report
    • Place where it is needed widget "Script - Block" and put following code inside:
      #if(!$plan.fields().get("testRunLinks").is().empty())
      <h2>Test runs</h2>
      $plan.fields().get("testRunLinks").render()
      #end
      
    • click 'Save'
    • Now 'Test Runs' field should contain links to the Test Runs which had created references to current plan on step 2.

Custom field: Team-SBB

  1. Create an enum containing all acceptable team names for selected project:
    • go to Administration -> Work Items -> Enumerations
    • use Work Item Type: --Unspecific--, Enumeration: Custom + provide own name e.g. team_sbb
    • fill all possible values of this enum, e.g. Adler, Otter, Orca, etc
    • save enum configuration
  2. Create a custom field which will keep the value (this step can be made in global configuration, but global fields will be visible only if the local configuration for test runs is deleted https://community.sw.siemens.com/s/question/0D54O00007Fh7iLSAR/do-global-test-run-custom-fields-work-locally):
    • go to Administration -> Testing -> Test Run Custom Fields
    • use ID: teamSBB, Name: Team-SBB, Type: Enum (+ select enum name created on step 1)
  3. Customize Test Run Report to show Team-SBB field:
    • Test Runs -> on the right hand side of the toolbar of the Test Runs page, click Manage Templates and select a template you want to modify
    • Place where it is needed widget "Script - Block" and put following code inside:
      #if(!$testRun.fields().get("teamSBB").is().empty())
      <h2>Team-SBB</h2>
      $testRun.fields().get("teamSBB").render()
      #end
      
    • click 'Save'
    • Now 'Team-SBB' field would appear on detail page if the field was sent by maven-plugin

REST API

This extension provides REST API. OpenAPI Specification can be obtained here.