allure-framework / allure-framework/allure-python

Test's name contains dict's value instead of dict's key in allure

Open
#341 6 comments 0 reactions 0 assignees View on GitHub
task:new feature theme:pytest
Dominant language
Python
Stars
814
Forks
260
PR merge metrics
No merged PRs in 30d

Description

Stack: python, pytest, selenium.
To parametrize tests I use **pytest_generate_tests**:
`metafunc.parametrize(fixture, test_data.values(), ids=[key for key, value in test_data.items()])`

In allure test looks like this:
![screenshot](https://user-images.githubusercontent.com/19889745/51314546-00dacd00-1a61-11e9-8290-fd893ceac9b1.png)

But in IDE (Pycharm) it looks as it should be:
`test_home_page.py::test_add_not_existing_product[Hot products]`

Is it possible to show dict's key in allure too?

Contributor guide

Open the contributing guide

Research direction

Start with the pytest_generate_tests parametrization shown in the issue and inspect how Allure derives parameterized test names. Compare the generated Allure name with PyCharm's displayed key-based name; done means the Allure report shows each dictionary key rather than its value.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.