reportportal / agent-python-pytest

Framework integration with PyTest
Apache License 2.0
95 stars 102 forks source link

Support for Marker with multiple values #239

Closed rambangaru closed 3 years ago

rambangaru commented 3 years ago
1. Tests are failed.

2. Provide a use case for suggested changes.

Thanks in advance.

In PyTest, Markers supports multiple values and when multiple values are used, the current code takes only on and ignore the remaining.

Lets take a use case, Consider I'm using the plugin https://github.com/Projectplace/pytest-tags for the purpose of adding tags to my Tests and Test have multiple tags. PyTest RP Agent takes the very first tag and add to report portal portal and ignores remaining, this particular code change, supports to update all the mentioned tags, and we can expect something like below in report portal

image

the current behavior is, it takes only first tag and report that alone to report portal

image

iivanou commented 3 years ago
1. Tests are failed.

2. Provide a use case for suggested changes.

Thanks in advance.

In PyTest, Markers supports multiple values and when multiple values are used, the current code takes only on and ignore the remaining.

Lets take a use case, Consider I'm using the plugin https://github.com/Projectplace/pytest-tags for the purpose of adding tags to my Tests and Test have multiple tags. PyTest RP Agent takes the very first tag and add to report portal portal and ignores remaining, this particular code change, supports to update all the mentioned tags, and we can expect something like below in report portal

image

the current behavior is, it takes only first tag and report that alone to report portal

image

Ok. can you add unit tests then?

rambangaru commented 3 years ago
1. Tests are failed.

2. Provide a use case for suggested changes.

Thanks in advance.

In PyTest, Markers supports multiple values and when multiple values are used, the current code takes only on and ignore the remaining. Lets take a use case, Consider I'm using the plugin https://github.com/Projectplace/pytest-tags for the purpose of adding tags to my Tests and Test have multiple tags. PyTest RP Agent takes the very first tag and add to report portal portal and ignores remaining, this particular code change, supports to update all the mentioned tags, and we can expect something like below in report portal image the current behavior is, it takes only first tag and report that alone to report portal image

Ok. can you add unit tests then?

Added unit test. I actually added additional test data for existing test to validate new addition.

Kindly review.