8000 Awesome: indicate steps with failed/broken substeps · Issue #161 · allure-framework/allure3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Awesome: indicate steps with failed/broken substeps #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
delatrie opened this issue Apr 24, 2025 · 0 comments
Open

Awesome: indicate steps with failed/broken substeps #161

delatrie opened this issue Apr 24, 2025 · 0 comments

Comments

@delatrie
Copy link
Collaborator
delatrie commented Apr 24, 2025

#143 makes a passed step with failed/broken substeps expanded by default. Still, if we collapse the parent step manually, we face the same problem: failed steps are hidden, and nothing tells us there is something wrong inside the passed step.

Moreover, Allure Awesome will keep the collapsed state if we navigate to the homepage and then go back to the test. This makes working with large tests with a complex step structure harder, especially when the report is hosted somewhere for a long time (the state persists in the browser's storage).

Use cases

Two use cases come to mind when speaking of such step structures:

  1. Soft assertions - tests with soft assertions may represent failed assertions with failed steps. Such steps can be grouped into higher-level steps, which by default often get the passed status. Example:
    import allure
    from pytest_check import check
    
    def test_with_soft_assertions():
        with allure.step("Parent"):
            with check, allure.step("Assertion 1"):
                assert False
            with check, allure.step("Assertion 2"):
                assert False
  2. Retry logic - tests may represent an attempt to, say, load some data with a step. If it takes several attempts to load the data (several failed + one succeeded), the parent step will be passed, while some substeps failed. Example:
    import allure
    
    def test_with_soft_assertions():
        with allure.step("Parent"):
            for attempt in range(0, 3):
                try:
                    with allure.step(f"Attempt #{attempt}"):
                        ... # code that loads the data
                    break
                except Exception:
                    pass
            else:
                raise Exception("Can't load the data")

Example

Given the soft assertions example above, when we generate and open the Awesome report, the test body will be shown like this:

Image

When we collapse the Parent step, it will look like this:

Image

Solution

Having some sort of indicator that notifies you that there are failed/broken steps inside a passed one will solve the issue. The indicator, for example, may look like a user status indicator in messengers or collaboration tools (like Slack):

  • Red circle: there is a failed substep inside
  • Yellow circle: there is a broken substep inside

Open questions

  1. Should we limit the indication to failed/broken substeps, or should we also include skipped/unknown/passed?
  2. Should we indicate the presence of failed/broken steps at the test level?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0