reportportal / agent-python-pytest

Framework integration with PyTest
Apache License 2.0
94 stars 103 forks source link

Incorrect item name when running tests in nested folders #327

Closed yakovbabich closed 1 year ago

yakovbabich commented 1 year ago

Describe the bug

The name of an item is incorrect when tests running from different nested folders.

For example: 2 tests running, each in its folder ('goo' and 'zoo') when both folders under a root folder 'temp': image

The name of the first item 'goo' is correct but the second item's name has an additional 'zoo' in it and an additional hierarchy folder: image

As can be seen in the picture above, the name is incorrect and should appear as: 'tests/temp/zoo/test_zoo.py', in which should be another item with the test's name.

Steps to Reproduce To reproduce, create similar folder structure as shown in the image above, when there is a nested hierarchy of folders.

Expected behavior A correct name should appear on all items.

Actual behavior An incorrect name appear on item.

Package versions pytest-reportportal==5.1.3

HardNorth commented 1 year ago

@yakovbabich, your issue missing significant data. First of all, by default (without any flags) the agent reports tests in different format, like here: Screenshot 2023-02-17 at 5 20 58 PM

So, I suppose you are using rp_hierarchy_code flag. But in this case everything works correct for me: Screenshot 2023-02-17 at 5 21 13 PM

To remove any misunderstanding and save our both time, please provide an example project which reproduces the case, until then I count this issue as invalid.

HardNorth commented 1 year ago

Cannot reproduce