Allure supports step name with function parameters https://github.com/allure-framework/allure-python#steps
@allure.step('my step with parameter a={0}, b={1}')
def my_step(important_parameter, my_parameter):
pass
But it work for determined count of function variables. Is it possible to show all variables in case **args and **kwargs parameters? Something like
@allure.step('my step with parameter **kwargs}')
def my_step(**kwargs):
pass
allure.step
callsformat
method on the step title to form the actual step nameSee source at https://github.com/allure-framework/allure-python/blob/master/allure/common.py#L56
So far string formatting has no means to show variable-arguments string.
https://docs.python.org/2/library/string.html#format-string-syntax
To work around your issue you may try to pass a wrapper object to the step title with a
format
method that will handle any custom logic.Like
Also, you are welcome to send any pull requests to possibly fix parameter-passing login in the
allure-python
itself.Cheers!