After upgrade to v3: Allure Runtime and testMapper no longer supported for custom labels #2990
Replies: 2 comments 2 replies
-
|
Hi, @bionikokex The feature seems to work as expected to me. I've created a demo repository. Here is the config I used: module.exports = {
default: {
parallel: 4,
format: ["allure-cucumberjs/reporter:./out/ignore"],
formatOptions: {
resultsDir: "./out/allure-results",
labels: [
{ pattern: [/@allure_id:(.*)/], name: 'allure_id' },
{ pattern: [/@target_id:(.*)/], name: 'target_id' },
{ pattern: [/@AT_Section:(.*)/], name: 'auto_section' },
{ pattern: [/@feature:(.*)/], name: 'epic' },
],
}
},
}The feature file is as follows: @target_id:MyTarget @feature:MyFeature
Feature: sample feature
@AT_Section:My_AT_Section @allure_id:1020
Scenario: sample scenario
Then sample stepYou may check: the labels are present in the result file. Compare the setup in the repo with yours and note any differences. Hope that will help. |
Beta Was this translation helpful? Give feedback.
-
|
@delatrie how to put a layer in the configuration itself so that it applies to all features at once? If you put it down as written in the documentation, then I need to put name and value in the label, but in this case, an error occurs at startup |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
After upgrading allure-cucumberjs and allure-js-commons from v2 to v3, we noticed that support for directly using AllureRuntime with testMapper is no longer available.
In v2, we used a custom reporter to inject additional labels (e.g., layer, allure_id, etc.) into each test via testMapper. This worked reliably for transforming Cucumber tags into Allure metadata:
In v3, we followed the documented approach by defining formatOptions.labels in the cucumber.js configuration:
However, these custom labels no longer appear in the Allure report. The tags themselves are still parsed by Cucumber, but the mapped labels are missing from the output in allure-results.
Is there an alternative to testMapper in v3? Or a new, supported way to programmatically inject labels based on tags?
This was an important part of our reporting integration, and losing this capability is currently blocking us from migrating fully to v3.
Beta Was this translation helpful? Give feedback.
All reactions