Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Allow users to actually take advantage of passed categories via message regex.

Offen
#790 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
testing-qa

Rechercherichtung

Beginne mit dem pytest_runtest_makereport-Hook im allure-pytest-Adapter und verfolge, wie report.longrepr oder longreprtext zu status_details wird. Füge eine Abdeckung für einen bestandenen Report hinzu, dessen Nachricht mit messageRegex übereinstimmt, und überprüfe, dass categories.json die benannte Passed-Kategorie auswählen kann.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

As a user of the categories.json, I want to be able to display "Passed" categories mapped from the categories.json using the messageRegex, so that I can show different "Passed" categories by Name in the UI.

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?

In pytest_runtest_makereport, the default value of status_details is None, and when test_result.status == Status.PASSED, it's still None.

As far as I know there's no way to actually provide a message that would enable this to work in a categories.json

[
  {
    "name": "Integration Passed",
    "messageRegex": ".*IntegrationTest.*",
    "matchedStatuses": ["passed"]
  }
]
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

A simple bit of code I would expect to work

@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_makereport(item, call):
    report = (yield).get_result()
    if call.when == "call" and report.passed:
        report.longrepr = "IntegrationTest Passed"
What is the expected behavior?

That I can provide a Passed Message to allure to do stuff with the categories.json

        status_details = StatusDetails(message=report.longreprtext)
Please tell us about your environment:
platform darwin -- Python 3.11.3, pytest-7.4.2, pluggy-1.3.0
plugins: cov-4.1.0, mock-3.11.1, anyio-3.7.1, xdist-3.3.1, check-2.2.2, allure-pytest-2.13.2
Other information

None

Vorherrschende Sprache
Python
Sterne
820
Forks
262
Ø Merge
3 Std. 20 Min.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus allure-framework/allure-python

Alle Issues in allure-framework/allure-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.