- Java 58.5%
- TypeScript 35.2%
- CSS 2.8%
- JavaScript 2.7%
- HTML 0.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github | ||
| .idea/codeStyles | ||
| .mvn | ||
| docs | ||
| src | ||
| ui | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .yamlfix.toml | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| CODING_STANDARDS.md | ||
| CONTRIBUTING.md | ||
| DCO | ||
| DEVELOPMENT.md | ||
| LICENSE | ||
| lombok.config | ||
| NOTICE | ||
| pom.xml | ||
| README.md | ||
| redocly.yaml | ||
| RELEASE.md | ||
| renovate.json | ||
| USER_GUIDE.md | ||
| zizmor.yml | ||
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.
- Download
ch.sbb.polarion.extension.cucumber-<version>.jarfrom the latest release. - Stop Polarion.
- Copy the jar file to
<polarion_home>/polarion/extensions/ch.sbb.polarion.extension.cucumber/eclipse/plugins. Create the folder if it does not exist. - Remove older versions of the extension jar from this folder.
- Delete the folder
<polarion_home>/data/workspace/.config. - Start Polarion.
- Do the Polarion configuration steps for each project that uses the extension.
Important
You must delete
<polarion_home>/data/workspace/.configafter 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/.configbefore you restart Polarion.
Polarion configuration
Cucumber feature editor to appear on Test Case page
- Open a project which Test Case pages should display the editor
- On the top of the project's navigation pane click ⚙ (Actions) ➙ 🔧 Administration. Project's administration page will be opened.
- On the administration's navigation pane select Work Items ➙ Form Configuration.
- On the form configuration page you will see 2 sections: Form Filters and Form Layouts.
- In the table of Form Layouts section find line Test Case and click 📝 Edit
- In opened Form Layout Configuration editor find a line with code:
… <field id="description"/> … - Insert following new line after it:
… <extension id="cucumber" label="Cucumber Test"/> … - Save changes by clicking 💾 Save
Cucumber feature editor to appear on the Live Doc sidebar
- Open a project which the Live Doc sidebar should display the editor
- On the top of the project's navigation pane click ⚙ (Actions) ➙ 🔧 Administration. Project's administration page will be opened.
- On the administration's navigation pane select Documents & Pages ➙ Work Item Properties Sidebar.
- In the opened Edit Project Configuration editor insert the following line:
… <extension id="cucumber" label="Cucumber Test"/> … - 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:
- Open a project which Test Run Templates needs to be modified.
- In Navigation, click Test Runs. The Test Runs page opens. The top section of the page displays a table of existing Test Runs.
- 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.
- Select a template you want to modify.
- On the toolbar of the detail pane, click ⚙ (Actions) ➙ Customize Test Run Page.
- 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
- 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 - Add new lines:
… #if(!$testRun.fields().description().is().empty()) $testRun.fields.description.render().withText() #end - Save template by clicking 💾
Custom fields: Components
- Create an enum containing all acceptable
componentsnames 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
- go to
- 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
- go to
- 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
- 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
- go to
- Customize Test Run Report to show
Test Planfield:- 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.
- Customize Plan to show links to Test Runs:
- go to
Administration -> Plans -> Plan Custom Fieldsand 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.
- go to
Custom field: Team-SBB
- 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
- go to
- 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)
- go to
- 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.