We're transitioning to a new default test result hierarchy called titlePath, which requires support in all test framework integrations. This PR adds support for titlePath to integrations with Behave, Nose2, pytest, Pytest-BDD, and Robot Framework.
titlePath of a Behave scenario consists of the following parts:
Directories of the feature file, relative to the CWD.
The name of the feature.
Example:
Given that the following feature file is placed at ./features/epic/foo.feature:
Feature: FooScenario: BarGiven something...
The following titlePath is assigned to the test result of the Bar scenario: ["features", "epic", "Foo"].
Note
If the feature is nameless, the name of the file is used instead (foo.feature in the example above). If the feature isn't associated with a file (i.e., it was parsed from a string via the Behave API), the titlePath consists of the feature name only. If the feature has neither a file nor a name, the feature's keyword (Feature) is used as a placeholder.
Allure Nose2
For Nose 2 tests, a titlePath is the full name of the test's module, split by ., optionally followed by the class name.
Allure Pytest
For Pytest tests, a titlePath consists of:
Segments of the filepath relative to the rootdir.
For test methods, names of the classes (the test classes can nest).
Allure Pytest BDD
For Pytest-BDD scenarios, a titlePath consists of:
Directory names of the feature file relative to the rootdir.
The name of the feature.
Note
If the feature is nameless, the name of the file is used instead.
Allure Robot Framework
For Robot Framework test suites, a titlePath consists of the names of the test case's suites.
Example:
Given a suite file at ./suites/foo/bar.robot, when a single path ./suites is passed to Robot Framework, the test cases in that suite all receive the following titlePath: ["Foo", "Bar"].
Warning
The sequence of suites and sub-suites resolved by Robot Framework depends on the CWD and the paths you pass to robot. The example above can also be run like this: robot <other args> ./suites/foo, in which case the titlePath becomes ["Bar"].
Ensure that you run the Robot Framework with the same paths when generating Allure reports, so that the history-related identifiers and title paths remain consistent across runs. Otherwise, the history may not work correctly, and the report navigation may become confusing.
delatrie
changed the title
feat: add titlePath to results generated by all allure-pytest integrations
feat: add titlePath to results generated by all allure-python integrations
Jul 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
We're transitioning to a new default test result hierarchy called titlePath, which requires support in all test framework integrations. This PR adds support for titlePath to integrations with Behave, Nose2, pytest, Pytest-BDD, and Robot Framework.
A detailed description of the feature can be found in this issue: allure-framework/allure-js#1260.
Allure Behave
titlePath of a Behave scenario consists of the following parts:
Example:
Given that the following feature file is placed at ./features/epic/foo.feature:
The following titlePath is assigned to the test result of the Bar scenario: ["features", "epic", "Foo"].
Note
If the feature is nameless, the name of the file is used instead (foo.feature in the example above). If the feature isn't associated with a file (i.e., it was parsed from a string via the Behave API), the titlePath consists of the feature name only. If the feature has neither a file nor a name, the feature's keyword (Feature) is used as a placeholder.
Allure Nose2
For Nose 2 tests, a titlePath is the full name of the test's module, split by ., optionally followed by the class name.
Allure Pytest
For Pytest tests, a titlePath consists of:
Allure Pytest BDD
For Pytest-BDD scenarios, a titlePath consists of:
Note
If the feature is nameless, the name of the file is used instead.
Allure Robot Framework
For Robot Framework test suites, a titlePath consists of the names of the test case's suites.
Example:
Given a suite file at ./suites/foo/bar.robot, when a single path ./suites is passed to Robot Framework, the test cases in that suite all receive the following titlePath: ["Foo", "Bar"].
Warning
The sequence of suites and sub-suites resolved by Robot Framework depends on the CWD and the paths you pass to robot. The example above can also be run like this: robot <other args> ./suites/foo, in which case the titlePath becomes ["Bar"].
Ensure that you run the Robot Framework with the same paths when generating Allure reports, so that the history-related identifiers and title paths remain consistent across runs. Otherwise, the history may not work correctly, and the report navigation may become confusing.
Checklist