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 — Changing an id of a pytest parameter set breaks test's history · Issue #744 · allure-framework/allure-python

Changing an id of a pytest parameter set breaks test's history #744

New issue
Copy link
New issue
Copy link
Closed
#745
Closed
Changing an id of a pytest parameter set breaks test's history#744
#745
Copy link
Assignees
delatrie
Labels
bugSomething isn't workingSomething isn't workingtheme:pytest

Description

@delatrie
delatrie
opened on Apr 22, 2023
Issue body actions

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

Assigning or changing an id of a parameter set in pytest's parametrize mark breaks the test's run/rerun history.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Given we have the following test file:

import pytest

@pytest.mark.parametrize("v", [1])
def test_issue744_reproduction(v):
    pass

When we run pytest (without the --clean-alluredir argument), and then assign ids to the parameter sets:

import pytest

@pytest.mark.parametrize("v", [1], ids=["a"])
def test_issue744_reproduction(v):
    pass

When we run pytest again we end up with two test results with different historyId values.

If we generate the report it will look like this:

What is the expected behavior?

Both results should be considered retries (i.e., should have the same 'historyId' values). Assigning an id to a parameter set should only affects the default title of the test (where a portion of the nodeid is used).

What is the motivation / use case for changing the behavior?

More flexibility to refactor tests without losing the history of runs/reruns.

Please tell us about your environment:

  • Allure version: 2.20.1
  • Test framework: [email protected]
  • Allure adaptor: [email protected]

Other information

Most probably will be fixed together with #743.

Activity

  1. delatrie
    added
    bugSomething isn't workingSomething isn't working
    theme:pytest
    on Apr 22, 2023
  2. delatrie
    self-assigned this
    on Apr 22, 2023
  3. delatrie
    changed the title [-]Changing a pytest parameter set id breaks test's history[/-] [+]Changing an id of a pytest parameter set breaks test's history[/+] on Apr 22, 2023
  4. delatrie
    closed this as completedin #745on Apr 26, 2023
  5. delatrie
    added a commit that references this issue on Apr 26, 2023

    Fix historyId calculation by allure-pytest (fix #743, #744) (#745)

    8e7b2ae
  6. IvanBuruyane
    added a commit that references this issue on Mar 19, 2024

    Fix historyId calculation by allure-pytest (fix allure-framework#743, a…

    74b5733
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @delatrie
    delatrie

Labels

bugSomething isn't workingSomething isn't workingtheme:pytest

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.