René's URL Explorer Experiment


Title: allure-behave: extend scenario_history_id to use optional environment variable · Issue #880 · allure-framework/allure-python · GitHub

Open Graph Title: allure-behave: extend scenario_history_id to use optional environment variable · Issue #880 · allure-framework/allure-python

X Title: allure-behave: extend scenario_history_id to use optional environment variable · Issue #880 · allure-framework/allure-python

Description: Context allure-behave: extend scenario_history_id to use optional environment variable We have a problem where we want to run the same test-suite in different environments. For example: Execute Test-Suite for Different Browser: Firefox, ...

Open Graph Description: Context allure-behave: extend scenario_history_id to use optional environment variable We have a problem where we want to run the same test-suite in different environments. For example: Execute Tes...

X Description: Context allure-behave: extend scenario_history_id to use optional environment variable We have a problem where we want to run the same test-suite in different environments. For example: Execute Tes...

Opengraph URL: https://github.com/allure-framework/allure-python/issues/880

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"allure-behave: extend scenario_history_id to use optional environment variable","articleBody":"\u003c!---\nThank you so much for sending us a pull request! \n\nMake sure you have a clear name for your pull request. \nThe name should start with a capital letter and no dot is required in the end of the sentence.\nTo link the request with issues use the following notation: (fixes #123, fixes #321\\)\n\nAn example of good pull request names:\n* Add Cucumber integration (fixes #123\\)\n* Add an ability to disable default plugins\n* Support emoji in test descriptions\n--\u003e\n\n### Context\n\u003c!---\nDescribe the problem or feature in addition to a link to the issues\n--\u003e\n\n# allure-behave: extend scenario_history_id to use optional environment variable\n\nWe have a problem where we want to run the same test-suite in different environments. For example:\n\n1. **Execute Test-Suite for Different Browser:** Firefox, Chrome, ... (i.e. 'BROWSER=firefox behave' 'BROWSER=chromium behave' etc.)\n2. **Execute Test-Suite for Different Systems:** Linux armx64, Linux amd64, Win amd64, ...\n\nIf we collect all JSON allure-results and generate an allure report we only see **one** result for each test-scenario. Other executions are shown only in the \"retries\" section. We need to change the history ID so that each execution appears as a separate test. \n\nWe want to solve this by adding additional information into the historyId. It would have been nice to use additional user-modifiable information from the Scenario object, but this is not possible since scenario_history_id() is called before the before_scenario() hook (environment.py). Therefore not action in the before_scenario hook function (like changing scenario name or adding other information, can impact the historyId. \n\nThus, we designed a solution that uses an environment variable to pass this information. Our proposal is to the set an environment variable in `environment.py` that is used to influence the `historyId`.\n\nIn `allure-python/allure-behave/src/utils.py`:\n\n```python\ndef scenario_history_id(scenario) -\u003e str:\n    \"\"\"\n    Create a historyId for a scenario.\n    - Always based on feature name and scenario name\n    - Optional: can append a value from an environment variable\n    \"\"\"\n    parts = [scenario.feature.name, scenario.name]\n\n    if hasattr(scenario, \"_row\") and scenario._row:\n        row = scenario._row\n        parts.extend([f\"{name}={value}\" for name, value in zip(row.headings, row.cells)])\n\n    # Optional: append environment variable to differentiate runs\n    history_id = os.getenv(\"ALLURE_HISTORY_ID\")\n    if history_id:\n        parts.append(history_id)\n\n    return md5(*parts)\n```\n\nTo use this feature, add the environment variable in `environment.py`:\n\n```python\nfrom enum import Enum\nimport os\n\nclass Option(str, Enum):\n    OPTION_A = \"Option A\"\n    OPTION_B = \"Option B\"\n\ndef before_all(context):\n    os.environ[\"ALLURE_HISTORY_ID\"] = Option.OPTION_B.name\n```\n\nPull Request: #879 ","author":{"url":"https://github.com/Monstertoaster","@type":"Person","name":"Monstertoaster"},"datePublished":"2025-10-08T13:47:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/880/allure-python/issues/880"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3a0cfd86-3cf5-8cea-eb10-7712b5c139e0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDC1C:2A1D2C:E40B1C:1319D66:6970256D
html-safe-nonce0d276612d2149bc3c893fca822b606a0fe630977985ce32a7a5556709c19bca9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzFDOjJBMUQyQzpFNDBCMUM6MTMxOUQ2Njo2OTcwMjU2RCIsInZpc2l0b3JfaWQiOiI1MzE5ODcwMzY1NzQ2MzQxMjMwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac669061bd5fac633eb548c403ed61cc8b38d91f464fa0c2e1b745156a4d7ce0a9
hovercard-subject-tagissue:3495527934
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/allure-framework/allure-python/880/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4d10f84824f7787f99e24001d5729a36f8b43a95f0f52425f2b63dd537724ada/allure-framework/allure-python/issues/880
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4d10f84824f7787f99e24001d5729a36f8b43a95f0f52425f2b63dd537724ada/allure-framework/allure-python/issues/880
og:image:altContext allure-behave: extend scenario_history_id to use optional environment variable We have a problem where we want to run the same test-suite in different environments. For example: Execute Tes...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMonstertoaster
hostnamegithub.com
expected-hostnamegithub.com
None26d344b5c41e8171f05f1b33de4ed89a222e01250099adfcd988bb0e02fd1cbb
turbo-cache-controlno-preview
go-importgithub.com/allure-framework/allure-python git https://github.com/allure-framework/allure-python.git
octolytics-dimension-user_id5879127
octolytics-dimension-user_loginallure-framework
octolytics-dimension-repository_id79346720
octolytics-dimension-repository_nwoallure-framework/allure-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id79346720
octolytics-dimension-repository_network_root_nwoallure-framework/allure-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9f0c240136b4f91bdb92e57a88ba5dc425cbdb12
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/allure-framework/allure-python/issues/880#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fallure-framework%2Fallure-python%2Fissues%2F880
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fallure-framework%2Fallure-python%2Fissues%2F880
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=allure-framework%2Fallure-python
Reloadhttps://patch-diff.githubusercontent.com/allure-framework/allure-python/issues/880
Reloadhttps://patch-diff.githubusercontent.com/allure-framework/allure-python/issues/880
Reloadhttps://patch-diff.githubusercontent.com/allure-framework/allure-python/issues/880
allure-framework https://patch-diff.githubusercontent.com/allure-framework
allure-pythonhttps://patch-diff.githubusercontent.com/allure-framework/allure-python
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fallure-framework%2Fallure-python
Fork 256 https://patch-diff.githubusercontent.com/login?return_to=%2Fallure-framework%2Fallure-python
Star 789 https://patch-diff.githubusercontent.com/login?return_to=%2Fallure-framework%2Fallure-python
Code https://patch-diff.githubusercontent.com/allure-framework/allure-python
Issues 95 https://patch-diff.githubusercontent.com/allure-framework/allure-python/issues
Pull requests 20 https://patch-diff.githubusercontent.com/allure-framework/allure-python/pulls
Actions https://patch-diff.githubusercontent.com/allure-framework/allure-python/actions
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/allure-framework/allure-python/security
Please reload this pagehttps://patch-diff.githubusercontent.com/allure-framework/allure-python/issues/880
Insights https://patch-diff.githubusercontent.com/allure-framework/allure-python/pulse
Code https://patch-diff.githubusercontent.com/allure-framework/allure-python
Issues https://patch-diff.githubusercontent.com/allure-framework/allure-python/issues
Pull requests https://patch-diff.githubusercontent.com/allure-framework/allure-python/pulls
Actions https://patch-diff.githubusercontent.com/allure-framework/allure-python/actions
Security https://patch-diff.githubusercontent.com/allure-framework/allure-python/security
Insights https://patch-diff.githubusercontent.com/allure-framework/allure-python/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/allure-framework/allure-python/issues/880
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/allure-framework/allure-python/issues/880
allure-behave: extend scenario_history_id to use optional environment variablehttps://patch-diff.githubusercontent.com/allure-framework/allure-python/issues/880#top
https://github.com/Monstertoaster
https://github.com/Monstertoaster
Monstertoasterhttps://github.com/Monstertoaster
on Oct 8, 2025https://github.com/allure-framework/allure-python/issues/880#issue-3495527934
#879https://github.com/allure-framework/allure-python/pull/879
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.