-
Notifications
You must be signed in to change notification settings - Fork 238
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
Add support allure decorators (not all) for allure-pytest-bdd (fixes #726) #818
base: master
Are you sure you want to change the base?
Add support allure decorators (not all) for allure-pytest-bdd (fixes #726) #818
Conversation
Labels like (id, title, etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @fantom0005. Thank you for this pull request. I really appreciate this work (so is the Allure Pytest-BDD community, I believe).
I took a brief look and it seems good so far. I'll do a more in-depth review next week, although, as long as it matches allure-pytest, there shouldn't be any problem.
For now, the only thing I would like to ask you to change is to rename the test file and the test function to better reflect what's tested inside (see my comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, @fantom0005!
Sorry for making you wait so long!
I took a closer look and it mostly looks good. Let's fix the "unknown mark" warning and it will be good to go.
I would also appreciate if you could add one more test to check docstring-to-description conversion.
Please, read my comments for more details.
if description: | ||
return description | ||
elif hasattr(item, 'function'): | ||
return item.function.__doc__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a test on converting the function's doc into the Allure description?
test_helper = AllureTestHelper(config) | ||
allure_commons.plugin_manager.register(test_helper) | ||
config.add_cleanup(cleanup_factory(test_helper)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, register custom marks like allure-pytest does it here
Hi @delatrie |
@delatrie and @fantom0005 |
@delatrie and @fantom0005 |
Context
Add Allure Decorators Support for Tests
This pull request introduces the ability to use Allure decorators for test cases in pytest-bdd. These decorators are essential for auto-documentation and integration with Allure Test Ops.
Currently Working Decorators:
@allure.description
@allure.label
@allure.severity
@allure.epic
@allure.feature
@allure.story
@allure.suite
@allure.parent_suite
@allure.sub_suite
@allure.tag
@allure.id
@allure.manual
@allure.link
@allure.issue
@allure.testcase
Non-Working Decorators:
@allure.title
@allure.description_html
I propose to fix the remaining decorators and dynamic labels in subsequent pull requests.
Thank you for reviewing!
Checklist