GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add titlePath to results generated by all allure-python integrations by delatrie · Pull Request #870 · allure-framework/allure-python

Conversation

@delatrie

@delatrie delatrie commented Jul 18, 2025

Copy link
Copy Markdown
Contributor

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:

  • 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: Foo

Scenario: Bar
  Given 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.

Checklist

  • Sign Allure CLA
  • Provide unit tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

brolnickij reacted with thumbs up emoji brolnickij reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction
delatrie added 23 commits July 10, 2025 19:08
@delatrie
feat(commons): add TestResult.titlePath
36319b5
@delatrie
test(commons): add has_title_path matcher
e8fd86f
@delatrie
test(pytest): add tests for title path
8b5bf5c
@delatrie
feat(pytest): implement titlePath
e37d246
@delatrie
refactor(pytest): use ParsedPytestNodeId in allure_package
94f8272
@delatrie
test(pytest): add nested package test
5749e7e
@delatrie
test(pytest): move root package test to base unit test suite
5369e61
@delatrie
refactor(pytest): use ParsedPytestNodeId in allure_full_name
459e59c
@delatrie
refactor(pytest): use ParsedPytestNodeId in allure_suite_labels
767f227
@delatrie
refactor(pytest): move ParsedPytestNodeId to the top of the file
05fd8b0
@delatrie
feat(pytest): stash caching decorator and fns
a6a0212
@delatrie
feat(pytest): cache parsed nodeid in stash
f1d3202
@delatrie
test(behave): add support for feature filename
347acb5
@delatrie
test(behave): add titlepath tests
1402e24
@delatrie
feat(behave): implement titlePath
4a25378
@delatrie
test(robot): add rootdir to runner
7f28321
@delatrie
test(robot): add titlePath tests
bb68de9
@delatrie
feat(robot): implement titlePath
3be2252
@delatrie
test(nose2): add sepport for explicit module name to runner
e2d4e2e
@delatrie
test(nose2): add tests for titlePath
7bb0ef2
@delatrie
feat(nose2): implement titlePath
a171d88
@delatrie
test(pytest-bdd): add tests for titlePath
1955a12
@delatrie
feat(pytest-bdd): implement titlePath
33acc2e
@delatrie delatrie added theme:pytest theme:behave theme:old pytest theme:core theme:robotframework theme:pytest-bdd type:new feature Pull requests that introduce new features labels Jul 18, 2025
@epszaw
epszaw self-requested a review July 18, 2025 14:58
epszaw
epszaw approved these changes Jul 22, 2025
View reviewed changes
@delatrie
delatrie merged commit ab14314 into master Jul 22, 2025
@delatrie
delatrie deleted the title-path branch July 22, 2025 11:10
@delatrie 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
@rob-broadley rob-broadley mentioned this pull request Jul 23, 2025
titlePath breaking Functionality in 2.15.0 #871
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@epszaw epszaw epszaw approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

theme:behave theme:core theme:old pytest theme:pytest theme:pytest-bdd theme:robotframework type:new feature Pull requests that introduce new features

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@delatrie @epszaw
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.